ELECTRICAL ENGINEERING DEPARTMENT
ACADEMIC SESSION: 1 2021/2022
DEC20012: PROGRAMMING FUNDAMENTALS
Student name: MUHAMMAD AIMAN BIN (02DEE21F1102)
NOR HAZRIN SYAMIRUL BIN NORHASMADI (02DEE21F1098)
MUHAMMAD FAHMI BIN YUSSRI (02DEE21F1134)
CLASS : DEE2B
LECTURE : PUAN WAN ROSLINA BINTI WAN MUSA
TITLE: MINI PROJECT
GANTT CHART ;
Week ACTIVITY
week 11 GET AN
ASSIGMENT
FROM
LECTURE
Week 12 PREPARE AND PREPARE OUR
GIVE A WORK PROJECT AND
TO OUR CRATE OUR
GROUP TEAM PROJEK
Week 13 START OUR
PROJECT AND GET
A REFRENCE
FROM OUR
PRACTICAL WORK
Week 14 MAKE A
CONCLUSION
AND
DISSCUSSION
FROM OUR
PROJEK
STUDY SUBMIT THE
WEEK ASSIGNMENT
FLOWCHART:
START
DISPLAY
-ENTER YOUR NAME
-WELCOME TO CABIN COFFEE
CHOOSE YOUR ITEM
-CLASSIC COFFEE
-NISSAN COFFEE
-JEBAT COFFEE
CADBURRY COFFE
PROCESS YOUR ORDER IS 1:
-YOU HAVE CHOOSE JEBAT COFFEE
RM8
INPUT 2
-YOUR QUANTITY IS 2
CONFIRM PAYMENT
-CASH THAT HAD BEEN GIVEN IS
RM50
OUTPUT
-TOTAL COST FOR ORDER IS RM16 END
AND YOUR CHANGE IS RM32
PROGRAM (SOURCE CODE)
#include<stdio.h>
void menu()
printf("WELCOME TO CABIN COFFEE");
int main()
int selection= 0;
char name [50];
char size[50];
char set[50];
double price,balanced,money,totalamount,quantity = 1;
double
ITEMCOFFEE=0,CLASSIC_COFFEE=6.00,NISSAN_COFFEE=7.00,JEBAT_COFFEE=8.00,CADBURRY_COFFEE=10.00;
printf("CABIN COFFEE\\n");
printf("PLEASE CHOOSE YOUR SELECTION \n");
printf("\nNAME :");
scanf("%s",&name);
do
menu();
printf("\nAVAILABLE COFFEE :\n\n");
printf("1:CLASSIC COFFEE RM%.2lf\n",CLASSIC_COFFEE);
printf("2:NISSAN COFFEE RM%.2lf\n",NISSAN_COFFEE);
printf("3:JEBAT COFFEE RM%.2lf\n",JEBAT_COFFEE);
printf("4:CADBURRY COFFEE RM%.2lf\n",CADBURRY_COFFEE);
printf("5:CONFIRM PAYMENT\n\n");
printf("PLEASE CHOOSE=");
scanf("%d",&selection);
switch(selection)
case 1:
printf("INSERT YOUR QUANTITY :");
scanf("%lf",&quantity);
price=CLASSIC_COFFEE*quantity;
ITEMCOFFEE +=price;
break;
case 2:
printf("INSERT YOUR QUANTITY :");
scanf("%lf",&quantity);
price=NISSAN_COFFEE*quantity;
ITEMCOFFEE +=price;
break;
case 3:
printf("INSERT YOUR QUANTITY :");
scanf("%lf",&quantity);price=JEBAT_COFFEE*quantity;
ITEMCOFFEE +=price;
break;
case 4:
printf("INSERT YOUR QUANTITY :");
scanf("%lf",&quantity);
price=CADBURRY_COFFEE*quantity;
ITEMCOFFEE +=price;
break;
case 5:
printf("INSERT YOUR CASH :");
scanf("%lf",&money);
printf("CONFIRM PAYMENT (y/n) :");
scanf("%s",&set);
break;
}
printf("TOTAL :RM%.2lf\n",ITEMCOFFEE);
while(selection !=5);
printf("*****************\n");
printf("CONFIRM PAYMENT %s\n",set);
printf("YOUR PAYMENT : RM %.2lf\n",money);
balanced = money - ITEMCOFFEE;
printf("\nRESIT WILL PRINT AFTER DONE\n");
printf("CHANGE IS RM %.2lf",balanced);
printf("\nTHANK YOU");
printf("\nENJOY YOUR COFFEE");
printf("\nHAVE A NICE DAY");
return 0;
}
PROGRAM OUTPUT:
DISCUSSION:
From this mini project we gained new knowledge for
example we can figure out how to market selling one
coffee in a more attractive and effective way we also do
not need to use a calculator to calculate the total sale price.
all details on how the program is implemented.
CONCLUSION:
In conclusion, our project was to create a fun and inventive
way to order coffee for any age using C programme. With
everything that we’ve learnt so far, our was objective was
to make an easy and fun way to order coffee with calm and
stylish, meanwhile the old person can learn how to use
current technology. The programme allows the people to
pick between different coffee, then there will be a price to
make it easier for people to calculate enough money. The
programme can make it easier for customers to order
comfortably and also can reduce the manpower used by the
store.
REFERENCES:
~PAPER WORKSHEET 3
~ PAPER WORKSHEET 4
~ PAPER WORKSHEET 5