Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ programming hine and a to Submlsslon You should submit 3 files Code2 xxxxxxxxxx.cpp Assumptions 1. For now, the CokeMachine only dispenses Coke and no

image text in transcribed C++ programming
hine and a to Submlsslon You should submit 3 files Code2 xxxxxxxxxx.cpp Assumptions 1. For now, the CokeMachine only dispenses Coke and no other types of tems 2. Payments are entered in pennies-$o.s0 is entered as 50, $1.00 is entered as 100. . Any displays of change will be in dollars and cents 4. Any payment entered cannot be used as part of the dispensed change. For example,if the user enter 1234 ($12.54) for payment, then the machine wil only dispense a Coke if is has enough change for 1204. When restocking the machine, the entire restock request has to fit. If the entire quantity does not fit, then the restock request is rejected. 5. UML Use the following UML to create the outline of your CokeMachine class. Please note that exact names (spellings and case) should be used changeLevel: int maxChangeCapacity: int-5000 CokePrice: int inventoryLevel: int maxinventoryCapacity: int 100 +CokeMachine(name:string, cost: int,change: int, inventory + getMachineName(): string + buyACoke(payment: int, change: string, action: int): bool + getinventoryLevel): int y): int + incrementinventory(amountToAdd: int): bool + getChangeLevel0): string l(amountToAdd: int): bool pacity): string + getCokePrice(): string + displayMoney/amount: int): stri

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

Data Management Databases And Organizations

Authors: Richard T. Watson

3rd Edition

0471418455, 978-0471418450

More Books

Students also viewed these Databases questions