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, 04.07.2019 08:10
Which of the following is an easy way to remember the modified “x” tire rotation? a. nondrive wheels straight, cross the drive wheels b. drive wheels straight, cross the nondrive wheels c. drive wheels crossed, nondrive wheels straight d. drive wheels crossed, nondrive wheels crossed
Answers: 1
question
Engineering, 04.07.2019 18:10
Aplate clutch has a single pair of mating friction surfaces 250-mm od by 175-mm id. the mean value of the coefficient of friction is 0.30, and the actuating force is 4 kn. a) find the maximum pressure and the torque capacity using the uniform-wear model. b) find the maximum pressure and the torque capacity using the uniform-pressure model.
Answers: 3
question
Engineering, 04.07.2019 18:10
Ajournal bearing has a journal diameter of 3.250 in with a unilateral tolerance of 20.003 in. the bushing bore has a diameter of 3.256 in and a unilateral tolerance of 0.004 in. the bushing is 2.8 in long and supports a 700-lbf load. the journal speed is 900 rev/min. find the minimum oil film thickness and the maximum film pressure for both sae 20 and sae 20w-30 lubricants, for the tightest assembly if the operating film temperature is 160°f. a computer code is appropriate for solving this problem.
Answers: 3
question
Engineering, 04.07.2019 18:10
Manometers are good examples of measuring instruments, nowadays they are not as common as before. a)-capacitive probe gauges b)-gravitational gauges deformation ) gauges d)-digital gauges
Answers: 1
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
Biology, 04.12.2020 20:00
question
Law, 04.12.2020 20:00
question
History, 04.12.2020 20:00
question
English, 04.12.2020 20:00
question
Mathematics, 04.12.2020 20:00
question
English, 04.12.2020 20:00
Questions on the website: 13722367