Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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

Harness The Power Of Big Data The IBM Big Data Platform

Authors: Paul Zikopoulos, David Corrigan James Giles Thomas Deutsch Krishnan Parasuraman Dirk DeRoos Paul Zikopoulos

1st Edition

0071808183, 9780071808187

More Books

Students also viewed these Databases questions

Question

What limitations are placed on miscellaneous itemized deductions?

Answered: 1 week ago

Question

What coaching do you currently provide for your leaders?

Answered: 1 week ago