Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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 (10 drivers) and C for car (10drivers)
Calculate a summon depends on the kind of vehicle:
i) Bus: Driving speed -90*100;
ii) Car: Driving speed -110*100;
Requirements:
1) Must have a base class with common members: ID Number and Driving Speed
2) Must have two derived class. One for Bus, and another for Car
3) Must have a constructor that print for example "Offence Committed on Tuesday 21 Mei 2022 At Jalan Petaling"
4) Error checking of all the three inputs (ID Number, Driving Speed, and Vehicle Type)
5) Report must be produced in an output file called "Offence.txt"
Assumptions:
1) All the 20 drivers are driving more than their legal speed
2) These twenty drivers operate either buses or cars
3) 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

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

SQL Server Query Performance Tuning

Authors: Sajal Dam, Grant Fritchey

4th Edition

1430267429, 9781430267423

More Books

Students also viewed these Databases questions

Question

How to reverse a Armstrong number by using double linked list ?

Answered: 1 week ago