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.

Prove that you've made an honest attempt first.

I had already started it and used friend function to calculate the total toll fee,static member function to calculate the total no. of vehicles that passed the tollstation but my codes ain't right.

I had already started it and used friend function to calculate the total toll fee,static member function to calculate the total no. of vehicles that passed the tollstation but my codes ain't right.

What isn't right exactly? Show us a sample of what you have and why/where it's not working to the best of your knowledge.

>but my codes ain't right
Well your "codes" ain't getting fixed unless you post it. What do you want us to do, read your mind?

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.