Question: The programs needs to have the user input For this question, you will design a set of classes that work together to simulate a police

The programs needs to have the user input
For this question, you will design a set of classes that work together to simulate a police officer issuing a parking ticket. You should design the following classes: The ParkedCar class: This class should simulate a parked car. The class's only responsibility is as follows: To know the car's make, model, color, license number, and the number of minutes that the car has been parked. The ParkingMeter class: This class should simulate a parking meter. The class's only responsibility is as follows To know the number of minutes of parking time that has been purchased The ParkingTicket class: This class should simulate a parking ticket. The class's responsibilities are as follows: .To report the make, model, coloe, and license number of the illegally parked car .To report the amount of fine, which is S25 for the first hour or part of an hour that the car is illegally parked, plus S10 for every additinal hour oe part of an hour that the car is illegally parked. .To report the name and badge number of the police office issuing the ticket. The PoliceOfficer class: This class should simulate a police officer inspecting parked cars. The class's responsibilities are as follows: To know the police officer's name and badge number .To examine a ParkedCar object and a ParkingMeter object, and determine whether the car's time has expired. To issue a parking ticket (generate a ParkingTicket object), if the car's time has expired. Write a Demo class that demonstrates how these classes collaborate. Essentially in the demo class you will do the following: 1. Enter the make (e g. Toyota) of the car 2. Enter the model (e.g. Camry) of the car 3. Enter the color (e-g. White) of the car 4. Enter the license number (e.g. HRU1700) of the car S. Enter how much time you have paid for (eg.1 (hour) 6. Enter how long you have parked at the meter (e.g. 1.15 (hour) . Calculate the fine and display output something like below: WARNING PARKING VOILATION You have paid for: 1 haurls) and have been parked for:1.15 hourfs) Your fine is $ 25.0 Officers Name: Big Tony Officers Bacge Number: 2547954 Cars Make: Toyata Cars Model No: Camry Car Colour: White Cars Licence Na: HRU1700
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
