subject
Computers and Technology, 07.07.2020 23:01 hann647

For this assignment you will create a set of classes from scratch (no provided class files for this assignment) that work together to simulate a police officer issuing a parking ticket. You should design the following classes / functionality within them:The ParkedCar Class: This class should simulate a parked car. The classâs responsibilities are 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, color, and license number of the illegally parked car. To report the amount of the fine, which is $25 for the first hour or part of an hour that the car is illegally parked, plus $10 for every additional hour or part of an hour that the car is illegally parkedTo report the name and badge number of the police officer 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. If so, issue a parking ticket (generate a ParkingTicket object).For each of the above classes, also provide appropriate constructors, setters, getters, and toString method. Make sure your implementation will not create security holes that can allow code outside the class to modify private data inside the class. So when you are dealing with reference variables in setters and getters, make sure you perform deep copy. Note that fine is calculated based on minutes. In our design, the constructor of ParkingTicket shall call method calculateFine() in order to initialize fine.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 22:00
Perform the following tasks: a. create a class named testclass that holds a single private integer field and a public constructor. the only statement in the constructor is one that displays the message “constructing”. write a main()function that instantiates one object of the testclass. save the file as testclass.cpp in the chapter 08 folder. run the program and observe the results. b. write another main()function that instantiates an array of 10 testclass objects. save the file as test class array.c . run this program and observe the results.
Answers: 1
question
Computers and Technology, 23.06.2019 06:00
How can a user delete a drawing object
Answers: 1
question
Computers and Technology, 24.06.2019 12:00
What is a sketch or blueprint of a web page that shows the structure (but not the detailed design) of basic page elements such as the logo, navigation, content, and footer?
Answers: 3
question
Computers and Technology, 24.06.2019 19:30
Can someone who is skilled at coding create me a java chess game. don't copy from online source codes. make it original ! : d
Answers: 1
You know the right answer?
For this assignment you will create a set of classes from scratch (no provided class files for this...
Questions
question
Mathematics, 10.10.2019 23:30
Questions on the website: 13722367