Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 44

TABLE OF CONTENT

NO. Content Page


1 Introduction 1-2
1.1 Problem Statement
1.2 Objective
1.3 Scope
2 Methodology 3-14
2.1 Software Development Life Cycle(SDLC/PDLC)
2.1.1 Analysis
2.1.2 Design
2.1.2.1 Pseudocode
2.1.2.2 Flow Chart
2.1.3 Implementation
2.1.4 Testing and Debugging
2.1.5 Maintenance
2.2 Gantt Chart
3 Conclusion 15
3.1 Conclusion
3.2 Future Work
4 References 16
5 Appendices 17-
5.1 Source Code 44
5.2 Print Screen output
5.3 User Manual
1
Page
INTRODUCTION

OriShoez is a system where customer can browse through the product catalog
and add the items to shopping cart. He can proceed to the checkout as long as his
shopping cart is not empty. Customer will require to login to the system when he
proceed to checkout, or he can create an account if he not yet have one. The order
will charge to the credit card registered in customer’s account. Customer need to
provide full name, email address, phone number, credit card and billing address details
when creating an account. Customer can login to the system to maintain his account
information, such as changing phone number ,address, and credit card details, and
check the status of his orders upon order received, the sales staff will process the
order by charge to customer’s credit card. Once the order has been charged, he will
then mark the order as paid and pass to the courier company and deliver them to
customer. If the items customer ordered is out of stock, then the order will mark as on
hold. Once the items arrived, the order will pass to the courier company for delivery.
Courier company will pack the item with standard packaging, but if the order is marked
as gift, then the items will pack as gift. If the items arrived are in damage, customer
can return it by register in the online shop. Courier company will collect the item from
customer and sales staff will refund the money for that item. Marketing staff are
responsible to maintain the product’s quality. He can also setup the promotion item list
and send promotion email to customer.
2
Page
Methodology

Analysis
In our project (OriShoez.com),we have done some survey and some analysis that can
be a guideline for us to build this system.This is the first step for us to start our project,then
make us to make a system that more arranged and easy to used.We also have took several
factors in this analysis regarding to the users of this system,the product and package that we
sell and the time taken to finish up this system.

Analysis of the users of this system:

Users

Shopping online buyers People that very love to shop without go to shop and
always search for a worth price for their items.
Shoes collecters They need a shop that have many type of shoes while
have a nice price.
Customer that from all ages They always search for package promotion that full their
need.

We providing the shoes size from kid until adult size.The delivery charge is free for all type of
packages and products.
Time taken to finish up building this this system ;
4 weeks.
3
Page
Analysis for our product and packages:
1)Main Products:

TYPE OF TYPE OF TYPE OF CODE PRICE


SHOES BRAND PATTERN PATTERN

Sport Nike Air Max N1 RM199.00

Tempo N2 RM230.00

Mercurial N3 RM270.00

Puma Evo Speed P1 RM250.00

Ignite 2 P2 RM239.00

Adidas Sala AD1 RM150.00

Air Jordan AD2 RM340.00

F50 AD3 RM170.00

Sneakers Converse Jack Purell CV1 RM210.00

Chuck Taylor CV2 RM250.00

New balance Ounce Canvas NB1 RM260.00

Vintage NB2 RM300.00

Vans Classic V1 RM180.00

London V2 RM200.00
4
Page

GumSole V3 RM289.00
2) Packages :

Package
Items Quantity Price (RM)
code

Sport Shoe 1

Shoe bag 1

A 290.00

Round Shoelace 1

Sport Sock 1

Sneaker Shoe 1

Backpack 1

B 320.00

Flat Shoelace 1

Casual Sock 1

C Nike Shoe 1
440.00

Converse Shoe 1
5
Page
3) Add on items:

No. Item code Item name Price (RM)

A1 Shoebag 29.90

A2 Backpack 49.00

B1 Round Shoelace 10.00

B2 Flat Shoelace 10.00

C1 Sport Sock 12.00

C2 Casual Sock 10.00


6
Page
Design

1.Flowchart

Start
Declare variables : Price, totPrice, amt_due, qty, type_brand, items, package,
code_pack,
code_pattern, type_shoes, type_pattern, item_code,
item_name, disc,
totAmt_Due, addOns, tax.
Read type_shoes, code_pattern, code_pack, item_code

If (strcmp (package, PACKAGE)==0)


If( strcmp (code_pack, A)==0)
Price = 290.00
else if (strcmp (code_pack, B)==0)
Price = 320.00
else if (strcmp (code_pack, C)==0)
Price = 440.00

else if (strcmp (package, TYPE OF SHOES )==0)


if (strcmp (type_shoes, sports)==0)
if (strcmp (code_pattern, N1)==0)
Price= 199.00
else if (strcmp(code_pattern, N2)==0)
Price= 230.00
else if (strcmp(code_pattern, N3 )==0)
Price= 270.00
else if (strcmp(code_pattern, P1)==0)
Price= 250.00
else if(strcmp(code_pattern, P2)==0)
Price= 239.00
7

else if(strcmp(code_pattern,AD1)==0)
Page

Price= 150.00
else if (strcmp(code_pattern,AD2)==0)
Price= 340.00
else if(strcmp(code_pattern, AD3)==0)
Price= 170.00

else if (strcmp(type_shoes, sneakers)==0)


if (strcmp (code_pattern,CV1)==0)
Price= 210.00
else if (strcmp (code_pattern,CV2)==0)
Price= 250.00
else if (strcmp(code_pattern, NB1)==0)
Price= 260.00
else if (strcmp(code_pattern, NB2)==0)
Price= 300.00
else if (strcmp(code_pattern, V1)==0)
Price= 180.00
else if (strcmp(code_pattern, V2)==0)
Price= 200.00
else if (strcmp(code_pattern, V3)==0)
Price= 289.00

else if (strcmp(addOns, A1)==0)


Price= 29.90
if (strcmp(addOns, A2)==0)
Price = 49.00
else if (strcmp(addOns, B1)==0)
Price = 10.00
else if (strcmp(addOns, B2)==0)
Price = 10.00
else if (strcmp(addOns, C1)==0)
8

Price = 12.00
Page

else if (strcmp(addOns, C2)==0)


Price = 10.00

totPrice = Price * package + Price * type_shoes + Price * addOns


tax = 0.06 * totPrice
amt_due = tax + totPrice
if (amt_due >= 500 && amt_due <= 1000)
disc = 0.05
else if (amt_due > 1000 && amt_due <=1500)
disc = 0.10
else if (amt_due > 1500 && amt_due <=3000)
disc = 0.20

totAmt_due = amt_due * disc

Display totAmt_due

End
9
Page
Implementation

Week Step Task

1 1 Brainstorm for our project

1 2 Decided our product and title

2 3 Design our project

2 4 Finished up Flowchart and pseudocode

3 5 Start our coding and build up the system

3 6 Discuss the error and fix all the error in our system

4 7 Presentation about our project in class

4 8 Done our report and submit it to Miss Syafikah


10
Page
TESTING: SAMPLE INPUT AND OUTPUT

Sample Input 1

Sample Output 1
11
Page
Page
12
Sample Input 2
13
Page
Sample output 2
14
Page
CONCLUSION

In the course, Fundamentals of Computer Problem Solving, we have learned about the uses
and importance of computer in the modern application which include in engineering. We also
have understand of how the computer works. Other knowledge we gain from this course
includes using the nessesary steps in creating a basic program sourse code. Wide range of
application of the couse is also introduced to us, which includes, the If-else statements, loops,
functions and others. In this project, we have used a few of the application in making our
OriShoesz.com a success. Some of the applications we used is the if-else statements, loop,
and functions. These application are implemented to produce a simple and and effective
program. Continuous test is conducted to ensure the program does not produce any errors
when running. In conclusion, each purpose mentioned in the objective was able to be achieved
with the help of the program we created. With the help of our lecturer, we are able to proceed
with our online business which is OriShoesz.com
15
Page
REFERENCES

1. Stroustrup, Bjarne. "The C++ Programming Language" (Second ed.). Retrieved on 14


March 2017 .

2. Re: [RFC] Convert builin-mailinfo.c to use The Better String Library" (Mailing list). 6
September 2007. Retrieved on 14 March 2017.

3. Stroustrup, Bjarne (7 March 2010). "Bjarne Stroustrup's FAQ: When was C++
invented?". stroustrup.com. Retrieved on 14 March 2017 .

Abrahams, David; Gurtovoy, Aleksey. C++ Template Metaprogramming: Concepts, Tools,


and Techniques from Boost and Beyond. Addison-Wesley. ISBN 0-321-22725

4. Harry. H. Chaudhary (28 July 2014). "Cracking The Java Programming Interview ::
2000+ Java Interview Que/Ans". Retrieved on 14 March 2017 .
16
Page
APPENDICES

a) Source code :
#include <iostream>
#include <iomanip>
#include <string.h>
#include <cmath>

using namespace std;

//function prototype
void typeOfShoes();
float calcShoes(char[10], int);
void addOns();
float typeofitem(char[10], int);

int main(){

char name[50] = "";


char package[30] = "";
char pCode =' ';
char numTel[30] = "";
char numAcc[30] = "";
char patternCode[10] = "";
char shType[15] = "";
char brand[15] = "";
char patternType[15] = "";
char itemName[15] = "";
char itemCode[10] = "";
17

char addpackage;
Page
char addshoes;
char additem;
float pricePackageA = 0.0;
float pricePackageB = 0.0;
float pricePackageC = 0.0;
float totPricePackage = 0.0;
float totPriceShoe = 0.0;
float price = 0.0;
float totPriceItem = 0.0;
float priceItem = 0.0;
float sumitem = 0.0;
float sumS = 0.0;
float totOrder = 0.0;
float amountDue = 0.0;
int quantityPackageA = 0;
int quantityPackageB = 0;
int quantityPackageC = 0;
int addShoes = 0;
int quantityPackage = 0;
int quantityaddshoes = 0;
int quantityadditem = 0;
float deliverycharge = 0.0;
char ansYes[5] = "";
char ansNo[5] = "";
char ans = ' ';

cout <<
"***********************************************************************************************
*************************************************************************" << endl;
cout << "\t\t\t\t\t\t\t\t\t\tWELCOME TO ORISHOEZ.COM.MY " <<
18

endl;
Page
cout <<
"\n*********************************************************************************************
**************************************************************************" << endl << endl;

cout <<
"***********************************************************************************************
*************************************************************************" << endl;
cout << "\t\t\t\t\t\t\t\t\t\tWELCOME TO ORISHOEZ.COM.MY " <<
endl;
cout <<
"\n*********************************************************************************************
**************************************************************************" << endl << endl;

cout << "----------------------------------------------------------------------------------- -------


-------------------------------------------------------------------- " << endl;
cout << "\t\t\t\tAVAILABLE PACKAGE\t\t\t \tTYPE OF
SHOES
" << endl;
cout << "----------------------------------------------------------------------------------- -------
-------------------------------------------------------------------- " << endl;
cout << "Package Code\tPackage Name\t\tItem\t\tPrice(RM)
\tTYPE OF SHOES :: BRAND ::PATTERN CODE::TYPE OF PATTERN ::
PRICE(RM)
" << endl;
cout << "----------------------------------------------------------------------------------- -------
-------------------------------------------------------------------- " << endl;
cout << "A :: Promotion Sporty Shoes\t1 SportShoe \t\t\t\tSPORTY
\t\tNIKE N1 \tAIR MAX \t199.00 "
<< endl;
cout << "\t\t\t\t\t1 ShoeBag\t\t290.00
N2 \tTEMPO \t230.00
" << endl;
cout << "\t\t\t\t\t1 RoundShoelace
N3 \tMERCURIAL \t270.00
" << endl;
cout << "\t\t\t\t\t1 SportSock \t\t\t\t\tPUMA P1 \tEVO
SPEED \t250.00 "
<< endl;
19
Page
cout << "----------------------------------------------------------------------------------
P2 \tIGNITE 2 \t239.00
" << endl;
cout << "B :: Promotion Sneaker Shoes\t1 SneakerShoe
\t\t\t\t\t\tADIDAS AD1 \tSALA \t150.00
" << endl;
cout << "\t\t\t\t\t1 BackPack\t\t320.00 AD2
AIR JORDAN \t340.00
" << endl;
cout << "\t\t\t\t\t1 FlatShoelace
AD3 F50 \t170.00
" << endl;
cout << "\t\t\t\t\t1 CasualSock \t--------------------------
-------------------------------------------------
" << endl;
cout << "-----------------------------------------------------------------------------------
\tSNEAKERS\t CONVERSE CV1 JACK PURCELL\t210.00
" << endl;
cout << "C :: Promotion Double Shoes\t1 NikeShoe
CV2 CHUCK TAYLOR \t250.00 "
<< endl;
cout << "\t\t\t\t\t1 ConverseShoe\t\t440.00 NEW
BALANCE NB1 OUNCE CANVAS \t260.00
" << endl;
cout << "
NB2 VINTAGE \t300.00
" <<
endl;
cout << " \t\t\t\tVANS
V1 CLASSIC \t180.00
" << endl;
cout << "
V2 LONDON \t200.00

" << endl;


20
Page
cout << "
V3 GUMSOLE \t289.00
" << endl;
cout << "--------------------------------------------------------------------------------------------
---------------------------------------------------------------------- \n
" << endl <<endl;

cout << "Enter name : ";


cin.getline(name,50);
cout << "Enter Account Number : ";
cin >> numAcc;
cout << "Enter Telephone Number : ";
cin >> numTel;
cout << "You want to purchase package <Y/N> ?: ";
cin >> ans;

if (ans != 'N' && ans != 'n'){


cout <<
"************************************************************************************" << endl;
cout << "***Package Code\t\tPackage Name\t\tItem\t\t\tPrice(RM)***" << endl;
cout <<
"************************************************************************************" << endl;
cout << "***\tA :: Promotion Sporty Shoes\t1 SportShoe" << endl;
cout << "\t\t\t\t\t\t1 ShoeBag\t\t290.00 " << endl;
cout << "\t\t\t\t\t\t1 RoundShoelace" << endl;
cout << "\t\t\t\t\t\t1 SportSock" << endl;
cout <<
"************************************************************************************" << endl;
cout << "***\tB :: Promotion Sneaker Shoes\t1 SneakerShoe " << endl;
cout << "\t\t\t\t\t\t1 BackPack\t\t320.00 " << endl;
cout << "\t\t\t\t\t\t1 FlatShoelace" << endl;
21

cout << "\t\t\t\t\t\t1 CasualSock" << endl;


Page
cout <<
"************************************************************************************" << endl;
cout << "***\tC :: Promotion Double Shoes\t1 NikeShoe " << endl;
cout << "\t\t\t\t\t\t1 ConverseShoe\t\t440.00 " << endl;
cout <<
"\n************************************************************************************\n\n" <<
endl;

do{
cout << "\nEnter the package code : ";
cin >> pCode;

if(pCode == 'A' || pCode == 'a'){

cout << "\n----------------------------------------------------" <<


endl;
cout << "--- \tBRAND :: PATTERN CODE :: TYPE OF
PATTERN " << endl;
cout << "----------------------------------------------------" << endl;
cout << "---\tNIKE :: N1 :: AIR MAX ---" <<
endl;
cout << "---\t :: N2 :: TEMPO ---" << endl;
cout << "---\t :: N3 :: MERCURIAL ---" <<
endl;
cout << "----------------------------------------------------" << endl;
cout << "---\tPUMA :: P1 :: EVO SPEED ---" <<
endl;
cout << "---\t :: P2 :: IGNITE 2 ---" << endl;
cout << "----------------------------------------------------" << endl;
cout << "---\tADIDAS :: AD1 :: SALA ---" <<
endl;
cout << "---\t :: AD2 :: AIR JORDAN ---" <<
22

endl;
Page

cout << "---\t :: AD3 :: F50 ---" << endl;


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

strcpy(package,"Promotion Sporty Shoes");

cout << "Enter Pattern code : ";


cin >> patternCode;
//cout << "\n Enter quantity : ";
//cin >> quantityPackage;

pricePackageA = 290.00;
quantityPackageA++;

else if (pCode == 'B' || pCode == 'b'){

cout << "\n---------------------------------------------------------" <<


endl;
cout << "--- \tBRAND :: PATTERN CODE :: TYPE OF
PATTERN " << endl;
cout << "---------------------------------------------------------" <<
endl;
cout << "---\tCONVERSE :: CV1 :: JACK PURCELL
" << endl;
cout << "---\t :: CV2 :: CHUCK TAYLOR "
<< endl;
cout << "\n---------------------------------------------------------" <<
endl;
cout << "---\tNEW BALANCE :: NB1 :: OUNCE
CANVAS " << endl;
cout << "---\t :: NB2 :: VINTAGE " <<
23

endl;
Page
cout << "---------------------------------------------------------" <<
endl;
cout << "---\tVANS :: V1 :: CLASSIC ---" <<
endl;
cout << "---\t :: V2 :: LONDON ---" << endl;
cout << "---\t :: V3 :: GUMSOLE ---" <<
endl;
cout << "--------------------------------------------------------" <<
endl;

strcpy(package,"Promotion Sneaker Shoes");


cout << "\nEnter Pattern code : ";
cin >> patternCode;

pricePackageB = 320.00;
quantityPackageB++;
}

else if (pCode == 'C' || pCode == 'c'){


strcpy(package,"Promotion Double Shoes");

cout << "\n----------------------------------------------------" <<


endl;
cout << "--- \tBRAND :: PATTERN CODE :: TYPE OF
PATTERN ---" << endl;
cout << "----------------------------------------------------" << endl;
cout << "---\tNIKE :: N1 :: AIR MAX ---" <<
endl;
cout << "---\t :: N2 :: TEMPO ---" << endl;
cout << "---\t :: N3 :: MERCURIAL ---" <<
endl;
24

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


Page
cout << "---\tPUMA :: P1 :: EVO SPEED ---" <<
endl;
cout << "---\t :: P2 :: IGNITE 2 ---" << endl;
cout << "----------------------------------------------------" << endl;
cout << "---\tADIDAS :: AD1 :: SALA ---" <<
endl;
cout << "---\t :: AD2 :: AIR JORDAN ---" <<
endl;
cout << "---\t :: AD3 :: F50 ---" << endl;
cout << "----------------------------------------------------" << endl;
cout << "---\tCONVERSE :: CV1 :: JACK PURCELL
---" << endl;
cout << "---\t :: CV2 :: CHUCK TAYLOR -
--" << endl;
cout << "\n----------------------------------------------------" <<
endl;
cout << "---\tNEW BALANCE :: NB1 :: OUNCE
CANVAS ---" << endl;
cout << "---\t :: NB2 :: VINTAGE ---"
<< endl;
cout << "----------------------------------------------------" << endl;
cout << "---\tVANS :: V1 :: CLASSIC ---" <<
endl;
cout << "---\t :: V2 :: LONDON ---" <<
endl;
cout << "---\t :: V3 :: GUMSOLE ---" <<
endl;
cout << "----------------------------------------------------" << endl;

cout << "\nEnter Pattern code : ";


cin >> patternCode;

pricePackageC = 440.00;
25

quantityPackageC++;
Page
}

cout << "\nYou want to add more package ?<Y/N> : ";


cin >> addpackage;

} while(addpackage != 'N' && addpackage != 'n');

totPricePackage = (pricePackageA * quantityPackageA) +


(pricePackageB * quantityPackageB) + (pricePackageC * quantityPackageC);
cout << "Total price for package = " << totPricePackage << endl;

cout << "\nYou want to add shoes <Y/N> ?:";


cin >> addshoes;

if (addshoes != 'N' && addshoes != 'n'){

//function call
typeOfShoes();

do{

cout << "Enter pattern code : ";


cin >> patternCode;
cout << "Enter quantity : ";
cin >> quantityaddshoes;

sumS = sumS + calcShoes(patternCode, quantityaddshoes);


26

cout << "\nYou want to add more shoes ?<Y/N> : ";


Page

cin >> addshoes;


}while (addshoes != 'N' && addshoes !='n');

cout << "Total price of shoes = " << sumS << endl;

cout << "You want to add item? <Y/N> : ";


cin >> additem;

if (additem != 'N' && additem != 'n'){

addOns();

do{

cout << "Enter Item code : ";


cin >> itemCode;
cout << "Enter quantity : ";
cin >> quantityadditem;

sumitem = sumitem + typeofitem(itemCode, quantityadditem);

cout << "\nYou want to add more item ?<Y/N> : ";


cin >> additem;

}while (additem != 'N' && additem !='n');


27

//cout << "\nSum item = " << sumitem;


Page
}
totOrder = sumitem + sumS + totPricePackage;
cout << "\nTotal price of your orders : " << totOrder;

//without package
else{

typeOfShoes();

do{

cout << "Enter pattern code : ";


cin >> patternCode;
cout << "Enter quantity : ";
cin >> quantityaddshoes;

sumS = sumS + calcShoes(patternCode, quantityaddshoes);

//cout << "sumS = " << sumS << endl;

cout << "\nYou want to add more shoes ?<Y/N> : ";


cin >> addshoes;
28
Page
}while (addshoes != 'N' && addshoes !='n');

cout << "Total price of shoes = " << sumS << endl;

cout << "\nYou want to add item? <Y/N> : ";


cin >> additem;

if(additem != 'N' && additem != 'n'){

addOns();

do{

cout << "Enter item code : ";


cin >> itemCode;
cout << "Enter quantity : ";
cin >> quantityadditem;

sumitem = sumitem + typeofitem(itemCode,


quantityadditem);//itemCode, quantityadditem);

cout << "Do you want add more item?<Y/N> ";


cin >> additem;

}while(additem != 'N' && additem != 'n');

totOrder = sumitem + sumS + totPricePackage;


29

cout << "\nTotal price of your orders : " << totOrder;


Page
}

deliverycharge = totOrder + 5.00;


amountDue = (deliverycharge * 0.06) + deliverycharge;

cout << "\n\n****************************************************************"


<< endl;
cout << "\t\tRECEIPT" << endl;
cout << "****************************************************************" <<
endl;
cout << "Name = " << name << endl;
cout << "Your Delivery charge = " << deliverycharge << endl;
cout << "Total Price include gst = " << amountDue << endl;
cout << "****************************************************************" <<
endl;
cout << "\t\tTHANK YOU" << endl;
cout << "\n****************************************************************" <<
endl;

return 0;

void typeOfShoes() {

cout <<
"\n*****************************************************************************************"
<< endl;
cout << "\t\t\t\tTYPE OF SHOES\t\t\t" << endl;
cout <<
"*****************************************************************************************" <<
endl;
30

cout << "--- \tTYPE OF SHOES :: BRAND :: PATTERN CODE :: TYPE OF


Page

PATTERN :: PRICE(RM) " << endl;


cout <<
"*****************************************************************************************" <<
endl;
cout << "---\tSPORTY\t\t NIKE N1 \tAIR MAX\t\t\t199.00 " <<
endl;
cout << "---\t\t\t\t N2 \tTEMPO\t\t\t230.00 " << endl;
cout << "---\t\t\t\t N3 \tMERCURIAL\t\t270.00 " << endl;
cout << "---\t\t\t PUMA P1 EVO SPEED\t\t250.00 " << endl;
cout << "---\t\t\t\t P2 IGNITE 2\t\t239.00 " << endl;
cout << "---\t\t\t ADIDAS AD1 SALA\t\t\t150.00 " << endl;
cout << "---\t\t\t\t AD2 AIR JORDAN\t\t340.00 " << endl;
cout << "---\t\t\t\t AD3 F50\t\t\t170.00 " << endl;
cout <<
"*****************************************************************************************" <<
endl;
cout << "---\tSNEAKERS\t CONVERSE CV1 JACK
PURCELL\t\t210.00 " << endl;
cout << "---\t\t\t\t CV2 \tCHUCK TAYLOR\t\t250.00 " << endl;
cout << "---\t\t\t NEW BALANCE NB1 OUNCE CANVAS\t\t260.00
" << endl;
cout << "---\t\t\t\t NB2 VINTAGE\t\t\t300.00 " << endl;
cout << "---\t\t\t VANS V1 CLASSIC\t\t\t180.00 " << endl;
cout << "---\t\t\t\t V2 LONDON\t\t\t200.00 " << endl;
cout << "---\t\t\t\t V3 GUMSOLE\t\t\t289.00 " << endl;

cout <<
"*****************************************************************************************\n"
<< endl <<endl;

float calcShoes(char patternCode[10],int quantityaddshoes){


31
Page

float price, totPriceShoe, sumshoes;


//cout << "code = " << patternCode << endl;
//cout << "quantity = " << quantityaddshoes << endl;

if (strcmp(patternCode , "N1")==0){
price = 199.00;
totPriceShoe = price * quantityaddshoes;
sumshoes = sumshoes + totPriceShoe;
}
else if (strcmp(patternCode, "N2")==0){
price = 230.00;
totPriceShoe = price * quantityaddshoes;
sumshoes = sumshoes + totPriceShoe;
}
else if (strcmp(patternCode , "N3")==0){
price = 270.00;
totPriceShoe = price * quantityaddshoes;
sumshoes = sumshoes + totPriceShoe;
}
else if (strcmp(patternCode , "P1")==0){
price = 250.00;
totPriceShoe = price * quantityaddshoes;
sumshoes = sumshoes + totPriceShoe;
}
else if (strcmp(patternCode , "P2")==0){
price = 239.00;
totPriceShoe = price * quantityaddshoes;
sumshoes = sumshoes + totPriceShoe;
}
32

else if (strcmp(patternCode , "AD1")==0){


Page
price = 150.00;
totPriceShoe = price * quantityaddshoes;
sumshoes = sumshoes + totPriceShoe;
}
else if (strcmp(patternCode , "AD2")==0){
price = 340.00;
totPriceShoe = price * quantityaddshoes;
sumshoes = sumshoes + totPriceShoe;
}
else if (strcmp(patternCode , "AD3")==0){
price = 170.00;
totPriceShoe = price * quantityaddshoes;
sumshoes = sumshoes + totPriceShoe;
}
else if (strcmp(patternCode , "CV1")==0){
price = 210.00;
totPriceShoe = price * quantityaddshoes;
sumshoes = sumshoes + totPriceShoe;
}
else if (strcmp(patternCode , "CV2")==0){
price = 250.00;
totPriceShoe = price * quantityaddshoes;
sumshoes = sumshoes + totPriceShoe;
}
else if (strcmp(patternCode , "NB1")==0){
price = 260.00;
totPriceShoe = price * quantityaddshoes;
sumshoes = sumshoes + totPriceShoe;
}
33

else if (strcmp(patternCode , "NB2")==0){


Page
price = 300.00;
totPriceShoe = price * quantityaddshoes;
sumshoes = sumshoes + totPriceShoe;
}
else if (strcmp(patternCode , "V1")==0){
price = 180.00;
totPriceShoe = price * quantityaddshoes;
sumshoes = sumshoes + totPriceShoe;
}
else if (strcmp(patternCode , "V2")==0){
price = 200.00;
totPriceShoe = price * quantityaddshoes;
sumshoes = sumshoes + totPriceShoe;
}
else if (strcmp(patternCode , "V3" )==0){
price = 289.00;
totPriceShoe = price * quantityaddshoes;
sumshoes = sumshoes + totPriceShoe;
}
//cout << "sum1 = " << sumshoes << endl;

return sumshoes;

void addOns(){

cout << "\n*************************************************************" << endl;


cout << "\t\t\tADD-ONS PACK\t\t\t\t" << endl;
34

cout << "*************************************************************" << endl;


Page
cout << "--- \tITEM CODE ::\t ITEM NAME \t :: PRICE(RM) ---" << endl;
cout << "---\tA1\t :: SHOEBAG :: 29.90 ---" << endl;
cout << "---\tA2 :: BACKPACK :: 49.00 ---" << endl;
cout << "-------------------------------------------------------------" << endl;
cout << "---\tB1\t :: ROUND SHOELACE :: 10.00 ---" << endl;
cout << "---\tB2 :: FLAT SHOELACE :: 10.00 ---" << endl;
cout << "-------------------------------------------------------------" << endl;
cout << "---\tC1 \t :: SPORT SOCK :: 12.00 ---" << endl;
cout << "---\tC2 :: CASUAL SOCK :: 10.00 ---" << endl;
cout << "*************************************************************" << endl;

float typeofitem(char itemCode[10] ,int quantityadditem){

float priceItem, totPriceItem, sumitem;

if (strcmp(itemCode , "A1")==0){
priceItem = 29.90;
totPriceItem = priceItem * quantityadditem;
sumitem = sumitem + totPriceItem;
}
else if (strcmp(itemCode , "A2")==0){
priceItem = 49.00;
totPriceItem = priceItem * quantityadditem;
sumitem = sumitem + totPriceItem;
}
else if (strcmp(itemCode , "B1")==0){
priceItem = 10.00;
35

totPriceItem = priceItem * quantityadditem;


Page
sumitem = sumitem + totPriceItem;
}
else if (strcmp(itemCode , "B2")==0){
priceItem = 10.00;
totPriceItem = priceItem * quantityadditem;
sumitem = sumitem + totPriceItem;
}
else if (strcmp(itemCode , "C1")==0){
priceItem = 12.00;
totPriceItem = priceItem * quantityadditem;
sumitem = sumitem + totPriceItem;
}
else if (strcmp(itemCode , "C2")==0){
priceItem = 10.00;
totPriceItem = priceItem * quantityadditem;
sumitem = sumitem + totPriceItem;
}
return sumitem;

}
36
Page
b) Screen Output :

THIS IS THE FULL OUTPUT IF USER KEY IN THE RIGHT CODE FOR PACKAGE
37
Page
Page
38
THIS IS USER ENTERED INVALID CODE
39
Page
THIS IS THE FULL OUTPUT IF USER KEY IN THE RIGHT CODE FOR NON PACKAGE

c) User Manual
40

All the table package and pattern will displayed to user make a selection.
Page
1. User have to key in their personal information include Name, Account No, and Tel. No.
to be displayed on receipt.
2. Next, user have to choose wether he/she want purchase by package or without package
by entering code ‘Y’ or ‘y’ for yes and ‘N’ or ‘n’ for no.
3. If yes user have to choose package by entering code ‘A’ , ‘B’ or ‘C’.

Package
Items Quantity Price (RM)
code

Sport Shoe 1

Shoe bag 1
A 290.00
Round Shoelace 1

Sport Sock 1

Sneaker Shoe 1

Backpack 1
B 320.00
Flat Shoelace 1

Casual Sock 1

C Nike Shoe 1
440.00
Converse Shoe 1
4. Next, a list of pattern in pakage A will be displayed and user have to key
in the correct code for pattern that he/she wanter to buy shown in Fig1
TYPE OF TYPE OF CODE
41

BRAND PATTERN PATTERN


Page
Nike Air Max N1

Tempo N2

Mercurial N3

Puma Evo Speed P1

Ignite 2 P2

Adidas Sala AD1

Air Jordan AD2

F50 AD3

Figure 1

5. If user choose package B the list of pattern in pakage B will displayed and user have to key in the
correct code for pattern shown in fig 2.
Converse Jack Purell CV1

Chuck Taylor CV2

New balance Ounce Canvas NB1

Vintage NB2

Vans Classic V1

London V2
42
Page
GumSole V3

6. If user choose package C the list of pattern in pakage C will displayed and user have to key in the
correct code for pattern shown in fig 3.

Nike Air Max N1 RM199.00

Tempo N2 RM230.00

Mercurial N3 RM270.00

Puma Evo Speed P1 RM250.00

Ignite 2 P2 RM239.00

Adidas Sala AD1 RM150.00

Air Jordan AD2 RM340.00

F50 AD3 RM170.00

Converse Jack Purell CV1 RM210.00

Chuck Taylor CV2 RM250.00

New balance Ounce Canvas NB1 RM260.00

Vintage NB2 RM300.00

Vans Classic V1 RM180.00


43

London V2 RM200.00
Page
GumSole V3 RM289.00

Fig 3.

7. After that, user have to answered wether he/she want addd package or not.

8. If no, next user have to answered wether he/she want to add shoes of not.

9. If no, finally user have to answered wether he/she want add item or not.

10. If user choose yes, the table item will displayed shown in Figure 4.

A1 Shoebag 29.90

A2 Backpack 49.00

B1 Round Shoelace 10.00

B2 Flat Shoelace 10.00

C1 Sport Sock 12.00

C2 Casual Sock 10.00

Fig 4.

11. The wrong key in code will terminate.


12. After user id done purchasing all item, an ouput of receipt will be printed and user can
check wether all quantities were inserted correctly.
44
Page

You might also like