C++ code for Shopping Mall
January 15, 2017 | Author: Arko Roy | Category: N/A
Short Description
Download C++ code for Shopping Mall...
Description
1.
CERTIFICATE OF ORIGINALITY
3
2
ACKNOWLEDGEMENT
4
3.
ABOUT THE PROJECT
5
4.
SYSTEM REQUIREMENTS
6
5.
HEADER FILES
7
6.
VARIABLE DESCRIPTION
8
7.
FUNCTION DESCRIPTION
10
8.
LOGIC DIAGRAM
11
9.
SOURCE CODE
12-28
10.
OUTPUT SCREENS
29-38
11.
BIBLIOGRAPHY
39
PG 3
This is to certify that this project work is submitted by Arka roy to the COMPUTER department, Kendriya Vidyalaya Garden Reach, Kolkata. It was carried out by him under the guidance & supervision OF RANJITA SARKAR MONDAL, head of computer science department during academics Year 2013-2014. Signature of TEACHER
PG 4
I wish to express my deep gratitude and sincere thanks To Principal, Mr. VENOGOPAL, Kendriya Vidyalaya Garden Reach school, Kolkata for his encouragement and for all Facilities that he provided for this project work. I sincerely appreciate this magnanimity by taking me into His fold for which I shall remain indebted to him. I extend my hearty thanks to Mrs. RANJITA SARKAR, Computer Science HOD, who guided me to the successful Completion of this project. I take this opportunity to Express my deep sense of gratitude for her invaluable Guidance, constant encouragement, constructive comments, Sympathetic attitude and immense motivation, Which has sustained my efforts at all stages Of this project work. I am also thankful to my group members Who have helped in each step of my Project work? I can't forget to offer my sincere thanks to my Classmates who helped me to carry out this project work Successfully & for their valuable advice & support, Which I received from them time to time.
ARKA ROY
PG 5
The project comprises of a shopping mall and is developed on the C++ platform so that the program can be used for account management and online shopping. Here you can shop to your heart’s content. Our program allows you to shop from different stores as it brings you a Daily Market, a Bookstore and a Gadget shop all under one roof. It even provides you with the feature of paying your bill online or saving it as a wish list. It also provides flexible paying option via VISA or COD. It has a special feature of displaying the previous bills along with the current bill.
Technical Information The logic of this program is based on selective delimitation by get line function in various files. Firstly we extract the categories by locating the ‘+’ sign in our storage file. Then the pointer is taken right to that category number by delimiting the pointer’s position through an iterative structure for the number of lines which equals to the choice number. For arts and diagrams, ASCII arts has been implemented from the file.
PG 6
Minimum System Requirements: Processor Intel Pentium III or above Hard-disk Space- – 20 MB RAM
– 512 mb or more
Platform
– Windows XP,7 or 8
Software : Borland Turbo C++ 5.02
PG 7
PG 7
1.) CONIO.H – TO USE CLEARSCREEEN AND GETCH FUNCTION FORFORMATTING IN PROGRAM 2.) IOSTREAM.HFOR USING INPUT OUTPUT PRE-DEFINED STREAM FUNCTIONS IN THE PROGRAM 3.) STRING.HTO USE STRING RELATED FUNCTIONS IN THE PROGRAM 4.) STDIO.HTO USE GETS() AND PUTS() FUNCTION FOR STRING INPUT 5.) FSTREAM.H – FOR USING INPUT AND OUTPUT FILES RELATED OPERATION IN THE PROGRAM 6.) STDLIB.H – TO USE STANDARD LIBRARY FUNCTIONS LIKE SRAND IN THE PROGRAM 7.) PROCESS.H - FOR USING INSTANTANEOUS EXIT FUNCTION IN THE PROGRAM 8.) TIME.H- FOR INITIALIZING SRAND WITH RANDOM NUMBER GENERATED BY THE SYSTEM INTERNAL CLOCK
PG 8
Function name
Name
Type
Use
blink()
ch
char
read from loading.txt
blink()
i
int
counter variable
blink()
d
long
to manipulate waiting period
blink()
q
long double
used in delay loop
billing_centre()
name
char(array)
holds the name of the customer
billing_centre()
district
char(array)
holds the district of the customer
billing_centre()
state
char(array)
holds the state of the customer
billing_centre()
area
char(array)
holds the area of the customer
billing_centre()
cno
char(array)
holds the visa card no. of the customer
billing_centre()
pin
long
holds pin number of customers location
billing_centre()
id
long
holds order id
billing_centre()
cb
int
accept choice for bank
billing_centre()
m
int
loop variable
billing_centre()
c
int
switch control variable
billing_centre()
bank
char(2-d array)
hold bank names
billing_centre()
l
char array
delimiter in user form
Function name
Name
Type
Use
PG 9
frontpage()
i,j
int
loop variable to design frontpage
readdata()
l
int
readdata()
price
long
Read length of the extracted line from file of the calling store Extract price from variable l
readdata()
pos
long
readdata()
sum
long
readdata()
cnf
int
readdata()
code
int
To accept the value for order confirmation Accept the user code
readdata()
cd
int
Code part of txt file in int form
readdata()
cnum
int
To accept choice from category list
readdata()
i,j
int
Looping variable
readdata()
quan
int
Accept quantity of each product
readdata()
menu
char array
Stores instantaneous category list
readdata()
line
char array
readdata()
word
char array
readdata()
ch1
char array
main()
z
int
main()
p
int
Extract the line store it from category Extract price from the line and store it To extract code from the line char form Put get pointer after each bill in output file While loop control variable
main()
nm
char array
main()
ch
char
To put the get point to the default position after looping Stores bill of instantaneous store
Store instantaneous dynamic output file name Switch control variable for store selection
PG 10
RETURN TYPE
FUNCTION NAME
FUNCTION DESCRIPTION
void
blink
Delay execution by printing “Loading”(using delay loop).
void
frontpage
Print the designed frontpage using file “mall.txt”.
void
display
Used to print the categories page of western gardens by importing form file “catagories.txt”.
void
billing centre
Store the user transaction details in file “payment.txt”.
void
readdata
Extract the product from stored text file as per user choice and store details in dynamically allocated file.
-void
main
Used to switch between different stores and implement operations accordingly.
PG 11
PG 12
/*................................................................................ LIST OF ALL THE HEADER FILES USED ..................................................................................*/ #include #include #include #include #include #include #include #include //-------------------------------- MACROS----------------------------------------#define pr "*=================================*” /*_____________________________________________________ THE DESIGN CLASS _______________________________________________________*/ class design { //DECLARATION OF CLASS VARIABLE public: long double total; //global variable
PG 13
// CONSTRUCTOR IMPLEMENTATION design() { total=0; } /* ============================================= FUNCTION PROTOTYPES ============================================= */ void display(); void frontpage(); void readdata(ifstream&,ifstream&,ifstream&,fstream&); void blink(); void billing_centre(); }; /* ============================================= FUNCTION DEFINATIONS ============================================= */
void design::blink() { system("cls"); //VARIABLE DECLARATIONS ifstream f2; char ch[1000]; int i=0,j; long len=i,d=0; f2.open("loading.txt",ios::in);
PG 14
while(f2) { ch[i]=(char)f2.get(); i++; } for(i=1;i
View more...
Comments