As this is a simple machine a ticket will not be issued


Create a Ticket Machine object on the object bench and take a look at its methods. You should see the following: get Balance, get Price, insert Money, and print Ticket. Try out the get Price method. You should see a return value containing the price of the tickets that was set when this object was created. Use the insert Money method to simulate inserting an amount of money into the machine. The machine stores as a balance the amount of money inserted. Use get Balance to check that the machine has kept an accurate record of the amount just inserted. You can insert several separate amounts of money into the machine, just like you might insert multiple coins or bills into a real machine. Try inserting the exact amount required for a ticket, and use get Balance to ensure that the balance is increased correctly. As this is a simple machine, a ticket will not be issued automatically, so once you have inserted enough money, call the print Ticket method. A facsimile ticket should be printed in the Blue J terminal window.

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: As this is a simple machine a ticket will not be issued
Reference No:- TGS02169828

Expected delivery within 24 Hours