Place your first order with code to get 15% discount right away!

Place First Order Now

Homework Help: Solved 254542

This assignment requires several classes which interact with each other. Two class aggregations are formed. The program will simulate a police officer’s beat where the officer is giving out tickets for parked cars whose meters have expired. The following are the list of classes required for the program and the interaction between them. You must include both a header file and an implementation file for each class. Car class (include Car.h and Car.cpp) Contains the information about a car. Contains data members for the following String make String model String color String license number Default constructor Mutators and accessors for all data members Overload the << operator. ParkedCar class (include ParkedCar.cpp ParkedCar.h) simulates a parked car. Knows which type of car is parked and the number of minutes that the car has been parked. Contains data members for the following Car (instance of the class above) Integer minutes parked. Default constructor Constructor (5 parameters) Copy constructor Mutators and accessors for data members other than Car Overload the << operator ParkingMeter class (include ParkingMeter.h and ParkingMeter.cpp) simulates a parking meter. Should know the number of minutes of parking time that has been purchased. Contains data members for the following Integer minutes purchased to park Default constructor Constructor (1 parameter) Mutator and accessor for data member Overload the << operator ParkingTicket class (include ParkingTicket.h and ParkingTicket.cpp) simulates a parking ticket. Responsibilites are: Report the car information for illegally parked car Report the amount of 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 Contains data members for the following ParkedCar instance of class above Double fine – the calculated parking fine Int minutes – the minutes illegally parked Default constructor Constructor (2 parameter – ParkedCar and integer) Mutator and accessor for all data member Overload the << operator Private method to calculate the fine PoliceOfficer class (include PoliceOffier.h and PoliceOfficer.cpp) Responsibilites are: Know the name and badge number of the officer Examine a ParkedCar object and a ParkingMeter object and determine whether the car’s time has expired Issue a parking ticket (create a ParkingTicket) if the car’s time has expired Contains data members for the following ParkingTicket pointer to an instance of class above String name of officer String badge number of officer Default constructor (correctly initialize all data members) Constructor (2 parameter – name and badge number, all data member initialized correctly) Mutator and accessor for all data member (not ParkingTicket) Overload the << operator Method called patrol which issues (returns) ParkingTicket as a pointer. Has two parameters ParkedCar and ParkingMeter. Main should completely test the interactions of all the classes and all of the method required. The main below shows and example of how the program should work. This is not a complete main for the program. The program should have a car that is not given a ticket, one with a ticket within an hour and another for more than one hour. #include #include "ParkedCar.h" #include "ParkingMeter.h" #include "ParkingTicket.h" #include "PoliceOfficer.h" using namespace std; int main() { ParkingTicket *ticket = nullptr; ParkedCar car("Volkswagen", "1972", "Red", "147RHZM", 125); ParkingMeter meter(60); PoliceOfficer officer("Joe Friday", "4788"); ticket = officer.patrol(car, meter); if (ticket != nullptr) { cout << officer; cout << *ticket; delete ticket; ticket = nullptr; } else cout << "No crimes were committed.n"; return 0; }

Research Tutors Hub

Calculate the price
your order:

275 words
Approximate price
$ 0.00

Basic features

  • Free title page and bibliography
  • Unlimited revisions
  • Plagiarism-free guarantee
  • Money-back guarantee
  • 24/7 support

On-demand options

  • Writer's samples
  • Part-by-part delivery
  • Overnight delivery
  • Copies of used sources
  • Expert Proofreading

Paper format

  • 275 words per page
  • 12pt Arial/Times New Roman
  • Double line spacing
  • Any citation style (APA, MLA, CHicago/Turabian, Havard)

Guaranteed originality

We guarantee 0% plagiarism! Our orders are custom made from scratch. Our team is dedicated to providing you academic papers with zero traces of plagiarism.

Affordable prices

We know how hard it is to pay the bills while being in college, which is why our rates are extremely affordable and within your budget. You will not find any other company that provides the same quality of work for such affordable prices.

Best experts

Our writer are the crème de la crème of the essay writing industry. They are highly qualified in their field of expertise and have extensive experience when it comes to research papers, term essays or any other academic assignment that you may be given!

Calculate the price of your order

You will get a personal manager and a discount.
We'll send you the first draft for approval by at
Total price:

Expert paper writers are just a few clicks away

Place an order in 3 easy steps. Takes less than 5 mins.