Explore BrainMass

Explore BrainMass


    Not what you're looking for? Search our solutions OR ask your own Custom question.

    This content was COPIED from BrainMass.com - View the original, and get the already-completed solution here!

    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.

    © BrainMass Inc. brainmass.com March 4, 2021, 6:21 pm ad1c9bdddf


    Solution Summary

    The expert defines a class named CoffeeOrder.