CSC128 Mini Project Final Report PDF

Title CSC128 Mini Project Final Report
Course Science and Technology in Islam
Institution Universiti Teknologi MARA
Pages 29
File Size 1.2 MB
File Type PDF
Total Downloads 29
Total Views 863

Summary

CSC 128 Fundamentals of ComputerProblem SolvingIndividual ProjectTitle : Hari Raya Cookies SystemStudent ID: 2019427716Name: NUR AFRINA BINTI SAADUNDate Submitted: 1 6 0 7 2 0 2 0TABLE OF CONTENTSNOPARTICULARPAGE1.AKNOWLEDGEMENT32.EXECUTIVE SUMMARY4 - 53.PSEUDOCODE6 - 94.FLOWCHART10 - 165.LIST OF CO...


Description

CSC128 Fundamentals of Computer Problem Solving Individual Project Title : Hari Raya Cookies System

Student ID: Name:

Date Submitted:

2019427716 NUR AFRINA BINTI SAADUN

1

6

0

7

2

0

2

0

TABLE OF CONTENTS

NO

PARTICULAR

PAGE

1.

AKNOWLEDGEMENT

3

2.

EXECUTIVE SUMMARY

4-5

3.

PSEUDOCODE

6-9

4.

FLOWCHART

10 - 16

5.

LIST OF CODES

17 - 21

6.

DETAILS OF INPUT AND OUTPUT

7.

SCREEN LAYOUT

8.

REFERENCES

9.

RUBRIC

22

23 - 26

27

28 - 29

2

AKNOWLEDGEMENT

First of all, thanks to Allah S.W.T for his mercy and guidance in giving me full strength to complete this individual project. Even facing some difficulties in completing this project, I still managed to complete it. The success and final outcome of this project required a lot of guidance and assistance from many people and I’m extremely fortunate to have got this all along the completion of my project work. Whatever I’ve done is only due to such guidance and assistance and I would not forget to thank them. A lot of thanks to my course lecturer, Madam Suhanah binti Rosnan for giving me an opportunity to do this project and providing me all support and guidance which made me complete the project on time. I’m very grateful because I managed to complete this project within the time given by Madam Suhanah. Then, I would like to thanks to my parents, for supporting me mentally and physically not just during finishing this project but also during my whole studies. I would also like to expand my deepest gratitude to all those who have directly or indirectly guided me in writing this project.

3

EXECUTIVE SUMMARY

PROJECT TITLE Hari Raya Cookies System

PROJECT BACKGROUND Based on the title mentioned above, the main idea of this project is about food ordering system, and Hari Raya Cookies have been my choice to use in this system. Customers can order cookies either on Hari Raya or any occasion. They might want the cookies also for themselves. Since when it comes to Hari Raya, people usually will get any cookies to serve for guest who come to their house whether they get it from supermarket or order from online seller. In this system, online sellers can easily process their customers’ order according the type of cookies that has been choose. The function that I use in this system are for calculating the price of cookies that have been purchased, and the total price including with options Cash On Delivery (COD) or Postage. The system also will be repeated to enter another customer and calculate the total number chosen for each type of cookies. This system is very useful for online seller who always get many orders from the customers because usually they will use Whatsapp or Instagram platform to proceed their customers’ order. This situation could jammed if too many people are ordering. So, this system is beneficial for them because it is effective and systematic. Seller will not counter any problem to process the order that have been made. This is because, this system will automatically calculate the price according to the quantity, total price including delivery option and the most important thing that will help sellers is, this system will calculate the total sales of the day. The sellers will not have a calculation problem. They can get the total accurately. For the coding output, we will get the output of the customer’s details like name and address, the cookies price, the total price including with delivery charges, the total sales of the day and the total number chosen for each type of cookies.

OBJECTIVE 1. To count amount of cookies that have been sold for each type 2. To calculate the price after sum up with delivery charges 3. To calculate total sales of the day

4

PROJECT DESCRIPTION

COOKIESLICIOUS BY AFRINA Cookies Type

Chocolate chip [C]

Tart [T]

Cornflakes [F]

Cookies Name Walnut chocolate chips [W] Almond chocolate chips [A] Pineapple Tart [P] Cadbury Tart [D] Honey cornflakes [H] Chocolate cornflakes [L]

Size

Price (RM)

B

70.00

S B

35.00 70.00

S B

35.00 60.00

S B

30.00 65.00

S B

33.00 50.00

S B

25.00 55.00

S

28.00

B – Big ( 100 pcs ) S – Small ( 50 pcs )

5

Delivery Option

Cash on Delivery (RM5) Postage (RM10)

PSEUDOCODE Start while (answer == 'Y') totalCustomer++ Display customer : readData (name, address, cookiesType); if ( Ctype == 'C' || Ctype == 'c' ) Prompt user to enter cookies code read cookiesCode if ( Cname == 'W' || Cname == 'w') prompt user to enter size read size if (size == 'B') price = 70 else price = 35 walnutCus++ else if ( Cname == 'A' || Cname == 'a') prompt user to enter size read size if (size == 'B') price = 70 else price = 35 almondCus++ else display “Invalid code”

6

else if ( Ctype == 'T' || Ctype == 't') prompt user to enter cookies code read cookiesCode if ( Cname == 'P' || Cname == 'p') prompt user to enter size read size if (size == 'B') price = 60 else price = 30 pineCus++ else if ( Cname == 'D' || Cname == 'd') prompt user to enter size read size if (size == 'B') price = 65 else price = 35 cadCus++ else display “Invalid code” else if ( Ctype == 'F' || Ctype == 'f') prompt user to enter cookis code read cookiesCode if ( Cname == 'H' || Cname == 'h') prompt user to enter size read size if (size == 'B') price = 50 else price = 25 honCus++

7

else if ( Cname == 'L' || Cname == 'l') prompt user to enter size read size if (size == 'B') price = 55 else price = 28 choCus++ else display “Invalid code” else display “Invalid code” prompt user to enter quantity read quantity calculate price = totalPrice (price,quantity) calculate price = calcOption (price,addprice) display total price calculate totalSales += price prompt user to enter next customer (Y- Yes / N - No) read answer if Y, system will be repeated Display total number chosen for each cookies, total sales received of the day End

8

void readData (char name [ ], char address [ ], char& cookiesType) prompt user to enter customer’s name read name prompt user to enter customer’s address read address prompt user to enter cookies type read cookies type

double totalPrice (double price, int quantity) double totPayment = 0 calculate totPayment = price * quantity return totPayment double calcOption (double price, double addprice) prompt user to enter either COD - Y or Postage – N read option if (option == 'Y') addprice = 5 else addprice = 10 sum = price + addprice return sum;

9

FLOWCHART Start

While (answer == ‘Y’)

Totalcustomer++

ReadData (name, address, cookiesType)

if (Ctype == ‘C’ || Ctype == ‘c’)

T

Read cookiesName

T F

If (Cname == ‘W’ || Cname == ‘w’)

Read size

F

T If (Size == ‘B’) F

Price = 35

Price = 70

WalnutCus++

10

T

If (Cname == ‘A’ || Cname == ‘a’)

Read size

T F

Price = 35

Price = 70

almondCus++

Display “Invalid code”

if (Ctype == ‘T’ || Ctype == ‘t’)

F

F

If (Size == ‘B’)

T Read cookiesName

T

If (Cname == ‘P’ || Cname == ‘p’)

Read size

F

T If (Size == ‘B’) F

Price = 30

Price = 60

pineCus++

11

T

If (Cname == ‘D’ || Cname == ‘d’)

Read size

T

F If (Size == ‘B’)

F

Price = 65

Display “Invalid code”

if (Ctype == ‘F’ || Ctype == ‘f’)

F

T

Price = 35

cadCus++

Read cookiesName

T

If (Cname == ‘H’ || Cname == ‘h’)

Read size

T

F If (Size == ‘B’)

F Price = 25

Price = 50

honCus++

12

T

If (Cname == ‘L’ || Cname == ‘l’)

Read size

T

F If (Size == ‘B’)

F

Price = 55

Display “Invalid code”

Display “Invalid code”

Read quantity

price = totalPrice ( price, quantity )

price = calcOption (price,addprice)

Display total price

13

Price = 28

choCus++

totalSales += price

Read answer

T If (answer == ‘Y’)

F

Display the total number chosen by each cookies and total sales of the day

14

void readData (char name[ ], char address[ ], char& cookiesType)

Read name

Read address

Read cookies type

Return

double totalPrice (double price, int quantity)

double totPayment = 0

totPayment = price * quantity

Return totpayment

15

double calcOption (double price, double addprice)

double sum = 0

Read option

T

F

if (answer == ‘Y’)

addprice = 10

addprice = 5

sum = price + addprice

Return sum

16

LIST OF CODES #include #include #include using namespace std; void readData (char[], char[], char&); // declaration customer details double totalPrice (double,int); // declaration price according quantity double calcOption (double, double); // declaration price including delivery option int main() { char size, answer = 'Y', name[25], address[80]; char Ctype, Cname; // cookies type & cookies name char option; // delivery option double price = 0, totalSales = 0, addprice = 0; int quantity; // number of customer int totalCustomer = 0; // to control number chosen for each type of cookies int walnutCus = 0, almondCus = 0, pineCus = 0, cadCus = 0, honCus = 0, choCus = 0; // repetition for enter next customer while (answer == 'Y') { totalCustomer++; // number of customer cout...


Similar Free PDFs