Engineering
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.

answer
Answers: 1

Other questions on the subject: Engineering

image
Engineering, 03.07.2019 14:10, aliceohern
The y form of iron is known as: a) ferrite b) cementite c) perlite d) austenite
Answers: 3
image
Engineering, 04.07.2019 18:10, settasav9641
Abrake has a normal braking torque of 2.8 kip in and heat-dissipating cast-iron surfaces whose mass is 40 lbm. suppose a load is brought to rest in 8.0 s from an initial angular speed of 1600 rev/min using the normal braking torque; estimate the temperature rise of the heat dissipating surfaces.
Answers: 3
image
Engineering, 04.07.2019 18:10, wyattlb97
Water at the rate of 1 kg/s is forced through a tube with a 2.5 cm inner diameter. the inlet water temperature is 15°c, and the outlet water temperature is 50°c. the tube wall temperature is 14°c higher than the local water temperature all along the length of the tube. what is the length of the tube?
Answers: 3
image
Engineering, 04.07.2019 18:20, DroctorWellsfan
Inspection for bearing condition will include: (clo4) a)-color b)-smell c)-size d)-none of the above
Answers: 1
Do you know the correct answer?
For this assignment you will design a set of classes that work together to simulate a police officer...

Questions in other subjects: