car rental system, C/C++ Programming

Assignment Help:
Car Rental System
This system tracks cars in a rental company. Each car has a number (assume its plate number), type (small car, four wheel car), and status (rented, available). The main interface of the system as follows:

Choose:
1- Add new car
2- Rent a car
3- Generate report for all cars
4- Generate report for small cars
5- Generate report for four wheel car
6- Exit

Add new car
When the user chooses 1, the program should perform the following tasks:

a. Create/open a cars’ file (call it cars.txt) in append mode.

b. Allow the user to enter the car number, type, and status.


c. Write to the cars file: the car number, the car type, and the car status.

d. Keep asking the user if (s)he want to add new car or to return to main menu.

[hint: car type can be represented internally as 1 for small cars, 2 for 4-wheel ones].

Rent a car
When the user chooses 2, the program should perform the following tasks:
a. The system asks user to choose car type. If there is no car available of that type, system displays message “No car available”. If there are many available cars of that type, it chooses one based on rule first entered first reserved.
b. That chosen car is marked unavailable.
c. Then systems asks user to enter number of days to rent that car. System calculates fees as follows :
o Rate is QR70 per day for small car, and QR100 for 4wheel cars.
o If customer rents a car for 7 to 30 days, he gets 5% discount.
o If customer rents a car for more than 30 days, he gets 10% discount.
Generate report for all cars
When the user chooses 3, the program should perform the following tasks:

a. Read the cars file. [The program can load the data that is read from the data file into arrays].

b. Count the number of available small cars and the number of available 4-wheel cars.
c. Generate a screen report that prints the information for each car. The screen report should also print the number of available cars(small and 4-wheel).

Generate report for small cars
When the user chooses 4, the program should perform the same tasks of choice 3, but for small cars only.

Note that the program can read from the car file [or from the loaded arrays].


Generate report for 4-Wheel cars
When the user chooses 5, the program should perform the same tasks of choice 4, but for 4-Wheel cars only.


Exit
When the user chooses 6, the program should end. Otherwise, your program should be user friendly and always loop back to the main menu after completing a choice.


Related Discussions:- car rental system

Program to determine the number is prime or not, Write a function to determ...

Write a function to determine whether a number is prime: it will return true if the input is prime and false otherwise. Use it to see whether -7 is prime.

Explain automatic variables, Automatic Variables Automatic variables ar...

Automatic Variables Automatic variables are variable which are explained within the functions. They lose their value when the function terminates. It can be accessed only in th

Develop stocastic expert advisor, Project Description: Need to develop a...

Project Description: Need to develop an expert advisor base on sthocastic oscilator with my own setting.. Very basic touch line OB/OS only but on my setting n condition Skill

Can any constructor throw an exception?, Can any constructor throw an excep...

Can any constructor throw an exception? How to handle error while the constructor fails?

String-classes-constructors and member functions, Objective Using C++ s...

Objective Using C++ string, classes, constructors and member functions. Task A Write a program (book.cpp) to store a list of book titles and the published dates. Your pro

Create a program for decision structure , Create the following program or p...

Create the following program or propose one of your own. The program must include at least one of each of the following. Decision structure Repetitive structure fu

Loop, Write a program that writes your name on the monitor ten times. Write...

Write a program that writes your name on the monitor ten times. Write this program three times, once with each looping method.

How to implement tr- 106 protocol, Environment - C, Linux Duration - De...

Environment - C, Linux Duration - December 2006 to Feb 2007 Description - TR-106 specifies a generic data model template applicable for all TR-069 enabled devices. Adde

Minimum shelves, write a c++ program, that finds the minimum total number o...

write a c++ program, that finds the minimum total number of shelves, including the initial one, required for this loading process.

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd