Design classes that work together to simulate parking ticket

Assignment Help C/C++ Programming
Reference no: EM131666311

Assignment: Parking Ticket Simulator

For this assignment you will design a set of classes that work together to simulate a police officer issuing a parking ticket. The classes you should design are:

• The ParkedCar Class: This class should simulate a parked car. The class's responsibilities are:

- To know the car's, make, model, color, license number, and the number of minutes that the car has been parked.

• The ParkingMeter Class: This class should simulate a parking meter. The class's only responsibility is:

- To know the number of minutes of parking time that has bene purchased.

• The ParkingTicketClass: The class should simulate a parking ticket. The class's responsibilities are:

- To report the make, model, color, and license number of the illegally parked car

- To report the amount of the fine which is $25 for the first hour or part of an hour that the car is illegally parked, plus $01 for every additional hour or part of an hour that the car is illegally parked part of an hour that the car is illegally parked.

- To report the name and badge number of the police officer issuing the ticket.

• The PoliceOfficerClass: This class should simulate a police officer inspecting parked cars. The class's responsibility are:

- To know the police office's name and badge number

- To examine a ParkedCar object and a ParkingMeter object, and determine whether the car's time has expired.

- To issue a parking ticket (generate a ParkingTicket object) if the car's time has expired.

Write a program that demonstrates hoe the classescollaborate.

Attachment:- Parking-Ticket-Code.zip

Reference no: EM131666311

Questions Cloud

What must be true about the quantities of np and nq : You are performing a hypothesis test of a single population proportion. What must be true about the quantities of np and nq?
Can doe be charged with any crimes as it relates to bobby : Can Doe be charged with any crimes as it relates to Jimmy, If so, for what crime, If not, why
Bigger problem for the middle east : Is water scarcity of the abundance of oil a bigger problem for the Middle East? How has the history of the 20th century shaped the current strife in the Middle?
What must you assume about the distribution of the data : You are performing a hypothesis test of a single population mean using a Student's t-distribution. What must you assume about the distribution of the data?
Design classes that work together to simulate parking ticket : For this assignment you will design a set of classes that work together to simulate a police officer issuing a parking ticket. The classes you should design are
Discuss some advantages and disadvantages to proceeding : Discuss some advantages and disadvantages to proceeding with a federal criminal prosecution as opposed to a state prosecution
What is the name of the extensive groundwater : What is the name of the extensive groundwater aquifer found beneath the southern plains A-pecos B- Ogalla C- new Madrid D Nazca
Discuss about the standard deviation : A population has a mean is 25 and a standard deviation of five. The sample mean is 24, and the sample size is 108.
Natural physical and cultural landscapes : Describe the changing American landscape, consider the natural physical and cultural landscapes.

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Program that asks the user to enter the number of miles

Write a C - program that asks the user to enter the number of miles traveled and the number of gallons of gasoline consumed. It should then calculate and display the miles-per-gallon value. Confine your output to 1 decimal place.

  Loops in what ways are the initialization repetition test

in what ways are the initialization repetition test and update steps alike for a sentinel-controlled loop and an

  Set of nested for loops

Use a set of nested for loops to display the letters "R" and "B" in patterns as they might appear on a checkerboard.

  Display a count of the number of vowels

Write a program that accepts a word into a character array string variable. Display a count of the number of letters in the word.

  Program that determines the gross pay and net pay

Write a C program that determines the gross pay and net pay for each of up to ten employees, then prints out a payroll summary report

  Write a function to compute the average amount of food eaten

Write a function to compute the average amount of food eaten per day by the whole family of monkeys; write a function to compute the least amount of food eaten by any monkey.

  Create an array of objects from the provided code

Create an array of objects from the provided code and run a for loop to assign strings and numbers. In this assignment, I will need to see the main function. Make sure there is a default constructor.

  Write a program that incorporates the given features

The assignment is to write a program that incorporates the above features. The entries in the phonebook are to be represented with a simple class.

  C string and two int reference parameters

Write a complete function, not an entire program, that has a C string and two int reference parameters (call them a and b), returning nothing.

  A minivan has two sliding doors

A minivan has two sliding doors.  Each door can be opened by either a dashboard switch, its inside handle, or its outside handle. However, the inside handles do not work if a child lock switch is activated.  In order for the sliding doors to open, th..

  Draw a two-dimensional house seen from the front

Draw a two-dimensional house seen from the front, the way a child would: with a door, two windows, and a roof with a chimney. Feel free to add details; mabe have "smoke" come out of the chimney.

  Write program to simulate rolling of two dice hundred times

Design, implement, test, and debug a C# program to simulate the rolling of two dice 100 times. Whenever the two dice display the same number, the program should show the roll sequence number.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd