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 16:10
An electrical motor raises a 50kg load at a construct velencity .calculate the power of the motor, if it takes 40sec to raise the load through a height of 24m(take g =9.8n/g)
Answers: 2
question
Engineering, 04.07.2019 18:10
Afluid flows with a velocity field given by v=(x/t)i.. determine the local and convective accelerations when x=3 and t=1.
Answers: 2
question
Engineering, 04.07.2019 18:10
Draw the engineering stress-strain curve for (a) bcc; (b) fcc metals and mark important points.
Answers: 1
question
Engineering, 04.07.2019 18:10
Ifa component is made of two or more materials with different modulus of elasticity (e), it is called a composite member and we calculate the factor·n". mention the formula for calculating n". also, ifn> 1, explain what will happen to the 1. transformed.gi) ifn 1, what will happen to the material when transformed material when
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
Mathematics, 21.09.2020 09:01
question
Mathematics, 21.09.2020 09:01
Questions on the website: 13722363