Car Rental Management System Project In C++ With Source Code
The Car Rental Management System Project In C++ is designed in C++ programming language, Car Rental System C++ is based on a concept to maintain rental for a short period of time and generating total charge.
A Car Rental Management System In C++ main features is the user has to pass through a login system to get access, then a menu displays with the selective option of the Car models for rent. There is total 9 car model in this system which can be changed by the user according to their will.
This Car Rental System Using C++ also includes a downloadable Car Rental System C++ Source Code for free, just find the downloadable source code below and click to start downloading
Watch the video here to see the full running a Car rental management mini project in c++ with Source Code.
To start creating a Car Rental Management System Project In C++,make sure that you have code blocks or any platform of C/C++ language installed in your computer.
Steps on how to create a Car Rental Management System Project In C++ With Source Code
Car Rental Management System Project In C++ With Source Code
- Step 1: Create a new project.
First open the code blocks IDE and click “create a new project“.
- Step 2: Choose console application.
Second click the “console application” and after that click “next“.
- Step 3: Choose C++ language.
Third choose “C++ language” and click “next“.
- Step 4: Name Your Project.
Fourth name the project you’ve created and click “next” after that click “finish“.
- Step 5: The actual code.
You are free to copy the given source code below or download the downloadable source code given.
The Code Given Below Is For The User Input Module
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
void user_input (int theChoice) { system("CLS"); int j=theChoice-1 ; cout<<"\t\t\t----------------------------------------\n"; cout<<"\t\t\tPlease Provide Your Personal Details : \n"; cout<<"\t\t\t----------------------------------------\n\n"; cout<<"\n\tNOTE: PROVIDE FIRST NAME ONLY, DONOT ENTER SPACE WHILE PROVIDING NAME,\n\tPAYMENT WON'T PROCEED IF THE GIVEN AMOUNT IS LESS THEN THE RATE OF CAR\n\n\n\n"; cout<<"\t\t\tEnter Your Name : "; cin>>lessee.Name[j]; cout<<"\t\t\tEnter Your National ID : "; cin>>lessee.Natio_ID[j] ; cout<<"\t\t\tPayment Amount: " ; cin>>lessee.payment_acc[j] ; check( j ) ; } |
In this module which is the user input module of the system.
The Code Given Below Is For The Main Module
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
int main() { int login(); login(); string decide ="yes" ; cout<<"\t\t\t----------------------------------------------\n"; cout<<"\t\t\t\tSIMPLE CAR RENTAL SYSTEM \n"; cout<<"\t\t\tWelcome to Our Company ,Choose from the menu : "<<endl; cout<<"\t\t\t----------------------------------------------\n"; while(decide!="exit") { Minu(); cout<<"\n\n\n\t\t\tYour Choice: "; int theChoice ; cin>>theChoice ; Details(theChoice); cout<<"\n\n\n\t\t\tAre You Sure, you want to rent this Car? (yes /no /exit ) : "; cin>>decide ; if(decide=="yes") { user_input(theChoice); cout<<"\n\n\t\t\tDo you want to continue ?(yes/no) "; cin>>decide; if (decide=="no") break ; system("CLS"); } else { if(decide=="no") { system("CLS"); continue ; } else if (decide=="exit") { system("CLS"); cout<<"\n\n\n\t\t\tBrought To You By code-projects.org"; break ; } } } return 0; } |
In this module which is the main module of the system.
The Code Given Below Is For The Login Module
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
int login(){ string pass =""; char ch; cout <<"\n\n\n\n\n\n\n\t\t\t\t\t Simple Car Rental System Login"; cout << "\n\n\n\n\n\n\n\t\t\t\t\t\tEnter Password: "; ch = _getch(); while(ch != 13){//character 13 is enter pass.push_back(ch); cout << '*'; ch = _getch(); } if(pass == "pass"){ cout << "\n\n\n\n\t\t\t\t\t Access Granted! Welcome To Our System \n\n"; system("PAUSE"); system("CLS"); }else{ cout << "\n\n\n\n\t\t\t\t\tAccess Aborted...Please Try Again!!\n"; system("PAUSE"); system("CLS"); login(); } } |
In this module which is the log in module of the system.
Complete Source Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 |
#include <iostream> #include <conio.h> #include <stdlib.h> using namespace std; struct Cars { string mark [10] = {"Hyundai","BMW","Mercedes","Audi","Tesla","Skoda","Volkswagun","Toyota","Ford"}; string model [10]= {"2016MD","2018AS","2018DS","2017LA","2018OW","2005Ps","2008PW","2010QW","2016SA"}; string color [10]={"Red","black","yellow","Blue","Red","Brown","Silver","Black","grey"}; string maxs_peed [10]={"100 Km/h ","150 Km/h","150 Km/h","170 Km/h","130 Km/h","140 Km/h","130 Km/h","120 Km/h","150 Km/h"}; int price [ 10 ] ={100,200,300,500,200,250,400,600,900} ; int date [10] = {2010,2012,2013,2017,2018,2005,2008,2010,2014}; }; struct Lessee { string Name [10]; string Natio_ID [10] ; int payment_acc [ 10] ; }; //Declaring struct Cars car ; Lessee lessee ; //First output void Minu () { int num=1; for(int i=0 ;i<9;++i) { cout<<"\t\t\t"; cout<<"Enter " <<num<<"\t- To Select "<<car.mark[i]<<endl; num++ ; } } //Second output void Details (int theChoice) { system("CLS"); cout<<"\n\n\n\t\t\t-----------------------------\n"; cout<<"\t\t\tYou Have Selected - "<<car.mark[theChoice-1]<<endl; cout<<"\t\t\t-----------------------------\n\n\n"; cout<<"\t\t\tModel : "<<car.model[theChoice-1]<<endl; cout<<"\t\t\tColor : "<<car.color[theChoice-1]<<endl; cout<<"\t\t\tMaximum Speed : "<<car.maxs_peed[theChoice-1]<<endl; cout<<"\t\t\tPrice : "<<car.price[theChoice-1]<<"K"<<endl; } //check lessee credit void check (int j ) { if(lessee.payment_acc[j] >= car.price[j]) cout<<"\n\n\n\t\t\tProcess has been done successfully!! " <<endl; else cout<<"\n\n\n\t\t\tNot Available " <<endl; } //User Inputcpo void user_input (int theChoice) { system("CLS"); int j=theChoice-1 ; cout<<"\t\t\t----------------------------------------\n"; cout<<"\t\t\tPlease Provide Your Personal Details : \n"; cout<<"\t\t\t----------------------------------------\n\n"; cout<<"\n\tNOTE: PROVIDE FIRST NAME ONLY, DONOT ENTER SPACE WHILE PROVIDING NAME,\n\tPAYMENT WON'T PROCEED IF THE GIVEN AMOUNT IS LESS THEN THE RATE OF CAR\n\n\n\n"; cout<<"\t\t\tEnter Your Name : "; cin>>lessee.Name[j]; cout<<"\t\t\tEnter Your National ID : "; cin>>lessee.Natio_ID[j] ; cout<<"\t\t\tPayment Amount: " ; cin>>lessee.payment_acc[j] ; check( j ) ; } int main() { int login(); login(); string decide ="yes" ; cout<<"\t\t\t----------------------------------------------\n"; cout<<"\t\t\t\tSIMPLE CAR RENTAL SYSTEM \n"; cout<<"\t\t\tWelcome to Our Company ,Choose from the menu : "<<endl; cout<<"\t\t\t----------------------------------------------\n"; while(decide!="exit") { Minu(); cout<<"\n\n\n\t\t\tYour Choice: "; int theChoice ; cin>>theChoice ; Details(theChoice); cout<<"\n\n\n\t\t\tAre You Sure, you want to rent this Car? (yes /no /exit ) : "; cin>>decide ; if(decide=="yes") { user_input(theChoice); cout<<"\n\n\t\t\tDo you want to continue ?(yes/no) "; cin>>decide; if (decide=="no") break ; system("CLS"); } else { if(decide=="no") { system("CLS"); continue ; } else if (decide=="exit") { system("CLS"); cout<<"\n\n\n\t\t\tBrought To You By code-projects.org"; break ; } } } return 0; } //cpo int login(){ string pass =""; char ch; cout <<"\n\n\n\n\n\n\n\t\t\t\t\t Simple Car Rental System Login"; cout << "\n\n\n\n\n\n\n\t\t\t\t\t\tEnter Password: "; ch = _getch(); while(ch != 13){//character 13 is enter pass.push_back(ch); cout << '*'; ch = _getch(); } if(pass == "pass"){ cout << "\n\n\n\n\t\t\t\t\t Access Granted! Welcome To Our System \n\n"; system("PAUSE"); system("CLS"); }else{ cout << "\n\n\n\n\t\t\t\t\tAccess Aborted...Please Try Again!!\n"; system("PAUSE"); system("CLS"); login(); } } |
Run Quick Virus Scan for secure Download
Run Quick Scan for secure DownloadDownloadable Source Code
Summary
The whole project is designed in ‘C++’ language and different variables and strings have been used for the development of this project. This mini project is easy to operate and understand by the users.
This simple project can enhance the knowledge of the beginners or the students to develop their skills in programming, also this project is easy to understand the module and their variables.
Related Articles
- Number System Conversion Project in C with Source Code
- Prison Management System Project in C with Source Code
- Department Store Management System Project in C with Source Code
- Best C Projects with Source Code for Beginners Free Download 2020
- Bank Management System in C with Source Code
- School Billing System in C with Source Code
- Hotel Management System Project In C With Source Code
- Employee Management System In C With Source Code
- Mini Project for Phonebook in C with Source Code
- Calendar In C Programming With Source Code
- Student Record System in C with Source Code
- Library Management System In C With Source Code
- Simple Hospital Management System In C With Source Code
Inquiries
If you have any questions or suggestions about Car Rental Management System Project In C++ , please feel free to leave a comment below.