Ahmad Sajjad Project
Ahmad Sajjad Project
Ahmad Sajjad Project
A fast food restaurant also known as quick service restaurant (QSR) within the
foodservice industry is a specific type of restaurant characterized both by its fast
food cuisine and byminimal table service. Food served in fast food restaurants is
offered from a limited menu,cooked in bulk in advance and kept hot, is finished
and packaged for order and is usuallyavailable ready for pickup or to be delivered
though seating may also be provided. Thecustomers presently spend an average of
60 minutes per day going to the restaurant, selectingtheir meals and paying. Some
restaurants have the provision of customers making a call to therestaurant in
advance to order a meal to be ready for them for pick or to be delivered to them.
Some of the customers don’t always get the selection they want beca use the
restaurants run outof certain items or because there is no provision of ordering
custom meals.This project is aimed at developing a complete online ordering
system for use in the foodservice industry which will allow the restaurants to
quickly and easily manage an online menuwhich customer can browse and use to
place orders with just a few clicks. The customers willhave to choose whether they
want the food to be delivered to them or it will be packaged for pick up and the
payment method will be upon delivery or pick up. There will be a
systemadministrator who will have the right to add and manage user accounts, a
manager who will bemanaging product and orders and last but not least a meal
deliverer who will be dealingspecifically with pending deliveries. The customer
will be in a position to view the products,register and place an order. There will be
a confirmation receipt for each and every order made by the customer which can
be printed
User requirements
The system will be designed to be user friendly. The user friendly and interactive
interfaces design helps to achieve this by enabling customers to easily browse
through the menus place orders with just a few clicks and also allows restaurant
employees to quickly go through the orders as they are placed and produce the
necessary items with minimal delay and confusion. The system will be simple to
use.
Functional requirements:
Functional requirements define the capabilities and functions that a system must be
able to perform successfully. The functional requirements of this online ordering
system include:
The system shall enable the customer to view the products menu, complete,
information.
The system shall display the food items ordered, the individual food item
prices and the payment amount calculated.
The system shall prompt customer to confirm the meal order.
The system shall provide visual confirmation of the order placement
The system shall enable the manager to view, sale history and employ
salary.
The system shall allow generation of sales report for the orders made.
Step 1:
#include<iostream> (for input out)
#include<time.h>
Step 2:
struct Customer{
string name;
double p_num;
double id_card;
string adres;
};
Construct a structure for customer using 4 variable to received information from user
//Howdy Variables
int p = 0, b = 0, s = 0;
//Cheezious Variables
int rides, r;
int salary;
Step 4:(using following functions)
void Display_Menu1()
void Display_Menu2()
void Howdies_Islamabad()
void Cheezious()
void customer()
void header_tags()
void header_tags_Employee()
void employee()
login()
void Display_Menu1():
void Display_Menu2():
void customer():
void header_tags_Employee():
Main function :
int main() {
header_tags();
header_tags_Employee();
login()
Some outputs screen:
PROJECT CODE:
#include<iostream>
#include<string>
#include<cstdlib>
#include<fstream>
#include<time.h>
using namespace std;
struct Customer{
string f_name;
string l_name;
string p_num;
string id_card;
string adres;
};
Customer obj1;
//Cheezious Variables
int cq_1 = 0, cq_2 = 0, cq_3 = 0;
int p_1 = 0, p_2 = 0, p_3 = 0;
int rides, r;
int salary;
void login();
void Display_Menu1() {
system("cls");
cout << "\n\t\t\t\t\t\tControl Panel" << endl;
cout << "\n\n\n\t\t\t\tMENU\t\t\t\tPrices";
cout << "\n\n\t\t\t 1. Pizza\t\t\t\t 700 RS";
cout << "\n\n\t\t\t 2. Burger\t\t\t\t 100 RS";
cout << "\n\n\t\t\t 3. Sandwich\t\t\t 150 RS";
cout << "\n\n\t\t\t-------------------------------------------------";
cout << "\n\n 4. Exit";
}
void Display_Menu2() {
system("cls");
cout << "\n\t\t\t\t\tControl Panel";
cout << "\n\n\n\t\t\t MENU\t\t\t\t\t Prices";
cout << "\n\n\t\t 1. Chicken Pepperoni Pizza\t\t\t 870 RS";
cout << "\n\n\t\t 2.Chicken Tikka Pizza\t\t\t 900 RS";
cout << "\n\n\t\t 3.Chicken Fajita\t\t\t 860 RS";
cout << "\n\n\t\t --------------------------------------------------------" << endl;
cout << "\n\n 4. Exit" << endl;
}
void Howdies_Islamabad() {
do{
Display_Menu1();
fstream sale;
sale.open("salerecord.txt", ios::app);
cout << "\n\n Enter Your Choice : ";
cin >> choice;
if (choice==1){
else if(choice==2){
cout << "\n\n Enter Burger Quantity : ";
cin >> q_b;
cout << "\n\n\n\t\t\tYour order number is : " << time(0) % 100 << endl;
b += q_b * 100;
cout << "\n\n\n\t\t\t" << q_b << " Burger Sales Thank You!!!";
cout << "\n\n\n\t\t\t Your total bill is : " << b << endl;
sale <<obj1.l_name<< "\t\t\tHowdy" << "\t\tBurger" << "\t" << q_b <<
"\t\t100" << "\t" << b << endl;
sale.close();
system("pause");
}
else if(choice==3){
cout << "\n\n Enter Sandwich Quantity : ";
cin >> q_s;
cout << "\n\n\n\t\t\tYour order number is : " << time(0) % 100 << endl;
s += q_s * 150;
cout << "\n\n\n\t\t\t" << q_s << " Sandwich Sales Thank You!!!";
cout << "\n\n\n\t\t\t Your total bill is : " << s << endl;
sale <<obj1.f_name<< "\t\t\tHowdy" << "\t Sandwich" << "\t" << q_s <<
"\t\t150" << "\t" << s << endl;
sale.close();
system("pause");
}
else if(choice>4||choice<=0){
cout<<"invalid ankyan khool kar dalo ";
system("pause");
}
}while(choice!=4);
}
void Cheezious() {
do{
Display_Menu2();
fstream sale;
sale.open("salerecord.txt", ios::app);
cout << "\nEnter Your Choice" << endl;
cin >> choice;
if(choice==1) {
system("cls");
cout << "\n\n\n\t\t\tEnter Chicken Pepperoni Pizza Quantity : " ;
cin >> cq_1;
cout << "\n\n\n\t\t\tYour order number is : " << time(0) % 100 << endl;
cout << "\n\n\n\t\t\t" << cq_1 << " ""Chicken Pepperoni Pizza sales Thank
You!!!" << endl;
p_1 += cq_1 * 870;
cout << "\n\n\n\t\t\tYour total bill is : " << p_1 << endl;
sale << obj1.f_name<< "\t\t\tCheezious" << " Peproni Pizza" << "\t" << cq_1
<< "\t\t870" << "\t" << p_1 << endl;
sale.close();
system("pause");
}
else if (choice==2){
system("cls");
cout << "\n\n\n\t\t\tEnter Chicken Tikka Pizza Quantity : " ;
cin >> cq_2;
cout << "\n\n\n\t\t\tYour order number is : " << time(0) % 100 << endl;
cout << "\n\n\n\t\t\t" << cq_2 << " ""Chicken Tikka Pizza sales Thank
You!!!" << endl;
p_2 += cq_2 * 900;
cout << "\n\n\n\t\t\tYour total bill is : " << p_2 << endl;
sale <<obj1.f_name<< "\t\t\tCheezious" << " Chkn Tka Piza" << "\t" << cq_2
<< "\t\t900" << "\t" << p_2 << endl;
sale.close();
system("pause");
}
else if(choice==3){
system("cls");
cout << "\n\n\n\t\t\tEnter Chicken Fajita Pizza Quantity : ";
cin >> cq_3;
cout << "\n\n\n\t\t\tYour order number is : " << time(0) % 100 << endl;
cout << "\n\n\n\t\t\t" << cq_3 << " ""Chicken Fajita Pizza sales Thank You!!!"
<< endl;
p_3 += cq_3 * 860;
cout << "\n\n\n\t\t\tYour total bill is : " << p_3 << endl;
sale <<obj1.f_name<< "\t\t\tCheezious" << " Fajita Pizza" << "\t" << cq_3 <<
"\t\t860" << "\t" << p_3 << endl;
system("pause");
}
else if (choice>4||choice<=0){
cout<<"invalid ha bahi ankya khool"<<endl;
system("pause");
}
}while(choice!=4);
}
void customer() {
do{
srand(time(0));
cout << "\n\n\n\t\t\t Select the Restaurant" << endl;
cout << "\n\n\t 1.Howdy Islamabad" << endl;
cout << "\n\n\t 2. Cheezious" << endl;
cout<<"3. back to main menue"<<endl;
cin >> choice;
if (choice==1)
{
Howdies_Islamabad();
}
else if(choice==2){
Cheezious();
}
else if(choice>3||choice<=0){
cout<<"invalid input ";
system("pause");
}
}while(choice!=3);
}
void employee() {
do{
system("cls");
cout << "Press 1: Check Salary" << endl;
cout << "Press 2: Order History" << endl;
cout << "Press 3: to main Menu" << endl;
cin >> choice;
if(choice==1)
{
cout << "Number of Rides Completed By You This Month" << endl;
cin >> r;
salary = r * 200;
if (r >= 150) {
cout << "Your salary is = " << salary << endl;
cout << "Your commission is 5000 " << endl;
salary += 5000;
cout << "Your new salary is = " << salary << endl;
fstream Esale;
Esale.open("E_salerecord.txt", ios::app);
Esale <<un<< "\t\t\t" << r << "\t" << salary << endl;
Esale.close();
system("pause");
employee();
}
else {
cout << "Your salary is = " << salary << endl;
fstream Esale; //File Definition
Esale.open("E_salerecord.txt", ios::app); //File Opening Command
Esale <<un
<< r << "\t" << salary << endl; //File Data Input to save the data
Esale.close(); //File Closing Command
system("pause");
employee();
}
}
else if(choice==2){
cout << "\n\t\tHowdy Islamabad" << endl;
cout << "\n Sales Pizza Quantity : " << q_p;
cout << "\n Total Pizza Price in a Day : " << p;
cout << "\n Sales Burger Quantity : " << q_b;
cout << "\n Total Burger Price in a Day : " << b;
cout << "\n Sales Sandwich Quantity : " << q_s;
cout << "\n Total Sandwich Price in a Day : " << s;
cout << "\n\n\n Total Day Price : " << p + b + s << endl;
fstream Esale;
Esale.open("E_salerecord.txt", ios::app);
Esale <<"MANGER NAME"<< "\t Employ Rides " << "\t Salary" << endl;
Esale.close();
}
void login()
{
int a;
system("cls");
do{
cout<<" **********************WELLCOME TO ONLINE FOOD
SERVISE*******************************"<< endl;
cout<<" * *"<<endl;
cout<<" * *"<<endl;
cout<<" * *"<<endl;
cout<<" * *"<<endl;
cout<<" * *"<<endl;
cout<<" * FOR BOOKING ODER PREES 1 *"<<endl;
cout<<" * *"<<endl;
cout<<" * *"<<endl;
cout<<" * FOR OFFICE USE ONLY *"<<endl;
cout<<" * *"<<endl;
cout<<" * *"<<endl;
cout<<" * TO CHECK DEATAILS OF EMPLOY AND SALE HISTORY PREES 2
*"<<endl;
cout<<" * *"<<endl;
cout<<" * *"<<endl;
cout<<" * TO EXIT PREES 3 *"<<endl;
cout<<" * *"<<endl;
cout<<" * THANKS *"<<endl;
cout<<" * *"<<endl;
cout<<"
*********************************************************************************
*****"<<endl;
cin>>a;
system("cls");
if (a == 1) {
employee();
}
else if (un != "Ahsan" || pw != "1234")
{
cout << "\nUser Name or Password Invalid\nTry Again!";
system("pause");
login();
}
else
{
cout << "Invalid Entry\nTry Again!" << endl;
system("pause");
login();
}
}
else if(a>3||a<=0)
{
cout << "Invalid Entry!\n Try Again!" << endl;
}
}while(a!=3);
}
int main() {
header_tags();
header_tags_Employee();
login();
}