Week 12 Pair Exercise – Soda Machine You work for a game development company, and your company has asked you to build a prototype soda machine for use in multiple games on multiple platforms. To start, you have been asked to develop a simple class to repr

technical writing

Description

Week 12 Pair Exercise – Soda Machine You work for a game development company, and your company has asked you to build a prototype soda machine for use in multiple games on multiple platforms. To start, you have been asked to develop a simple class to represent the logic of your soda machine. To keep the soda machine relatively simple, your soda machine carries only one kind of soda. You designed a SodaMachine class that will describe your soda machine: Data attributes (these should be private instance variables of your class): stockLevel:int (number of beverages available in the soda machine) maxStock:int (max number of beverages the machine can hold) bevPrice:double (price of the beverage) bevLabel:String (name of the beverage stocked in the machine) changeAvailable:double (the amount of change available for making change) creditInserted:double (the amount of money inserted for purchasing beverages) Methods (these should be public): o A constructor that takes the following parameters: price:double § name:String Getter and setter methods for all instance variables (data attributes above) o Other methods: int addStock(int numberToAdd) void addCredit(double amountInserted) void addChange(double changeAdded) double returnChange()


Related Questions in technical writing category


Disclaimer
The ready solutions purchased from Library are already used solutions. Please do not submit them directly as it may lead to plagiarism. Once paid, the solution file download link will be sent to your provided email. Please either use them for learning purpose or re-write them in your own language. In case if you haven't get the email, do let us know via chat support.