Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

During Eid Days, people usually go out for refreshment and want to eat some different unusual things. Suppose you went to a refreshment center having

During Eid Days, people usually go out for refreshment and want to eat some different unusual things. Suppose you went to a refreshment center having one of the desi dish of GolGappay. But due to rush there was a queue of customers and at your turn you told the owner that you are 2nd semester student of computer science in UIIT, Arid University and offered your services to automate the point of sale to reduce owner's load of customer queries and sales. Owner felt happy to listen your offer and agreed because he was also a student of same department back in 2004 but left degree incomplete due to some personal issues. Next day he sent you a main function having menu options and requested you to Complete the program in C++ Language within 48 hours. Only class is required to complete the main function requirements.

int main()

{

GolGappay *ggp; //class name is GolGappay having only one variable price which is fixed Rs./100-

//and have only one function other than constructor.

//Also you cannot create object of this class

int choice;

char option;

do {

cout<<"Welcome there are 6 GolGappay per plate";

cout<<" Press 1 for Sour and Rs.100/- per plate";

cout<<" Press 2 for sweet and 10% extra charge";

cout<<" Press 3 for Yogurt and 20% extra charge";

cout<<" Enter your choice:";

cin>>choice;

switch(choice)

{

case 1:

ggp= new Khatay();

ggp->show(); //All show functions ask about quantity of plates and display the bill

break;

case 2:

ggp= new Meethy();

ggp->show();

break;

case 3:

ggp= new Dahiwale();

ggp->show();

break;

deafult:cout<<" Invalid Option please try again..";

}

cout<<" Do you want to continue....y/n";

cin>>option;

}while(option=='y');

return 0;

}

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Introduction to Wireless and Mobile Systems

Authors: Dharma P. Agrawal, Qing An Zeng

4th edition

1305087135, 978-1305087132, 9781305259621, 1305259629, 9781305537910 , 978-130508713

More Books

Students also viewed these Programming questions

Question

Evaluate the following integral in explicit form:

Answered: 1 week ago