Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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 page

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Theory Icdt 99 7th International Conference Jerusalem Israel January 10 12 1999 Proceedings Lncs 1540

Authors: Catriel Beeri ,Peter Buneman

1st Edition

3540654526, 978-3540654520

Students also viewed these Databases questions