Question: Ql. Write a program in BlueJ using the following hints a) Create a class named TicketMachine with 3 fields - price, balance and total b)

Ql. Write a program in BlueJ using the following hints a) Create a class named TicketMachine with 3 fields - price, balance and total b) Create a constructor for the class TicketMachine and initialize with the constructor's Parameters are cost and other parameters balance and total is 0 . c) Write an accessor method to return the price. d) Declare a local variable "value" in newBalance( method to change the balance from 0 . e). Show the output screen shot and program
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
