0% found this document useful (0 votes)
64 views21 pages

csc126 Report

This document contains a group project report for a food delivery company called Kyobrothers Food Delivery.co. It includes the names and student IDs of four group members. The report describes an C++ program for ordering food from different restaurants using the service. The program collects customer details, allows selection of a restaurant and menu items, applies any promo codes, displays the total price, and prompts for a payment method. Pseudocode is provided to explain the program workflow.

Uploaded by

haikaljenal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
64 views21 pages

csc126 Report

This document contains a group project report for a food delivery company called Kyobrothers Food Delivery.co. It includes the names and student IDs of four group members. The report describes an C++ program for ordering food from different restaurants using the service. The program collects customer details, allows selection of a restaurant and menu items, applies any promo codes, displays the total price, and prompts for a payment method. Pseudocode is provided to explain the program workflow.

Uploaded by

haikaljenal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 21

GROUP PROJECT REPORT

KYOBROTHERS FOOD DELIVER.CO


GROUP : CS1101D
STUDENT ID 2022459488
NAME MUHAMMAD HAIKAL HAKIMI BIN
ZAINAL
STUDENT ID 2022874362
NAME MUHAMMAD ALIF HAZIM BIN
KAMARUZAMAN
STUDENT ID 2022841266
NAME AFNAN BIN DENNES ZAMLI
STUDENT ID 2022665304
NAME ARIF ISKANDAR BIN
INTRODUCTION
Food is a necessity for every human being to keep us always energetic. Nowadays people can easily buy their food by using the smartphone. You
just need an internet and no need to waste your energy and time to buy a food. Kyobrothers food delivery.co is a company that delivers many type of
food orders. User may choose their order at any restaurant that use our services and we will deliver it to their location such as office,house and etc. The
system also will ask user to input details such as address,name,phone number and etc.

COMPLETE PROGRAM
#include <iostream>

using namespace std;

float discount(int,float);

int main()

{
int quantity, price;

float totalprice;
string name, address, phoneNum, payType;

char restaurant, menu, repeat='Y', promo;

cout << "WELCOME TO KYOBROTHERS FOOD DELIVERY .CO" << endl; //introduction

cout<< endl << "PLEASE ENTER YOUR DETAILS" << endl; //user put their information
cout<< endl<< "NAME : ";

cin >> name;

cout << "ADDRESS: ";


cin >> address;

cout << "PHONE NUMBER: ";


cin >> phoneNum;

cout << endl << "PLEASE CHOOSE THE RESTAURANT" << endl; //user choose their restaurant
cout << endl << "1 - WCD";

cout << endl << "2 - LFC";

cout << endl << "3 - SUNBUCKS" << endl;


cout << "------------------" << endl;

cin >> restaurant;

cout << "------------------" << endl;


ORDER: while(repeat == 'Y'|| repeat == 'y'){
if (restaurant == '1'){ //user choose their menu

cout << endl<< "WCD" << endl; //list of menu

cout << "------------------------------" << endl;


cout << "PLEASE CHOOSE YOUR MENU" << endl;

cout << endl << "SET A = DOUBLE CHEESE BURGER + COKE" << endl;

cout << "SET B = DOUBLE CHEESE BURGER + FRIES + COKE" << endl;
cout << "SET C = DOUBLE CHEESE BURGER + FRIES + COKE + SUNDAE RAINBOW" << endl;

cout << "------------------------------" << endl;


cin >> menu;

cout << "------------------------------" << endl;

if (menu == 'A' || menu == 'a') //pricelist

{
cout << "DOUBLE CHEESE BURGER + COKE - RM 8" << endl;

price = 8;

totalprice = totalprice + price;


cout << "------------------------------" << endl;

else if (menu == 'B' || menu == 'b')


{

cout << "DOUBLE CHEESE BURGER + FRIES + COKE - RM 10" << endl;
price = 10;

totalprice = totalprice + price;


cout << "------------------------------" << endl;

else if (menu == 'C' || menu == 'c')


{

cout << "DOUBLE CHEESE BURGER + FRIES + COKE + SUNDAE RAINBOW - RM 12" << endl;

price = 12;
totalprice = totalprice + price;

cout << "------------------------------" << endl;


}

else

{
cout << "PLEASE CHOOSE CORRECT MENU" << endl;

}
}

else if (restaurant == '2'){

cout << endl<< "LFC" << endl; //list of menu

cout << "------------------------------" << endl;

cout << "PLEASE CHOOSE YOUR MENU" << endl;


cout << endl << "SET A = 2PCS FRIED CHICKEN + PEPSI" << endl;

cout << "SET B = 2PCS FRIED CHICKEN + RICE + PEPSI" << endl;
cout << "SET C = 3PCS FRIED CHICKEN + RICE + PEPSI" << endl;

cout << "------------------------------" << endl;


cin >> menu;

cout << "------------------------------" << endl;

if (menu == 'A' || menu == 'a') //pricelist

cout << "2PCS FRIED CHICKEN + PEPSI - RM 7" << endl;


price = 7;

totalprice = totalprice + price;


cout << "------------------------------" << endl;

else if (menu == 'B' || menu == 'b')


{

cout << "2PCS FRIED CHICKEN + RICE + PEPSI - RM 9" << endl;
price = 9;

totalprice = totalprice + price;

cout << "------------------------------" << endl;


}

else if (menu == 'C' || menu == 'c')

{
cout << "3PCS FRIED CHICKEN + RICE + PEPSI - RM 13" << endl;

price = 13;
totalprice = totalprice + price;

cout << "------------------------------" << endl;


}

else

{
cout << "PLEASE CHOOSE CORRECT MENU" << endl;

cin >> menu;

}
}

else if (restaurant == '3'){

cout << endl<< "SUNBUCKS" << endl; //list of menu

cout << "------------------------------" << endl;


cout << "PLEASE CHOOSE YOUR MENU" << endl;

cout << endl << "SET A = ICE AMERICANO" << endl;


cout << "SET B = ICE CARAMEL LATTE" << endl;

cout << "SET C = ICE SALTED CARAMEL LATTE" << endl;

cout << "------------------------------" << endl;


cin >> menu;

cout << "------------------------------" << endl;


if (menu == 'A' || menu == 'a')

{
cout << "ICE AMERICANO - RM 6" << endl; //pricelist

price = 6;
totalprice = totalprice + price;

cout << "------------------------------" << endl;

}
else if (menu == 'B' || menu == 'b')

cout << "ICE CARAMEL LATTE - RM 8" << endl;


price = 8;

totalprice = totalprice + price;


cout << "------------------------------" << endl;

else if (menu == 'C' || menu == 'c')


{

cout << "ICE SALTED CARAMEL LATTE - RM 8" << endl;


price = 8;

totalprice = totalprice + price;

cout << "------------------------------" << endl;


}

else

{
cout << "PLEASE CHOOSE CORRECT MENU" << endl;

cin >> menu;


}

}
else

cout << "PLEASE ENTER CORRECT RESTAURANT" << endl;


cin >> restaurant;

goto ORDER;

cout << endl << "Y - YES || N - NO = ";


cout << "DO YOU WANT TO ADD MORE ITEM?" << endl; //user may choose to add more item or not

cin >> repeat;

cout << endl << "ENTER THE PROMO CODE IF YOU HAVE : "; //user can input the promo code if they have

cin >> promo;

totalprice = discount (promo, totalprice);


cout << endl << "TOTAL PRICE FOR YOUR ORDER IS = RM " << totalprice <<endl; //output (total price for item choosen)

cout << endl << "CHOOSE YOUR PAYMENT TYPE : COD / ONLINE BANKING / E-WALLET / CREDIT CARD / KYOPAY " << endl; //payment
type
cin >> payType;

cout << endl << "THANK YOU FOR USING OUR SERVICE!";

return 0;

float discount (int promo, float totalprice){

if (promo == '1')
{

totalprice = totalprice *0.5; //calculation if user have the promo code

}
else

totalprice = totalprice; //calculation


}

return totalprice;
}

VARIABLES/CONSTANT,INPUT AND OUTPUT


VARIABLES

- int quantity, price;


- float totalprice;
- string name, address, phoneNum, payType;
- char restaurant, menu, repeat='Y', promo;

INPUT AND OUTPUT

- Input : name, address,phone number


- Output: details
- Input : user restaurant
- Output : restaurant
- Input : user menu
- Output : menu
- Input : user promo code
- Output : promo code
- Output : total price
- Input : user payment type
- Output : payment type
IPO TABLE
INPUT PROCESS OUTPUT
Enter name,address,phone Read restaurant Details
number Reaf Menu Selected Restaurant
Choose restaurant totalprice = totalprice + price Selected Menu
Choose menu totalprice = discount (promo, Promo code
Enter promo code totalprice) Total price
Choose payment type Payment type

PSUEDOCODE

Start
int quantity, price
float totalprice
string name, address, phoneNum, payType
char restaurant, menu, repeat=’Y’, promo
display "WELCOME TO KYOBROTHERS FOOD DELIVERY .CO"
display "PLEASE ENTER YOUR DETAILS"
display "NAME : "
read name
display "ADDRESS(please use ' _ ' as spacebar): "
read address
cout << "PHONE NUMBER: "
read phoneNum
display "PLEASE CHOOSE THE RESTAURANT"
display "1 - WCD"
display "2 - LFC"
display "3 - SUNBUCKS"
display "------------------"
read restaurant
display "------------------"
while(repeat == 'Y'|| repeat == 'y')

if (restaurant == '1')
display "WCD"
display "------------------------------"
display "PLEASE CHOOSE YOUR MENU"
display "SET A = DOUBLE CHEESE BURGER + COKE"
display "SET B = DOUBLE CHEESE BURGER + FRIES + COKE"
display "SET C = DOUBLE CHEESE BURGER + FRIES + COKE + SUNDAE RAINBOW"
display "------------------------------"
read menu
display "------------------------------"
if (menu == 'A' || menu == 'a')
display "DOUBLE CHEESE BURGER + COKE - RM 8"
price = 8
totalprice = totalprice + price
display "------------------------------"
else if (menu == 'B' || menu == 'b')
display "DOUBLE CHEESE BURGER + FRIES + COKE - RM 10"
price = 10
totalprice = totalprice + price
display "------------------------------"
else if (menu == 'C' || menu == 'c')
display "DOUBLE CHEESE BURGER + FRIES + COKE + SUNDAE RAINBOW - RM 12"
price = 12
totalprice = totalprice + price
display "------------------------------"
else
display "PLEASE CHOOSE CORRECT MENU"
read menu
else if (restaurant == '2')
display "LFC"
display "------------------------------"
display "PLEASE CHOOSE YOUR MENU"
display "SET A = 2PCS FRIED CHICKEN + PEPSI"
display "SET B = 2PCS FRIED CHICKEN + RICE + PEPSI"
display "SET C = 3PCS FRIED CHICKEN + RICE + PEPSI"
display "------------------------------"
read menu
display "------------------------------"
if (menu == 'A' || menu == 'a')
display "2PCS FRIED CHICKEN + PEPSI - RM 7"
price = 7
totalprice = totalprice + price
display "------------------------------"
else if (menu == 'B' || menu == 'b')
display "2PCS FRIED CHICKEN + RICE + PEPSI - RM 9"
price = 9
totalprice = totalprice + price
display "------------------------------"

else if (menu == 'C' || menu == 'c')


display "3PCS FRIED CHICKEN + RICE + PEPSI - RM 13"
price = 13
totalprice = totalprice + price
display "------------------------------"
else
display "PLEASE CHOOSE CORRECT MENU"
read menu
else if (restaurant == '3')
display "SUNBUCKS" <<
display "------------------------------"
display "PLEASE CHOOSE YOUR MENU"
display "SET A = ICE AMERICANO"
display "SET B = ICE CARAMEL LATTE"
display "SET C = ICE SALTED CARAMEL LATTE"
display "------------------------------"
read menu
display "------------------------------"
if (menu == 'A' || menu == 'a')
display "ICE AMERICANO - RM 6"
price = 6
totalprice = totalprice + price
display "------------------------------"

else if (menu == 'B' || menu == 'b')


display "ICE CARAMEL LATTE - RM 8"
price = 8
totalprice = totalprice + price
display "------------------------------"
else if (menu == 'C' || menu == 'c')
display "ICE SALTED CARAMEL LATTE - RM 8"
price = 8
totalprice = totalprice + price
display "------------------------------"
else
display "PLEASE CHOOSE CORRECT MENU"
read menu
else
display "PLEASE ENTER CORRECT RESTAURANT"
read restaurant
goto ORDER
display "Y - YES || N - NO = "
display "DO YOU WANT TO ADD MORE ITEM?"
read repeat
display "ENTER THE PROMO CODE IF YOU HAVE : "
read promo
totalprice = discount (promo, totalprice)

display "TOTAL PRICE FOR YOUR ORDER IS = RM " display totalprice


display "CHOOSE YOUR PAYMENT TYPE : COD / ONLINE BANKING / E-WALLET / CREDIT CARD / KYOPAY "
read payType
display << "THANK YOU FOR USING OUR SERVICE!"

End

Function:

float discount (int promo, float totalprice)


if (promo == 'A')
totalprice = totalprice *0.5
else
cout << "Wrong Promo Code!";
totalprice = totalprice
return totalprice

FLOWCHART
FUNCTION

SAMPLE OUTPUT
CSC126 - FUNDAMENTALS OF ALGORITHMS & COMPUTER PROBLEM SOLVING
ASSESSMENT #4: GROUP PROJECT EVALUATION FORM

NAME ST UDENT NO. GROUP


2022459488
1 -MUHAMMAD HAIKAL HAKIMI BIN ZAINAL
2022874362
2 -MUHAMMAD ALIF HAZIM BIN KAMARUZAMAN
2022841266
3 -AFNAN BIN DENNES ZAMLI
2022665304
4 -ARIF ISKANDAR BIN ZAINODDIN

No Submission Poor Fair Good Excellent


Attributes Sub-attribute Weight Marks
0 1 2 3 4

No name, date, or program title Includes name, date, and


Includes name, date, and Includes name, date, and
included. program title.
program title. program title.

Poor use of white space White space makes program fairly


Good use of white space. Excellent use of white space.
Coding Standard No Submission (indentation, blank lines). easy to read. 3

Organized w ork. Creatively organized work.


Disorganized and messy. Organized work.

Good use of variables. Excellent use of variables.


Poor use of variables. Good use of variables.
The code is exceptionally well
The code is readable only by
The code is f airly easy to read. organized and very easy to
someone who knows what it is
follow.
The code is poorly organized and supposed to be doing.
Readibility No Submission The f unctions, variables, 2
very diff icult to read.
statements were well The f unctions, variables,
No comment on f unctions,
documented (comment) statements were well
variable, statements etc.
documented (comment)

A diff icult and ineff icient solution. A logical solution, easy to f ollow
Solution is eff icient and easy to Solution is eff icient, easy to
but not the most eff icient.
follow (i.e. no conf using tricks). understand and maintain.
Does not included selection
control structure, repetition Partially included selection
Include d selection control Included selection control
Eff iciency No Submission control structure, f unction and control structure, repetition 2
structure, repetition control structure, repetition control
array. control structure, f unction and
structure, f unction and array. structure, f unction and array.
array.
The code w as lenghty
Fits a reasonable length of code. Fits a reasonable length of code.
The code w as lenghty.

Does not execute due to errors. Executes with some errors.


Executes without errors. Executes without errors.
User prompts are misleading or User prompts contain little
non-existent. inf ormation, poor design. User prompts are understandable, Excellent user prompts, good use
Runtime No Submission 2
minimum use of symbols or of symbols or spacing in output
No testing/debugging has been Some testing/debugging has spacing in output. (neatly displayed).
completed. been completed.

Good introduction. A very good introduction.


Poor introduction. Fairly good introduction.
The problem-to-solve was The problem-to-solve was well
Intoduction No Submission The problem-to-solve was not well The problem-to-solve was 2
introduced with references. introduced with supported of
introduced . introduced.
references.
Poor explaination of algorithm Fairly good explaination of
Documentation/Project Good explaination of a
Algorithm No Submission which does not ref lex the algorithm based on program
Report based on program dev
program developed. developed.
Discussion & Unrelated discussion and Fairly good discussion and Good and logical discu
No Submission
Conclusion conclusion conclusion conclusion
The report was more than 2 weeks The report was within 2 weeks of The report was deliver
Delivery No Submission
overdue. the due date. week of the due date.

You might also like