Skip to content

kuldeepthakare7/CAR_RENTAL_SYSTEM

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 

Repository files navigation

CS253_CAR-RENTAL-SYSTEM

Assumptions :-

  1. Initially only 10 customers,10 employees, 10 cars and 1 manager in the database.
  • The database is of form of a vector of classes of 10 elements initially.
  • The CUSTOMER Database consists of:- a Vector of class Customer.

The Customer_db class includes :-

  • CustomerID which is an unique integer assigned to each customer. This I'd is used to find each customer as I have used the same for indexing the Customer Vector.
  • Customer_Name of type string representing name of each customer.
  • Customer_Record which includes how much good the record of each customer is on the scale of 100.
  • Fine_dues which includes the rent on each customer.
  • vector cars_rented which includes id of all the cars rented by the custer till now.
  • vector Return_dates which stores the pair of id of car rented and date of its return guarenteed by the customer.
  • Customer_db() constructor which is used for assignment of id,name,cars_rented,Return_dates,Fine_dues.
  • other public function are also inlcuded for returning the above given values when asked by a customer or a manager.

The Employee_db class is same as Customer_db which has the same functions and elemets as customer a little bit change is in renting only.

The Car_db class includes :-

  • car_no which is unique integer assigned to each car, here I have used this number for indexing the CARS vector.
  • availaibility which is 0 or 1, 0 if not availaible and 1 if availaible.
  • rented_from which is a string giving the date from which the car will be availaible for renting.
  • Car_rent_price which is the per day price of when the car is rented.
  • Car_name id the name of each car.
  • Car_db() constructor which is used for assignment of car_number, availability_status, car_name,rent_price, rented_from date.
  • other public functions are also included for editing the CARS vector, find a car,etc.

The Customer Class :-

  • This class has all the functions of used by the customer it includes :-
  • Rented_Cars() function to give the list of all the cars rented in by the customer.
  • Fine_dues() function to give the total fine of the customer as well as individual finr for each car rented in.
  • see_cars() function which is used by the customer to see the list of all availaible cars for renting.
  • rent_car() function which is used by the customer to rent cars which are availaible.

The Employee Class :-

  • This is same as the Customer class but the difference is with the way of calculating fine dues in the fine_dues() function which reduces 15% rent.

The Manager Class :-

  • add_customer() function which is used to add customer to the CUSTOMER vector database.
  • delete_customer() function to delete customer from CUSTOMER vector.
  • update_customer() fucntion used to update Fine_dues and late_date of the Customer.
  • list_customer()used to give list of updated customers.'
  • SIMILARLY there are function for adding, deleting, updating and seeing updated employee list.
  • NOW FOR CARS
  • add_car() used to add a car to CARS vector.
  • delete_car() to delete car from CARS vector.
  • update_car() used to update the rent price and renting_date of desired car.

THE MAIN FUNCTION :-

  • First I have created database for CARS, CUSTOMER, EMPLOYEE using constructor.
  • Then the rental system starts.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages