Write a main function declares a coffeeorder


Discuss the below:

Q: Define a class named CoffeeOrder. Include private integer fields that you set to a flag value of 1 or 0 to indicate whether the order should have any of the following: cream, milk, sugar, or artificial sweetener. Include a public function that takes a user's order from the keyboard and sets the values of the four fields in response to four prompts. If the user indicates bother milk and cream, turn off the milk flag to allow only cream. If the user indicates both sugar and artificial sweetener, turn off the artificial sweetener flag, allowing only sugar. Include another function that displays the user's competed order. Write a main() function that declares a CoffeeOrder object and calls the data entry and display methods.

Solution Preview :

Prepared by a verified Expert
C/C++ Programming: Write a main function declares a coffeeorder
Reference No:- TGS01937904

Now Priced at $20 (50% Discount)

Recommended (92%)

Rated (4.4/5)