Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I need some help with just the first ParkingTicket constructor and the private calculateFine method in the parkingticket class. the last bullet point details how
I need some help with just the first ParkingTicket constructor and the private calculateFine method in the parkingticket class.
the last bullet point details how to get the fine. for the constructor I just don't remember how to call a method as a parameter.
TU Uw We pulice oricer's name and badge number Police Officer - officer Name : String -badgeNumber : String + Police Officer (name : String. number : String): + Police Officer (object2: Police Officer): + 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 Parking Meter 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) Parking Ticket - car: ParkedCar - meter : ParkingMeter - 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 to String 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