Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problem Statement: A new fruit juice machine has been purchased for the cafeteria, and a program is needed to make the machine function properly. The

Problem Statement:

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.

What to Submit

A zip file of your exported project archive.

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

Design Operation And Evaluation Of Mobile Communications

Authors: Gavriel Salvendy ,June Wei

1st Edition

3030770249, 978-3030770242

More Books

Students also viewed these Programming questions

Question

Explain how an RMI application can be made secured.

Answered: 1 week ago

Question

describe the key characteristics of a theoretical model in general;

Answered: 1 week ago