This is my first assignment in College. The language using is C language.
A fast food restaurant,OZJ Restaurant needs to efficiently bill customers and keep records of the different types of foods used up.
I have been hired to develop a simple Fast Food Order & Billing System that will enable the restaurant to bill their customers quickly, and at the end of the day produce a Daily Sales Report.
The restaurant sells 4 types of Combo meals consisting of different combinations of food products with prices as shown in the table below:
| COMBO | Food Description | Price (RM) |
|---|---|---|
| A | 2pc Fried Chicken + Coke + French Fries | 10.00 |
| B | Chicken/Beer Burger + Coke + French Fries | 15.00 |
| C | Double Cheese Burger + Coke + French Fries | 18.00 |
| D | Spaghetti with Chicken Chop + Coke + French Fries | 24.00 |
For example, a customer who orders 3 sets of Combo C will be charged 3 x RM 18.00 = RM 54.00. He will also need to pay an extra 10% for SST (Sales / Service Tax). So the total he need to pay is RM 59.40.
After the last customer for the day, a Daily Sales Report will be produced, showing the summary of the sales for that day.
Structure Chart
Flow Charts
The feature that i added is display the error when the customer pays the amount smaller than total that need to pay.
The reason for adding this feature is to remind the customer are paying the wrong amount of payment that cannot done the payment.So the customer can confirm the amount needed to pay again.
Run senario 1: More than 1 customer - same combo ordered twice by same customer
| Inputs | Expected Results / Outputs | ||||||
|---|---|---|---|---|---|---|---|
| Cust# | Combo ordered |
Qty | Payment | Combo Charges | SST (10%) |
Total charges | Change to be given |
| 1 | C A C |
10 2 10 |
500.00 |
18 * 10 = 180 10 * 2 = 20 18 * 10 = 180 Total = 380 |
38.00 |
418.00 |
82.00 |
| 2 | C B |
5 5 |
200.00 |
18 * 5 = 90 15 * 5 = 75 Total = 165 |
16.50 |
181.50 |
18.50 |
| Total Combo Sales: A 2 * 10 = 20 B 5 * 15 = 75 C 25 * 18 = 450 D 0 * 24 = 0 ------ ----- 32 545 |
54.50 |
599.00 |
Run Senario 2 : 1 customer only – order all combos, different quantities
| Inputs | Expected Results / Outputs | ||||||
|---|---|---|---|---|---|---|---|
| Cust# | Combo ordered |
Qty | Payment | Combo Charges | SST (10%) |
Total charges | Change to be given |
| 1 | A B C D |
1 2 3 4 |
210.00 |
10 * 1 = 10 15 * 2 = 30 18 * 3 = 54 24 * 4 = 96 Total = 190 |
19.00 |
209.00 |
1.00 |
| Total Combo Sales: A 1 * 10 = 10 B 2 * 15 = 30 C 3 * 18 = 54 D 4 * 24 = 96 ------ ----- 10 190 |
19.00 |
209.00 |
Run 3 scenario : 3 Customer - Order total 90 of combo A with different payment
| Inputs | Expected Results / Outputs | ||||||
|---|---|---|---|---|---|---|---|
| Cust# | Combo ordered |
Qty | Payment | Combo Charges | SST (10%) |
Total charges | Change to be given |
| 1 | A | 30 | 600.00 | 10 * 30 = 300 | 30.00 | 330.00 | 270.00 |
| 2 | A | 30 | 500.00 | 10 * 30 = 300 | 30.00 | 330.00 | 170.00 |
| 3 | A | 30 | 400.00 | 10 * 30 = 300 | 30.00 | 330.00 | 70.00 |
| Total Combo Sales: A 90 * 10 = 900 B 0 * 15 = 0 C 0 * 18 = 0 D 0 * 24 = 0 ------ ----- 90 900 |
90.00 |
990.00 |
#define SST 0.10
#define MENUA 10.00
#define MENUB 15.00
#define MENUC 18.00
#define MENUD 24.00
int quanA, quanB, quanC, quanD;
int counterA = 0, counterB = 0, counterC = 0, counterD = 0;
int tempA, tempB, tempC, tempD,counterAllcom;
int cusNum = 1, pay;
double comCharge, chargeSST, totalSale, sstTotal;
char orderIn, nextCus;| Constants | Value | Type | Purpose |
|---|---|---|---|
| SST | 0.10 | double | To define the value of SST ( Service & Sales Tax ) |
| MENUA | 10.00 | double | To define the price of combo A |
| MENUB | 15.00 | double | To define the price of combo B |
| MENUC | 18.00 | double | To define the price of combo C |
| MENUD | 24.00 | double | To define the price of combo D |
| Variables | Type | Purpose |
|---|---|---|
| quanA | int | To store the quantity of combo A that current customer order. |
| quanB | int | To store the quantity of combo B that current customer order. |
| quanC | int | To store the quantity of combo C that current customer order. |
| quanD | int | To store the quantity of combo D that current customer order. |
| counterA | int | To store the total quantity of combo A. |
| counterB | int | To store the total quantity of combo B. |
| counterC | int | To store the total quantity of combo C. |
| counterD | int | To store the total quantity of combo D. |
| counterAllcom | int | To store the total of all combo sales daily. |
| cusNum | int | To count the number of customer daily. |
| pay | int | To store the payment of customer. |
| comCharge | double | To store the total need to pay of current customer. |
| chargeSST | double | To store the total SST the customer need to pay. |
| sstTotal | double | To store the total of SST that charged on all combo sales daily. |
| totalSale | double | To store the total sales of all combo daily. |
| orderIn | char | To store the current order of combo that customer wants. |
| nextCus | char | To store the input of casher and check is there still have customer today. |
















