Question: Write a C + + program that reads the following inputs: i ) ID number ii ) Driving speed iii ) Vehicle type B for
Write a C program that reads the following inputs:
i ID number
ii Driving speed
iii Vehicle type B for bus drivers and C for car drivers
Calculate a summon depends on the kind of vehicle:
i Bus: Driving speed ;
ii Car: Driving speed ;
Requirements:
Must have a base class with common members: ID Number and Driving Speed
Must have two derived class. One for Bus, and another for Car
Must have a constructor that print for example "Offence Committed on Tuesday Mei At Jalan Petaling"
Error checking of all the three inputs ID Number, Driving Speed, and Vehicle Type
Report must be produced in an output file called "Offence.txt
Assumptions:
All the drivers are driving more than their legal speed
These twenty drivers operate either buses or cars
There may have been a mixup regarding the automobiles used in the offense. As an illustration, consider cases B C and B once more
Report: "Offence.txt
i Formatted with header
ii Report must divided into two: Bus and Car and sorted by the speed
iii Show a total summon for the day
iv Show the highest driving speed of both vehicle type
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
