UniversityEssayServices

Must be written in C++. Create a class named Ice Cream Cone with fields for flavor,number of scoops, type of cone, and price. Unless arguments aresupplied, flavor defaults to “Vanilla”, number of scoops defaultsto 1, and cone type defaults to “Sugar”. The constructor calculatesthe price based on 75 cents per scoop, with an additional 40 centsfor a waffle cone. Write a main() function demonstrating that theclass works correctly. Save the file as IceCreamCone.cpp. Here is what I have but it’s not working.. //IceCreamCone.cpp #include #include using namespace std; class IceCreamCone { private: string flavor; int scoops; string cone; double price; public: IceCreamCone(); IceCreamCone(string flavor, int scoops, string cone, doubleprice); void calculate(); void print(); }; IceCreamCone::IceCreamCone() { flavor=”Vanilla”; scoops=1; cone=”Sugar”; } IceCreamCone::IceCreamCone(string flavor, int scoops, stringcone) { this->flavor=flavor; this->scoops=scoops; this->cone=cone; calculate(); } void IceCreamCone::calculate() { const double perScoop=0.75; const double waffle=0.40; if(cone==”waffle”) price=perScoop+waffle; else price=scoops*perScoop; } void IceCreamCone::print() { cout . . .

Found something interesting ?

• On-time delivery guarantee
• PhD-level professional writers
• Free Plagiarism Report

• 100% money-back guarantee
• Absolute Privacy & Confidentiality
• High Quality custom-written papers

Related Model Questions

Feel free to peruse our college and university model questions. If any our our assignment tasks interests you, click to place your order. Every paper is written by our professional essay writers from scratch to avoid plagiarism. We guarantee highest quality of work besides delivering your paper on time.

Sales Offer

Coupon Code: SAVE25 to claim 25% special special discount
SAVE