Answered step by step
Verified Expert Solution
Question
1 Approved Answer
how do I do the getters for parkingticket + setters here + getters here + toString(): String The Parking Ticket class: This class should simulate
how do I do the getters for parkingticket
+ setters here + getters here + toString(): String The Parking Ticket class: This class should simulate a parking ticket. The class's responsibilities are as follows: - To report the make, model, color, license number, and the number of minutes of the illegally parked car (a ParkedCar object) - To report the number of minutes of parking time the car has purchased (a ParkingMeter object) To report the name and badge number of the police officer issuing the ticket (a Police Officer object) To report the illegal minutes parked and 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 parked (to do this job. you can write a calculate Fine() method in this class) FIG: Parking Ticket - car: ParkedCar - meter : Parking Meter - officer : Police Officer - illegalMinutes : int - fine : double + Parking Ticket (c: Parked Car, m: ParkingMeter, o: Police Officer, m:int, calculate Fine(): + Parking Ticket (object2: Parking Ticket): + setters here + getters here - calculate Fine(): void + toString(): String Each of the above classes should include appropriate instance fields, constructors. accessor and mutator methods, and toString method. Cont'd on next pageStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started