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 16:10
When copying and pasting text, the first step is move your cursor type the text select the copy command select the paste command
Answers: 2
question
Computers and Technology, 23.06.2019 03:30
How can you repin an image on your pinterest pin board a. click on the "repin" button b. click on the "add pin" button c. click on the "upload a pin" button d. click on the "save pin" button.
Answers: 2
question
Computers and Technology, 24.06.2019 04:10
Write a program that reads a set of floating-point values. ask the user to enter the values, then print • the average of the values. • the smallest of the values. • the largest of the values. • the range, that is the difference between the smallest and largest. of course, you may only prompt for the values once.
Answers: 3
question
Computers and Technology, 24.06.2019 16:00
"gps interaction and cognitive process" respond to the following: imagine that you have been asked to design a gps product that will have voice recognition and bluetooth capability. discuss and conceptualize a user interaction model. predict two (2) problems that may arise in gps products with voice recognition and bluetooth capability. recommend solutions for each of these issues. attention is one of the six cognition processes. when attention is applied to a design, the goal is to make it easier for the end user to quickly locate where he / she should type information on the computer or mobile device screen. compare and contrast how the google search engine and the microsoft bing search engine employ the attention cognition process. provide your opinion as to which search engine better employs the attention cognition process and explain why.
Answers: 3
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, 04.05.2021 02:50
question
Mathematics, 04.05.2021 02:50
question
Mathematics, 04.05.2021 02:50
Questions on the website: 13722367