online RIDE c++ project with source code
online RIDE c++ project with source code
MEMBERS
M. AZAIN AKBAR
(BSE 233025)
M. AWAIS
(BSE 233047)
HUSNAIN ARFAQ
(BSE 233015)
M. KHAN
(BSE 233019)
HAMMAD MUSHTAQ
(BSE233041)
Date
11-
01-2024
Project title: RIDE BOOKING
Teacher’s name : QAZI SHUJA U
DIN
THE DETAIL
2) User Authentication:
section.
5) Project
Description:
struct User {
char username[50];
char password[50];
};
numUsers++;
cout << "Registration successful. User added." << endl;
}
else {
cout << "Registration failed. Maximum number of users reached." << endl;
}
}
int main() {
int maxUsers = 100;
int numUsers = 0;
char A;
char B;
User* users = new User[maxUsers];
int choice;
int* choiceptr;
choiceptr = &choice;
do {
cout << "1. Register" << endl;
cout << "2. Login" << endl;
cout << "Enter your choice: ";
cin >> *choiceptr;
switch (choice) {
case 1:
registerUser(users, numUsers, maxUsers);
break;
case 2:
if (authenticate(users, numUsers)) {
cout << "Login successful. Welcome, " << users[numUsers - 1].username << "!" << endl;
cout << " *****Welcome to Transport App**********" << endl;
cout << " " << endl;
do {
int select, type, km, price = 0;
int* typeptr, * selectptr, * kmptr, * priceptr;
typeptr = &type;
kmptr = &km;
selectptr = &select;
priceptr = &price;
cout << " Which Type Of Vehicle You Want To Select: " << endl;
cout << " 1. Car (Press 1) " << endl;
cout << " 2. Bike (Press 2) " << endl;
cout << " 3. Bus (Press 3) " << endl;
cout << " 4. Truck (Press 4) " << endl;
cin >> *selectptr;
if (select == 1) {
cout << " **Which Type Of CAR You Want: " << endl;
cout << " 1. AC Car (press 1)" << endl;
cout << " 2. Without AC Car (press 2)" << endl;
cin >> *typeptr;
price = 150;
cout << " Thanks For Booking a Bike. We are reaching soon** " << endl;
cout << " Price for this ride is 150 Rs Per Kilometer." << endl;
cout << " Select How many kilometers you want to travel ?" << endl;
cin >> *kmptr;
}
else if (select == 3) {
price = 1000;
cout << " Thanks For Booking a Bus. We are reaching soon** " << endl;
cout << " Price for this ride is 1000 Rs Per Kilometer." << endl;
cout << " Select How many kilometers you want to travel ?" << endl;
cin >> *kmptr;
}
else if (select == 4) {
price = 800;
cout << " Thanks For Booking a Truck. We are reaching soon** " << endl;
cout << " Price for this ride is 800 Rs Per Kilometer." << endl;
cout << " Select How many kilometers you want to travel ?" << endl;
cin >> *kmptr;
}
else {
cout << " Invalid selection!" << endl;
return 1;
}
}
else
{
cout << "We will reach you soon.Please wait!";
}