Question: THIS NEEDS TO BE DONE IN NETBEANS!! You will NOT have a working program yet. You will have created five .jave files, including a MainClass,

THIS NEEDS TO BE DONE IN NETBEANS!! You will NOT have a working program yet. You will have created five .jave files, including a MainClass, as usual, which will essentially be empty.

PTS_MainClass

ParkingMeter

PoliceOfficer

ParkedCar

ParkingTicket

For this you will design a set of classes that work together to simulate a police officer issuing a parking ticket. The ParkedCar Class: This class should simulate a parked car. The responsibilities of this class are to record the make, model, color, and license number of the car, along with the number of minutes that the car has been parked. The following is a UML class diagram of the class to be developed:

The ParkingMeter Class: This class should simulate a parking meter. The only responsibility of this class is to record the number of minutes purchased. The following is a UML class diagram of the class to be developed:

The ParkingTicket Class: This class should simulate a parking ticket. The class responsibilities are:

- To record the make, model, color, and license number of an illegally parked car. - To record the amount of the fine, which is $25 for the first hour (i.e., any part of the first hour that the car is illegally parked), plus $10 for every additional full or partial hour the the car is illegally parked. - To record the name and badge number of the police officer issuing the ticket.

The following is a UML class diagram of the class to be developed. The ParkedCar and PoliceOfficer classes have a relationship to the ParkingTicket class, so they are also shown:

The PoliceOfficer Class: This class should simulate a police officer inspecting parked cars. The responsibilities of the class are as follows:

- To record the police officers name and badge number. - To examine a ParkedCar object and a ParkingMeter object, and determine whether the parking time of the car has expired. - To issue a parking ticketgenerate a ParkingTicket objectif the time of the car has expired.

The following is a UML figure that shows the relationship for each object:

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!