Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In C++ A new fruit juice machine has been purchased for the cafeteria, and a program is needed to make the machine function properly. The

image text in transcribed

In C++

A new fruit juice machine has been purchased for the cafeteria, and a program is needed to make the machine function properly. The machine dispenses apple juice, orange juice, mango lassi, and fruit punch in recyclable containers. In this programming example, we write a program for the fruit juice machine so that it can be put into operation. The program should do the following: 1. Show the customer the different products sold by the juice machine. 2. Let the customer make the selection. 3. Show the customer the cost of the item selected. 4. Accept money from the customer. 5. Release the item. Hint: A juice machine has two main components: a built-in cash register and several dispensers to hold and release the products. What to Do . Work through the example. . Type the code into your project. . Get the pieces to work together. .Write a main function that exercises these two classes. . Evaluate how these two classes interact with each other. . Compile the pieces into a cohesive program that is properly split into declaration/specification, implementation/definition, and main.cpp files. Your completed project should have these five files: 1. cashRegister.h 2. cashRegister.cpp 3. dispenserType.h 4. dispenserType.cpp 5. main.cpp What to Do Next Now change your program a bit before you submit it. 1] Add some drinks. 2] Have your dispenser track how much money has been deposited, and only issue a drink when the required cents has been deposited. 3] Also make sure to tell the user if they have a change coming back from the machine. Optional: Allow the customer to order multiple drinks at a time

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

More Books

Students also viewed these Databases questions