Question: please use Java to finish this problem and write a test function to test it. thanks!!! Design and implement a class 'ParkingMeter' for parking meters.
please use Java to finish this problem and write a test function to test it. thanks!!!
Design and implement a class 'ParkingMeter' for parking meters. The class has three member variables: 'maxTime' for maximum parking minutes, 'rate' for parking rate (minutes per quarter), and 'time' for remaining parking time. The class should provide member functions for the client to insert quarters and check remaining parting time. The constructor should take the maximum parking minutes and the rate.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
