subject

A class named CafeService contains  Two data members i. e. the orderID and the price of food item(s) served by
 A no-argument constructor to initialize both data fields with default values of “ord#0”, 0.0
 A parameterized constructor to initialize all data fields with user-defined values
Derive a class named StaffService from the class CafeService that holds the following:
 Two data members i. e.
o serviceFee,
o the cabinNumber to which the service has been made
 A function named totalCharges that returns total cost of an order (including serviceFee + price of food item(s) served)
 A parameterized constructor, which requires arguments for all of its own data fields as well as for the data fields of base class
 A member function named display() to show all the details of an order including orderID, price, and totalCharges
In the main() function, instantiate an object of class StaffService object and test the implementation of both classes through this object.

ansver
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 03:40, plzhelpmeasap46
Hello my name is mihai and i need your : )i have to do a python project in computer science and i’m really busy with my mocks this period of time besides this i’m not good at coding so could someone pls pls pls sort me out ? i actually beg ; ))
Answers: 1
image
Computers and Technology, 24.06.2019 02:20, isabelsmhl
Peter is thinking of a number which isless than 50. the number has 9 factors. when he adds 4 to the number, itbecomes a multiple of 5. what is thenumber he is thinking of ?
Answers: 1
image
Computers and Technology, 24.06.2019 23:30, soapai
True or false when a host gets an ip address from a dhcp server it is said to be configured manually
Answers: 1
image
Computers and Technology, 25.06.2019 06:10, ricksterv5000
In a game with three frames, where will the objects on layer 1 appear? a. next to the play area b. in the middle of the game behind everything else d. in front of everything else select the best answer from the choices provided
Answers: 1
You know the right answer?
A class named CafeService contains  Two data members i. e. the orderID and the price of food item...

Questions in other subjects:

Konu
Mathematics, 07.07.2019 20:00