subject
Engineering, 12.12.2019 03:31 njorda7211

For this assignment 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 parked car class: this class should simulate a parked car. the class’s responsibilities are as follows: i. to know the car’s make, model, color, license number, and the number of minutes that the car has been parked. the parking meter class: this class should simulate a parking meter. the class’s only responsibility is as follows: i. 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: i. to report the make, model, color, and license number of the illegally parked car. ii. 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 parkediii. to report the name and badge number of the police officer issuing the ticket. the police officer class: this class should simulate a police officer inspecting parked cars. i. the class’s responsibilities are as follows: ii. to know the police officer’s name and badge number. iii. 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: 1

Another question on Engineering

question
Engineering, 03.07.2019 14:10
Line joining liquid phase with liquid and solid phase mixture is known as: a) liquidus b) solidus c) tie line d) none of the mentioned
Answers: 2
question
Engineering, 04.07.2019 18:10
Water in a partially filled large tank is to be supplied to the roof top, which is 8 m above the water level in the tank, through a 2.2-cm-internal-diameter pipe by maintaining a constant air pressure of 300 kpa (gage) in the tank. if the head loss in the piping is 2 m of water, determine the discharge rate of the supply of water to the roof top in liters per second.
Answers: 3
question
Engineering, 04.07.2019 18:20
Aquick transition of the operating speed of a shaft from its critical speed will whirl amplitude. (a) increase (b) limit (c) not affect (d) zero
Answers: 2
question
Engineering, 04.07.2019 19:10
How to increase the thermal officiency of an ideal simple rankino cycle? among these methods, which one is the best and why?
Answers: 2
You know the right answer?
For this assignment you will design a set of classes that work together to simulate a police officer...
Questions
question
Physics, 01.02.2021 16:10
question
English, 01.02.2021 16:10
question
Mathematics, 01.02.2021 16:10
question
Mathematics, 01.02.2021 16:10
Questions on the website: 13722363