SlideShare a Scribd company logo
Parking ticket simulator program
The problem
For this assignment you will design a set of classes that work together to simulate a police officer
issuing a parking ticket. You should design the following classes:
The ParkedCar Class: This class should simulate a parked car. The class's responsibilities are
as follows:
 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 as follows:
 To know the number of minutes of parking time that has been purchased.
The PoliceOfficer Class: This class should simulate a police officer inspecting parked cars. The
class's responsibilities are as follows:
 To know the police officer'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
The ParkingTicket Class: This class should simulate a parking ticket. The class's
responsibilities are as follows:
 To report the make, model, color, and license number of the illegally parked car
 To report the amount of the fine, which is Rs. 200 for the first hour or part of an hour that
the car is illegally parked, plus Rs100 for every additional hour or part hour that the car is
illegally parked, plus Rsl00 for every additional hour or part of an hour that the car is
illegally parked
 To report the name and badge number of the police officer issuing the ticket
Write a program that demonstrates how these classes collaborate.

More Related Content

Similar to Parking ticket simulator program

SmartPark-The smarter way
SmartPark-The smarter waySmartPark-The smarter way
SmartPark-The smarter way
Prateek Verma
 
CARVANA - Predicting the purchase quality in car
CARVANA - Predicting the  purchase quality in carCARVANA - Predicting the  purchase quality in car
CARVANA - Predicting the purchase quality in car
ShankarPrasaadRajama
 
Anthony reality series project
Anthony reality series projectAnthony reality series project
Anthony reality series project
Chadwick International School
 
car showroom management project SE_!
car showroom management project SE_!car showroom management project SE_!
car showroom management project SE_!
Shoaib Ch
 
Database Analysis
Database AnalysisDatabase Analysis
Database Analysis
SabahtHussein
 
Udacity project: Vehicle detection and tracking
Udacity project: Vehicle detection and trackingUdacity project: Vehicle detection and tracking
Udacity project: Vehicle detection and tracking
Bill Kromydas
 
Clean Vehicle Guided Tour
Clean Vehicle Guided TourClean Vehicle Guided Tour
Clean Vehicle Guided Tourcleanvehicle
 
Iaetsd fpga implementation of various security based tollgate system using anpr
Iaetsd fpga implementation of various security based tollgate system using anprIaetsd fpga implementation of various security based tollgate system using anpr
Iaetsd fpga implementation of various security based tollgate system using anpr
Iaetsd Iaetsd
 
#include iostream#include string#include iomanip#inclu.docx
#include iostream#include string#include iomanip#inclu.docx#include iostream#include string#include iomanip#inclu.docx
#include iostream#include string#include iomanip#inclu.docx
mayank272369
 
CAR PARKING SYSTEM USING VISUAL STUDIO C++ (OPERATING SYSTEM MINI PROJECT )
CAR PARKING SYSTEM USING VISUAL STUDIO C++ (OPERATING SYSTEM MINI PROJECT ) CAR PARKING SYSTEM USING VISUAL STUDIO C++ (OPERATING SYSTEM MINI PROJECT )
CAR PARKING SYSTEM USING VISUAL STUDIO C++ (OPERATING SYSTEM MINI PROJECT )
Mauryasuraj98
 
Tint My Ride
Tint My RideTint My Ride
Tint My Ride
thomasmso
 
Assignment DIn Problem D1 we will use a file to contain the dat.pdf
Assignment DIn Problem D1 we will use a file to contain the dat.pdfAssignment DIn Problem D1 we will use a file to contain the dat.pdf
Assignment DIn Problem D1 we will use a file to contain the dat.pdf
fasttrackscardecors
 
Sen942 automated parking structure
Sen942 automated parking structureSen942 automated parking structure
Sen942 automated parking structure
dbadiani
 
Vehicle Number Plate Recognition using MATLAB
Vehicle Number Plate Recognition using MATLABVehicle Number Plate Recognition using MATLAB
Vehicle Number Plate Recognition using MATLAB
AI Publications
 
IRJET- Automobile Resale System using Machine Learning
IRJET- Automobile Resale System using Machine LearningIRJET- Automobile Resale System using Machine Learning
IRJET- Automobile Resale System using Machine Learning
IRJET Journal
 
Database Analysis
Database AnalysisDatabase Analysis
Database Analysis
SabahtHussein
 
Second Hand Cars in the Philippines: A Buyer's Guide
Second Hand Cars in the Philippines: A Buyer's GuideSecond Hand Cars in the Philippines: A Buyer's Guide
Second Hand Cars in the Philippines: A Buyer's Guide
For The Women Foundation
 
A step-by-step guide to fighting NYC parking tickets
A step-by-step guide to fighting NYC parking tickets A step-by-step guide to fighting NYC parking tickets
A step-by-step guide to fighting NYC parking tickets
Lawrence Berezin
 
Car mate - Company Car-Pool app Idea
Car mate - Company Car-Pool app IdeaCar mate - Company Car-Pool app Idea
Car mate - Company Car-Pool app Idea
Sarath Karunakaran
 

Similar to Parking ticket simulator program (20)

SmartPark-The smarter way
SmartPark-The smarter waySmartPark-The smarter way
SmartPark-The smarter way
 
CARVANA - Predicting the purchase quality in car
CARVANA - Predicting the  purchase quality in carCARVANA - Predicting the  purchase quality in car
CARVANA - Predicting the purchase quality in car
 
Car Capture
Car CaptureCar Capture
Car Capture
 
Anthony reality series project
Anthony reality series projectAnthony reality series project
Anthony reality series project
 
car showroom management project SE_!
car showroom management project SE_!car showroom management project SE_!
car showroom management project SE_!
 
Database Analysis
Database AnalysisDatabase Analysis
Database Analysis
 
Udacity project: Vehicle detection and tracking
Udacity project: Vehicle detection and trackingUdacity project: Vehicle detection and tracking
Udacity project: Vehicle detection and tracking
 
Clean Vehicle Guided Tour
Clean Vehicle Guided TourClean Vehicle Guided Tour
Clean Vehicle Guided Tour
 
Iaetsd fpga implementation of various security based tollgate system using anpr
Iaetsd fpga implementation of various security based tollgate system using anprIaetsd fpga implementation of various security based tollgate system using anpr
Iaetsd fpga implementation of various security based tollgate system using anpr
 
#include iostream#include string#include iomanip#inclu.docx
#include iostream#include string#include iomanip#inclu.docx#include iostream#include string#include iomanip#inclu.docx
#include iostream#include string#include iomanip#inclu.docx
 
CAR PARKING SYSTEM USING VISUAL STUDIO C++ (OPERATING SYSTEM MINI PROJECT )
CAR PARKING SYSTEM USING VISUAL STUDIO C++ (OPERATING SYSTEM MINI PROJECT ) CAR PARKING SYSTEM USING VISUAL STUDIO C++ (OPERATING SYSTEM MINI PROJECT )
CAR PARKING SYSTEM USING VISUAL STUDIO C++ (OPERATING SYSTEM MINI PROJECT )
 
Tint My Ride
Tint My RideTint My Ride
Tint My Ride
 
Assignment DIn Problem D1 we will use a file to contain the dat.pdf
Assignment DIn Problem D1 we will use a file to contain the dat.pdfAssignment DIn Problem D1 we will use a file to contain the dat.pdf
Assignment DIn Problem D1 we will use a file to contain the dat.pdf
 
Sen942 automated parking structure
Sen942 automated parking structureSen942 automated parking structure
Sen942 automated parking structure
 
Vehicle Number Plate Recognition using MATLAB
Vehicle Number Plate Recognition using MATLABVehicle Number Plate Recognition using MATLAB
Vehicle Number Plate Recognition using MATLAB
 
IRJET- Automobile Resale System using Machine Learning
IRJET- Automobile Resale System using Machine LearningIRJET- Automobile Resale System using Machine Learning
IRJET- Automobile Resale System using Machine Learning
 
Database Analysis
Database AnalysisDatabase Analysis
Database Analysis
 
Second Hand Cars in the Philippines: A Buyer's Guide
Second Hand Cars in the Philippines: A Buyer's GuideSecond Hand Cars in the Philippines: A Buyer's Guide
Second Hand Cars in the Philippines: A Buyer's Guide
 
A step-by-step guide to fighting NYC parking tickets
A step-by-step guide to fighting NYC parking tickets A step-by-step guide to fighting NYC parking tickets
A step-by-step guide to fighting NYC parking tickets
 
Car mate - Company Car-Pool app Idea
Car mate - Company Car-Pool app IdeaCar mate - Company Car-Pool app Idea
Car mate - Company Car-Pool app Idea
 

More from Daman Toor

Lab exam 5_5_15
Lab exam 5_5_15Lab exam 5_5_15
Lab exam 5_5_15
Daman Toor
 
Lab exam setb_5_5_2015
Lab exam setb_5_5_2015Lab exam setb_5_5_2015
Lab exam setb_5_5_2015
Daman Toor
 
Nested class
Nested classNested class
Nested class
Daman Toor
 
Inheritance1
Inheritance1Inheritance1
Inheritance1
Daman Toor
 
Inheritance
InheritanceInheritance
Inheritance
Daman Toor
 
Lab exp (creating classes and objects)
Lab exp (creating classes and objects)Lab exp (creating classes and objects)
Lab exp (creating classes and objects)
Daman Toor
 
Practice
PracticePractice
Practice
Daman Toor
 
Lab exp (declaring classes)
Lab exp (declaring classes)Lab exp (declaring classes)
Lab exp (declaring classes)
Daman Toor
 
Lab exp declaring arrays)
Lab exp declaring arrays)Lab exp declaring arrays)
Lab exp declaring arrays)
Daman Toor
 
Java assignment 1
Java assignment 1Java assignment 1
Java assignment 1
Daman Toor
 
Operators
OperatorsOperators
Operators
Daman Toor
 
Identifiers, keywords and types
Identifiers, keywords and typesIdentifiers, keywords and types
Identifiers, keywords and types
Daman Toor
 
Classes & object
Classes & objectClasses & object
Classes & object
Daman Toor
 

More from Daman Toor (13)

Lab exam 5_5_15
Lab exam 5_5_15Lab exam 5_5_15
Lab exam 5_5_15
 
Lab exam setb_5_5_2015
Lab exam setb_5_5_2015Lab exam setb_5_5_2015
Lab exam setb_5_5_2015
 
Nested class
Nested classNested class
Nested class
 
Inheritance1
Inheritance1Inheritance1
Inheritance1
 
Inheritance
InheritanceInheritance
Inheritance
 
Lab exp (creating classes and objects)
Lab exp (creating classes and objects)Lab exp (creating classes and objects)
Lab exp (creating classes and objects)
 
Practice
PracticePractice
Practice
 
Lab exp (declaring classes)
Lab exp (declaring classes)Lab exp (declaring classes)
Lab exp (declaring classes)
 
Lab exp declaring arrays)
Lab exp declaring arrays)Lab exp declaring arrays)
Lab exp declaring arrays)
 
Java assignment 1
Java assignment 1Java assignment 1
Java assignment 1
 
Operators
OperatorsOperators
Operators
 
Identifiers, keywords and types
Identifiers, keywords and typesIdentifiers, keywords and types
Identifiers, keywords and types
 
Classes & object
Classes & objectClasses & object
Classes & object
 

Recently uploaded

The Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdfThe Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdf
Pipe Restoration Solutions
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
Massimo Talia
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Teleport Manpower Consultant
 
CME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional ElectiveCME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional Elective
karthi keyan
 
Immunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary AttacksImmunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary Attacks
gerogepatton
 
Railway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdfRailway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdf
TeeVichai
 
WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234
AafreenAbuthahir2
 
AP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specificAP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specific
BrazilAccount1
 
Student information management system project report ii.pdf
Student information management system project report ii.pdfStudent information management system project report ii.pdf
Student information management system project report ii.pdf
Kamal Acharya
 
English lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdfEnglish lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdf
BrazilAccount1
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
Osamah Alsalih
 
Standard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - NeometrixStandard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - Neometrix
Neometrix_Engineering_Pvt_Ltd
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
fxintegritypublishin
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation & Control
 
power quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptxpower quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptx
ViniHema
 
The role of big data in decision making.
The role of big data in decision making.The role of big data in decision making.
The role of big data in decision making.
ankuprajapati0525
 
Hierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power SystemHierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power System
Kerry Sado
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
SamSarthak3
 
HYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generationHYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generation
Robbie Edward Sayers
 
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxCFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
R&R Consult
 

Recently uploaded (20)

The Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdfThe Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdf
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
 
CME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional ElectiveCME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional Elective
 
Immunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary AttacksImmunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary Attacks
 
Railway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdfRailway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdf
 
WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234
 
AP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specificAP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specific
 
Student information management system project report ii.pdf
Student information management system project report ii.pdfStudent information management system project report ii.pdf
Student information management system project report ii.pdf
 
English lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdfEnglish lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdf
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
 
Standard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - NeometrixStandard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - Neometrix
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
 
power quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptxpower quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptx
 
The role of big data in decision making.
The role of big data in decision making.The role of big data in decision making.
The role of big data in decision making.
 
Hierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power SystemHierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power System
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
 
HYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generationHYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generation
 
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxCFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
 

Parking ticket simulator program

  • 1. Parking ticket simulator program The problem For this assignment you will design a set of classes that work together to simulate a police officer issuing a parking ticket. You should design the following classes: The ParkedCar Class: This class should simulate a parked car. The class's responsibilities are as follows:  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 as follows:  To know the number of minutes of parking time that has been purchased. The PoliceOfficer Class: This class should simulate a police officer inspecting parked cars. The class's responsibilities are as follows:  To know the police officer'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 The ParkingTicket Class: This class should simulate a parking ticket. The class's responsibilities are as follows:  To report the make, model, color, and license number of the illegally parked car  To report the amount of the fine, which is Rs. 200 for the first hour or part of an hour that the car is illegally parked, plus Rs100 for every additional hour or part hour that the car is illegally parked, plus Rsl00 for every additional hour or part of an hour that the car is illegally parked  To report the name and badge number of the police officer issuing the ticket Write a program that demonstrates how these classes collaborate.