THIS PROGRAM MUST BE COMPLETED IN C++ It is important to separate the different
ID: 3724298 • Letter: T
Question
THIS PROGRAM MUST BE COMPLETED IN C++
It is important to separate the different classes into separate files. Also, there must be a "main" file that will allow input from the user.
The aim of this project is to design and implement a computerized Car Rental Management System for a company called COEN244Cars. The company rents two types of cars: standard and luxury cars. A car is identified by a car identification number (int), a type (string), and a flag that indicates whether the car is currently available or not. The company distinguishes between three types of customers: regular customers, corporate customers, and VIPs (Very Important Persons). A customer is identified by a customer number (int), name (string), address (string), and a telephone number (string). A corporate customer has the following additional attributes: The name (string) and address of the customer's company (string) Furthermore, the customers have different types of privileges. A regular customer can only rent standard cars for a maximum period of 20 days. Corporate customers and VIPs can rent all types of cars. However, corporate customers can rent a car for a maximum period of 35 days, whereas VIPs can rent a car for a maximum period of 45 days. Using your system, the COEN244Car company should be able to do the following tasks: a) Add a new car to the inventory b) Remove an existing car from the inventory c) Register new customers d) Remove a given customer from the customer's list e) Rent a car to a customer f)Return a car and update car information g) Return the privileges of a particular customer. h) Change the privileges (e.g., modify the rental period for regular customers to 25) i) Determine whether a given car is rented or not j) Determine whether a given customer has rented a car k) Determine whether a given car is a regular customer, corporate, or VIP. 1) Determine the types of cars rented by a customer of a given company Question 1 (80 marks) A. Implement the class or classes that represent the car information B. Implement the class or classes that represent the company's customers. C. Implement the class CarRentalManagement that supports the functions (a) to (1) Notes: Provide all the necessary data members, constructors, copy constructors, destructors and member functions.Explanation / Answer
#include <cstdlib>
#include <iostream>
#include <string>
int price;
using namespace std;
void carchoice (char choice, int price)
{
using namespace std;
cout<< " " << " CAR RENTAL " << " " <<endl;
cout<< " " << "There are 4 cars to choose from" << " " << endl;
cout<< "A.. Vauxhall Meriva at 30.00/day" << " " << endl;
cout<< "B.. Vauxhall Astra at 40.00/day" << " " << endl;
cout<< "C.. Vauxhall Vectra at 50.00/day" << " " << endl;
cout<< "D.. Vauxhall Zafira at 60.00/day" << " " << endl;
switch (choice)
{
case 'A':
price = 30;
break;
case 'B':
price = 40;
break;
case 'C':
price = 50;
break;
case 'D':
price = 60;
break;
}
}
int main ()
{
char choice;
int days;
int price;
cout << " Which car would you like to rent (A,B, C or D)" << " " << endl;
cin >> choice;
cout << " How many days would you like to hire the car for" << " " << endl;
cin >> days;
cout<< " you have chosen car.." << choice << " " << "and the price per day is.." << " " << price << endl;
cout << " This will cost.. " << endl;
system ("PAUSE");
return 0;
}
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.