Hi I'm still in the basics in c++ and I really need some help in coding my 1st semester's project.
I am required to create a program that is to be used at a tollstation to keep account on the number of vehicles using the road, the fees charged and the total number of fees collected.
The program should have a base class 'vehicle' that stores the vehicle driver's name, number plate and toll fee paid. It should have two derived classes; 'saloon' for small vehicles with special characteristic cubic capacity(cc) and 'truck' for large vehicles with special characterictic of weight.
The program should allow the tollclerks to choose the number of vehicles they want to enter at any one time and choose whether its a truck or a saloon. If they choose to enter details,they should be able to enter the driver's name and number plate of the vehicle.
For a saloon they should enter cc and for a truck they should enter weight.
Fee paid should be computed from the cc in a saloon car and from the weight in a truck.
For a saloon car,if cc is <=1200, fee paid is shs 1500 and if cc>1200, fee paid is shs 2000.
For a truck, if weight<=1000kg the fee is weight*50 and if weight>1000kg, the fee is weight*100.
The program should display details of vehicles entered, number of vehicles that passed the tollstation and the total toll fee collected.It should have friendly user interface that allows for:-choosing to enter vehicle details.
" the number of vehicles to enter.
" to enter a saloon or truck.
" to display the details of vehicles entered.
" to display the number of vehicles and total fees collected.
Any assistance accorded is highly appreciated.Thankyou.
KK Murage 0 Newbie Poster
Narue 5,707 Bad Cop Team Colleague
KK Murage 0 Newbie Poster
CoolGamer48 65 Posting Pro in Training
Narue 5,707 Bad Cop Team Colleague
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.