Hyper market management system project +2 computer science
-
Upload
vaishak-ap -
Category
Education
-
view
278 -
download
0
Transcript of Hyper market management system project +2 computer science
HYPER
MARKET
MANAGEMENT
SYSTEM
ACKNOWLEDGEMENT
It’s always a great satisfaction when we see that our dreams are given a shape. So thanks to the unseen powers who guided us throughout the project.
I feel great pleasure to express my gratitude and obligation to Sri A.Balakrishnan, Principal of Nithyananda Bhavan English Medium School.
I also express my sincere thanks to Mrs Aadithya Raj, Computer Teacher, Nithyananda Bhavan English Medium School for her encouragement and valuable guidance during the entire period of work. I am deeply indebted to my parents for their continued support and encouragement.
I would also thank all of my friends for their whole-hearted support and encouragement without with this project would not have been successful.
Above all, I bow my head to Almighty who blessed me with good health and confidence for the successful completion of this project.
CONTENTS
1. INTRODUCTION
2. WORKING ENVIRONMENT
3. SYSTEM ANALYSIS EXISTING SYSTEM
DRAWBACKS
PROPOSED SYSTEM
4. SYSTEM DESIGN
5. SCREENS AND OUTPUT
6. SOURCE CODE
7. CONCLUSION
8. BIBLIOGRAPHY
1
INTRODUCTION
This project “Hyper Market Management System” is developed in C++, which is one of the object oriented language that could be the most powerful link to future programming methodologies. One of the main reason behind the success of C++ is that it support object oriented technology i.e. it uses real life concept for its programming. One can easily understand the importance of C++ from the following lines.
“Object oriented technology is regarded as the ultimate paradigm for modeling of information be in dated logic++ has by now shown to fulfill this goal”.
This project aims at computerization of the manual billing system. There are numerous advantage of this system like speed, efficiency, reliability and accessibility.
This helps in making the system more sophisticated and user friendly.
This helps in saving the precious time. Error while handling the system can also be minimized.
It has been coded after thorough study of existing system of management. This program is ventured to represent the management facilities in the present world. In this program you can add new products to the menu, modify or delete existing products and finally generate bill for the customer.
2
WORKING ENVIRONMENT
SOFTWARE
Platform : Microsoft Windows XP
Language : C++
HARDWARE
Processor : Intel Celeron D
Clock speed : 333MHz
RAM : 512 MB
Hard disk capacity : 80 GB
Pen drive : 2 GB
Bit Specification : 32 bits
Keyboard : Logitech 104 Keys
Mouse : Logitech Optical
Display Device : View Sonic Color Monitor.
3
SYSTEM ANALYSIS
System analysis is general term that refers to an orderly, structured process for identifying and solving problems. We call this system analysis process the life cycle methodology since it relates to four significant phases in the life cycle of all the system; study, design, development and operation.
Analysis implies the process of breaking something down into its parts so that the whole may be understood. The definition of system analysis but also that of synthesis which is the process of putting parts together to form a new whole.
EXISTING SYSTEM
The existing system is very paper based in small as well as medium hypermarkets. Even though the paper work and manpower requirement is less, the existing system is not very economical for these markets. Relevant and irrelevant information are entered and stored in the same place, which is very clumsy and untidy process.
In case of big hypermarkets, the existing system is computerized to some extent, but it is not fully automated to cover all the aspects of the hypermarket. The data entry, storing, and retrieval procedure is very inefficient. Further, there are chances of data misplacement and wrong data entry. The system is still very insecure and inflexible to adapt to user requirements.
4
DRAWBACKS
Lack of security of data. More man power. Time consuming. Consumes large volume of pare work. Needs manual calculations. Less efficient.
PROPOSED SYSTEM
The proposed hypermarket management system aims at full automation of big, medium, and mini hypermarkets by making the system reliable, fast, user-friendly, and informative. It reduces paperwork, manpower requirement, and increases the productivity of the hypermarket. Using this application, one can add, modify, update, save, delete, and print details. There’s also a search feature to find products available in the hypermarket.
5
SYSTEM DESIGN This project is based on C++ programming. The C programming language was created as a structured programming tool for writing operating systems. The C programming became famous of its characteristic features like speed, compactness and very low level features. But over the year it was found that structured programming had flaws and limitations. It was difficult to manage complex programming projects. Therefore in 1983 Bjarne Stroustup created C++ as a separate language based on syntax on C.
The new C++ supports classes and object oriented programming.
The object oriented programming gives primary importance to data being operated up on instead of operating themselves. It combines the data to its functions in such a way that access to data is allowed through its associated functions.
This program is based on:
1. Classes 2. Files 3. Input\output.
CLASS
A class is technique used to engulf all information regarding a particular entity and it also contains the member functions, which enables the running of the program.
The class used in the project is product.
6
Class Design
Class Name : product Data Members : int pno
int qty
char name[50]
float price
float dis
Member Functions:
void create_product( );
void show_product( );
int retpno( );
int retprice( );
int retname( );
int retdis( );
File
A file is a collection of logically related information. It is also a means to store data, having appreciably large storage space. This is done so because the database of such program is too large that it cannot be stored in the main memory.
The file used in the project is Shop.dat
7
INPUT\OUTPUT
ADMINISTRATOR o CREATE PRODUCT o DISPLAY ALL PRODUCTS o QUERY o MODIFY PRODUCT o DELETE PRODUCT o VIEW PRODUCT MENU o BACK TO MAIN MENU
CUSTOMER EXIT
1. ADMINISTRATOR This option takes us to the admin menu.
a. CREATE PRODUCT
Product details can be added with this option. b. DISPLAY ALL PRODUCTS
Details of the products are shown with this option. c. QUERY
This option is used to search the details of a product. d. MODIFY PRODUCT
This option is used to update the details of a product. e. DELETE PRODUCT
This option is used to remove a product from the menu. f. VIEW PRODUCT MENU
This option is used to display the product menu. g. BACK TO MAIN MENU
This option takes us back to the main menu. 2. CUSTOMER This option is used to generate bill for the customer. 3. EXIT This option helps to exit from the program.
8
SCREENS
&
OUTPUTS
9
INTRODUCTION
LOADING….
10
WELCOME SCREEN
MAIN MENU
11
ADMINISTRATOR MENU
CREATE PRODUCT
12
DISPLAY ALL PRODUCTS
QUERY
13
MODIFY PRODUCT
DELETE PRODUCT
14
VIEW PRODUCT MENU
BACK TO MAIN MENU
15
CUSTOMER
BILL
16
EXIT
17
SOURCE CODE
18
//*****************HYPER MARKET MANAGEMENT SYSTEM******************
//**************************************************************************
// HEADER FILE USED IN PROJECT
//**************************************************************************
#include<iostream.h>
#include<dos.h>
#include<conio.h>
#include<stdio.h>
#include<process.h>
#include<fstream.h>
#include<time.h>
//*************************************************************************
// CLASS USED IN PROJECT
//*************************************************************************
class product
{
int pno,qty;
char name[50];
float price,dis;
public:
void create_product()
{
cout<<"\nPlease Enter The Product No. of The Product ";
cin>>pno;
19
cout<<"\n\nPlease Enter The Name of The Product ";
gets(name);
cout<<"\nPlease Enter The Price of The Product ";
cin>>price;
cout<<"\nPlease Enter The Discount (%) ";
cin>>dis;
}
void show_product()
{
cout<<"\nThe Product No. of The Product : "<<pno;
cout<<"\nThe Name of The Product : ";
puts(name);
cout<<"\nThe Price of The Product : "<<price;
cout<<"\nDiscount : "<<dis;
}
int retpno()
{ return pno;}
float retprice()
{return price; }
char* retname()
{ return name; }
int retdis()
{ return dis; }
}; //class ends here
20
//**************************************************************************
// INTRODUCTION FUNCTION
//**************************************************************************
void intro()
{
clrscr();
cout<<"\n\n\n\n\n\t\tHYPER MARKET";
cout<<"\tMANAGEMENT";
cout<<"\tSYSTEM";
cout<<"\n\n\n\t\tMADE BY : VAISHAK, SAJJAD, PRABHA";
cout<<"\n\n\n\t\tSCHOOL : NITHYANANDA BHAVAN ENGLISH MEDIUM SCHOOL";
gotoxy(25,25);
cout<<"press any key to continue...";
getch();
}
//*************************************************************************
// WELCOME FUNCTION
//************************************************************************
void welcome()
{
intro();
clrscr();
textbackground(BLACK);
int i,j;
gotoxy(24,19);
21
cout<<"L O A D I N G P R O J E C T";
gotoxy(28,22);
cout<<"__________";
j=28;
for(i=1;i<101;i++)
{
gotoxy(41,22);
delay(20);
cout<<i<<"% completed"<<endl;
if(i%10==0)
{
gotoxy(j,22); j++;
cout<<char(16);
}
}
cout<<"Successfully loaded"<<endl;
for(i=1;i<16;i++)
{
clrscr();
textbackground(WHITE);
textcolor(GREEN);
gotoxy(i,6); cputs(" ÛÛÛÛÛÛÛÛÛÛ ÛÛÛÛÛÛ ÛÛÛÛÛÛÛ ");
gotoxy(i,7); cputs(" Û Û Û Û ");
gotoxy(i,8); cputs(" Û Û Û Û ");
gotoxy(i,9); cputs(" Û ÛÛÛÛ ÛÛÛÛ ÛÛÛÛÛÛÛ ");
gotoxy(i,10);cputs(" Û Û Û Û Û Û ");
gotoxy(i,11);cputs(" Û Û Û Û Û Û ");
gotoxy(i,12);cputs(" ÛÛÛÛÛÛÛ Û Û Û ÛÛÛÛÛÛÛ ");
22
gotoxy(59-i,6); cputs(" ÛÛÛÛÛÛÛ Û Û ÛÛÛÛÛÛÛÛ ");
gotoxy(59-i,7); cputs(" Û ÛÛ Û Û ");
gotoxy(59-i,8); cputs(" Û Û Û Û Û ");
gotoxy(59-i,9); cputs(" ÛÛÛÛÛÛÛ Û Û Û ÛÛÛÛÛÛÛÛ ");
gotoxy(59-i,10);cputs(" Û Û Û Û Û ");
gotoxy(59-i,11);cputs(" Û Û Û Û Û ");
gotoxy(59-i,12);cputs(" ÛÛÛÛÛÛÛ Û ÛÛ ÛÛÛÛÛÛÛÛ ");
delay(80);
}
textcolor(RED);
char temp1[]={" WELCOME TO GREENS HYPER MARKET,"};
char temp2[]={"CAPITOL MALL,THANA,KANNUR "};
for(int k=24;k>14;k--)
{
delay(150);
gotoxy(k,17);
cputs(temp1);cputs(temp2);
}
delay(200);
gotoxy(25,25);
cout<<"press any key to continue...";
getch();
}
//*************************************************************************
// GLOBAL DECLARATION FOR STREAM OBJECT,OBJECT
//*************************************************************************
23
fstream fp;
product pr;
//**************************************************************************
// FUNCTION TO WRITE IN FILE
//**************************************************************************
void write_product()
{
fp.open("Shop.dat",ios::out|ios::app);
pr.create_product();
fp.write((char*)&pr,sizeof(product));
fp.close();
cout<<"\n\nThe Product Has Been Created ";
getch();
}
//*************************************************************************
// FUNCTION TO READ ALL RECORD FROM FILE
//*************************************************************************
void display_all()
{
clrscr();
cout<<"\n\n\n\t\tDISPLAY ALL RECORD !!!\n\n";
24
fp.open("Shop.dat",ios::in);
while(fp.read((char*)&pr,sizeof(product)))
{
pr.show_product();
cout<<"\n\n====================================\n";
getch();
}
fp.close();
getch();
}
//*************************************************************************
// FUNCTION TO READ SPECIFIC RECORD FROM FILE
//*************************************************************************
void display_sp(int n)
{
int flag=0;
fp.open("Shop.dat",ios::in);
while(fp.read((char*)&pr,sizeof(product)))
{
if(pr.retpno()==n)
{
clrscr();
pr.show_product();
flag=1;
}
}
25
fp.close();
if(flag==0)
cout<<"\n\nrecord not exist";
getch();
}
//*************************************************************************
// FUNCTION TO MODIFY RECORD OF FILE
//*************************************************************************
void modify_product()
{
int no,found=0;
clrscr();
cout<<"\n\n\tTo Modify ";
cout<<"\n\n\tPlease Enter The Product No. of The Product";
cin>>no;
fp.open("Shop.dat",ios::in|ios::out);
while(fp.read((char*)&pr,sizeof(product)) && found==0)
{
if(pr.retpno()==no)
{
pr.show_product();
cout<<"\nPlease Enter The New Details of Product"<<endl;
pr.create_product();
int pos=-1*sizeof(pr);
fp.seekp(pos,ios::cur);
fp.write((char*)&pr,sizeof(product));
26
cout<<"\n\n\t Record Updated";
found=1;
}
}
fp.close();
if(found==0)
cout<<"\n\n Record Not Found ";
getch();
}
//*************************************************************************
// FUNCTION TO DELETE RECORD OF FILE
//*************************************************************************
void delete_product()
{
int no;
clrscr();
cout<<"\n\n\n\tDelete Record";
cout<<"\n\nPlease Enter The product no. of The Product You Want To Delete";
cin>>no;
fp.open("Shop.dat",ios::in|ios::out);
fstream fp2;
fp2.open("Temp.dat",ios::out);
fp.seekg(0,ios::beg);
while(fp.read((char*)&pr,sizeof(product)))
{
if(pr.retpno()!=no)
{
27
fp2.write((char*)&pr,sizeof(product));
}
}
fp2.close();
fp.close();
remove("Shop.dat");
rename("Temp.dat","Shop.dat");
cout<<"\n\n\tRecord Deleted ...";
getch();
}
//*************************************************************************
// FUNCTION TO DISPLAY ALL PRODUCTS PRICE LIST
//*************************************************************************
void menu()
{
clrscr();
fp.open("Shop.dat",ios::in);
if(!fp)
{
cout<<"ERROR!!! FILE COULD NOT BE OPEN\n\n\n";
cout<<"Go To Admin Menu to createFile";
cout<<"\n\n\n Program is closing ….";
getch();
exit(0);
}
cout<<"\n\n\t\tProduct MENU\n\n";
28
cout<<"============================";
cout<<"====================================================\n";
cout<<"P.NO.\t\tNAME\t\t\t\t\tPRICE\n";
cout<<"============================";
cout<<"====================================================\n";
while(fp.read((char*)&pr,sizeof(product)))
{
cout<<pr.retpno()<<"\t\t"<<pr.retname()<<"\t\t\t\t\t"<<pr.retprice()
<<endl;
}
fp.close();
}
//*************************************************************************
// FUNCTION TO PLACE ORDER AND GENERATING BILL FOR PRODUCTS
//*************************************************************************
void place_order()
{
time_t tim;
time(&tim);
int order_arr[50],quan[50],c=0;
float amt,damt,total=0;
char ch='Y';
cout<<"\n============================";
cout<<"\n PLACE YOUR ORDER";
cout<<"\n============================\n";
do
29
{
clrscr();
menu();
cout<<"\n\nEnter The Product No. Of The Product : ";
cin>>order_arr[c];
cout<<"\nQuantity in number : ";
cin>>quan[c];
c++;
cout<<"\nDo You Want To Order Another Product ? (y/n)";
cin>>ch;
}while(ch=='y' ||ch=='Y');
cout<<"\n\nThank You For Placing The Order";getch();clrscr();
cout<<"\n\t\t++++++++++++++GREENS HYPER MARKET++++++++++++++";
cout<<"\n\t\t\tCapitol Mall,Thana,Kannur-670001";
cout<<"\n\t\t\t PH:0497-2970229,0497-6069916";
cout<<"\nEmail:[email protected]";
gotoxy(57,5);
cout<<ctime(&tim);
cout<<"\n**********************************INVOICE**";
cout<<"************************************\n";
cout<<"\nPr No.\tPr Name\t\tQty \t Price";
cout<<"\t\tAmount \t Amount after dis\n";
for(int x=0;x<=c;x++)
{
fp.open("Shop.dat",ios::in);
fp.read((char*)&pr,sizeof(product));
while(!fp.eof())
{
if(pr.retpno()==order_arr[x])
30
{
amt=pr.retprice()*quan[x];
damt=amt-(amt*pr.retdis()/100);
cout<<"\n"<<order_arr[x]<<"\t"<<pr.retname()<<"\t\t"<<quan[x]
<<"\t "<<pr.retprice()<<"\t\t"<<amt<<"\t "<<damt;
total+=damt;
}
fp.read((char*)&pr,sizeof(product));
}
fp.close();
}
cout<<"\n\n";
cout<<"\n*********************************THANK YOU*****";
cout<<"*********************************";
cout<<"\n\n\t\t\t\tGRAND TOTAL = "<<total;
cout<<"\n\n\t\t\t\tThankyou Visit Again";
getch();
}
//*************************************************************************
// ADMINSTRATOR MENU FUNCTION
//*************************************************************************
void admin_menu()
{
clrscr();
char ch2;
clrscr();
31
cout<<"\n\n\n\tADMIN MENU";
cout<<"\n\n\t1.CREATE PRODUCT";
cout<<"\n\n\t2.DISPLAY ALL PRODUCTS";
cout<<"\n\n\t3.QUERY ";
cout<<"\n\n\t4.MODIFY PRODUCT";
cout<<"\n\n\t5.DELETE PRODUCT";
cout<<"\n\n\t6.VIEW PRODUCT MENU";
cout<<"\n\n\t7.BACK TO MAIN MENU";
cout<<"\n\n\tPlease Enter Your Choice (1-7) ";
ch2=getche();
switch(ch2)
{
case '1':
clrscr();
write_product();
break;
case '2':
display_all();break;
case '3':
int num;
clrscr();
cout<<"\n\n\tPlease Enter The Product No. ";
cin>>num;
display_sp(num);
break;
case '4':
modify_product();
break;
case '5':
32
delete_product();
break;
case '6': menu();
getch();
break;
case '7':
break;
default:
cout<<"\a";
}
}
//**************************************************************************
// THE MAIN FUNCTION OF PROGRAM
//**************************************************************************
void main()
{
clrscr();
welcome();
textbackground(BLACK);
textcolor(WHITE);
char ch;
do
{
clrscr();
cout<<"\n\n\n\tMAIN MENU";
cout<<"\n\n\t01. ADMINISTRATOR";
33
cout<<"\n\n\t02. CUSTOMER";
cout<<"\n\n\t03. EXIT";
cout<<"\n\n\tPlease Select Your Option (1-3) ";
ch=getche();
switch(ch)
{
case '1':
clrscr();
admin_menu();
break;
case '2':
place_order();
getch();
break;
case '3':
clrscr();
gotoxy(30,13);
cout<<"Exiting!!!!!!!!!!!!";
delay(1000);
exit(0);
default :
cout<<"\a";
}
}while(ch!=3);
getch();
}
//*************************************************************************
// END OF PROJECT
//*************************************************************************
34
CONCLUSION This project “HYPER MARKET MANAGEMENT SYSTEM” will fulfill the entire information requirement by the user. The whole system is menu driven and hence is user friendly. This system is developed as easy as possible for the sake of user. The system has developed with a view of satisfying the future requirements.
This system has been thoroughly tested and found to be error free and it is highly portable. It also has more option for future development.
35
BIBLIOGRAPHY
1. INTRODUCTORY COMPUTER:
A.K.SHARMA
2. COMPUTER SCIENCE WITH C++:
SUMITA ARORA
3. OBJECT ORIENTED PROGRAMMING WITH C++:
E.BALAGURUSAMY
4. http://www.programmingsimplified.com 5. http://www.wikipedia.com