Professional Documents
Culture Documents
_________________
CONTENTS
1 ACKNOWLEDGEMENT 1[1-1]
2 INTRODUCTION 2 [ 1-2 ]
8 BIBLIOGRAPHY 8 [ 1-1 ]
Ms Geetu Munjal
1: [1]
INTRODUCTION
This software is made to cover the processes associated with an Antique Store.
Its applications extend to customers, suppliers, cashiers, managers
and other staff members alike.
Besides allowing us to view and search the items on sale, its main priority is
maintaining a record of the transaction of money and items.
With a buy, an item is lost and its price is added to the store balance.
Similarly, If the manager was to accept a Supplier’s offer,
that items asked price would be subtracted from the store balance
and be added to the list of items on sale.
2:[1]
INTRODUCTION
(1) Data is stored in files and opened in binary mode for speed.
(2) The interface has been made interactive and user friendly.
2: [2]
THE 6 FACES OF THE CUBE
THE LIST
This is a Tabular representation of the list of items on sale in the
1
store. The following 4 entities are displayed here.
SPACING TOOL
The Item number
The Name There is a function
The Age (in Years) which is responsible
for the tabular
The Cost format of THE LIST.
THE HISTORY
2
This is a more detailed view of the items in THE LIST.
It not only gives the 4 entities in THE LIST but also shows the
history of the item and its significance in the past.
However, only a limited number of items can be seen at a time.
THE SEARCH
3: [1]
THE 6 FACES OF THE CUBE
I AM A CUSTOMER
This is one of the 3 user specific options.
4
If this is chosen, the user will be able to choose and buy the item
of his choice.
Once the money transfer is complete:
A bill for the user will be displayed.
There will be an increase in the store balance.
The item will be removed from THE LIST.
CUBE CASHIER
5
accordingly.
The user will have to enter the details of the item
he wishes to sell including the price he is asking for
it. This will be stored and decided later by the manager.
When the manager accepts:
The item will be added to the LIST.
There will be a decrease in the store balance.
I AM THE MANAGER
6
This option is for the manager. Since this is restricted to the
general public, it is password protected.
3: [2]
DISPLAY THE VARIOUS OPTIONS:
START (1) THE LIST | (2) THE HISTORY | (3) THE SEARCH | CHOOSE
| (4) I AM A CUSTOMER | (5) I AM A SUPPLIER | (6) I AM THE MANAGER (Input Ch)
RESTART
0 THE DO WHILE LOOP
END
Call Call
CHOOSE
(Input Ch)
void viewHis()
2 SHOWS THE LIST OF ITEMS 0
WITH HISTORY OF EACH
IF
CH=1
|| CH=2
Ch=1 Ch=2 Ch=3 Ch=4 || CH=3
|| CH=4
ASKS FOR ASKS FOR ASKS FOR ASKS FOR
UPPER LIMIT & UPPER LIMIT & THE WORD TO THE WORD TO
LOWER LIMIT LOWER LIMIT SEARCH FOR
SHOW
SEARCH FOR
THEN DISPLAYS THEN DISPLAYS THEN DISPLAYS THEN DISPLAYS ELSE ERROR
THE SEARCH THE SEARCH THE SEARCH THE SEARCH MESSAGE
RESULTS RESULTS RESULTS RESULTS
SHOW
SHOW: ASKS HOW MANY ITEMS THE
ASKS FOR ITEM NO: TO BUY: SUPPLIER IS WILLIING TO SELL.
ENTER
(INPUT OK)
1 VOID VIEW() -
THE LIST
DISPLAYS THE ITEMS IN TABULAR FORMAT
21 THE HISTORY
VOID VIEWHIS() - SHOWS THE HISTORY OF THE ITEM
13 THE SEARCH
VOID SEARCH() - FINDS AN ITEM BY SEARCHING
FOR KEYWORDS IN NAME, AND RANGE IN AGE AND COST
1
4 I AM A CUSTOMER
VOID BUY() - ALLOWS USER TO BUY ITEMS ON THE LIST
15 I AM A SUPPLIER
VOID SELL() - ALLOWS USER TO SELL ITEMS TO STORE
1
6 I AM THE MANAGER
VOID PW() – CHANGES PASSWORD TO ENTER THIS
VOID CCASH() – CUBE CASHIER ALLOWING USER TO
DEPOSIT, WITHDRAW AND VIEW STORE’S BALANCE
VOID EDIT() – EDITS INFO OF EXISTING ITEM IN LIST
VOID ADD() – ADDS AN ITEM TO LIST (INDIRECTLY
FROM SUPPLIER OR DIRECTLY FROM MANAGER)
VOID DEL() – DELETES AN EXISTING ITEM FROM LIST
1
0 OTHERS
VOID SPACE() – RESPONSIBLE FOR PROPER SPACING OF
STRINGS AND INTEGERS (FUNCTION OVERLOADING)
INT FIND_IT() – FINDS THE POSITION OF THE ITEM IN
THE ARRAY BY COMPARING ITEM NUMBERS AND RETURNS IT
VOID REMOVE_IT() – REMOVES THE ITEM FROM THE
LIST. BOTH DEL() AND BUY() CALLS THIS FUNCTION
VOID SORT_LIST() – SORTS THE ITEMS IN THE LIST
VOID ALL_IN() – WRITES ALL INFO INTO DATAFILE
VOID ALL_OUT() – READS ALL INFO INTO PROGRAM
5: [1]
PROGRAM CODE
#include<fstream.h>
#include<stdio.h>
#include<string.h>
#include<conio.h>
#include<ctype.h>
#include<dos.h>
//For Strings:
int i;
cout.write(str,strlen(str));
int L=(n-strlen(str));
do
{
i=i/10;
count++;
}
while(i>0);
cout<<a;
}
6: [1]
PROGRAM CODE
//For Integers.
int i=a;
int count=0;
do
{
i=i/10;
count++;
}
while(i>0);
cout<<a;
6: [2]
PROGRAM CODE
//GLOBAL MEMBERS
int total;
void count();
void ALL_IN();
void ALL_OUT();
class LIST
{
public:
char itmNo[40];
char Name[40];
int Age;
unsigned long Cost;
char His[100];
LIST()
{ clrscr();
fstream f;
f.open( "CB_LIST.DAT", ios::out | ios::noreplace );
f.close();
count();
ALL_IN();
}
~LIST()
{ ALL_OUT(); }
private:
void SORT_LIST(); //Sorts the items in the LIST acc to Item No.
int Find_it(char [40]); //Finds the pos of item to delete w.r.t Item No.
void Remove_it(char [40]); //Removes an item from the List
}cb[200],ob;
6: [3]
PROGRAM CODE
//GLOBAL MEMBERS
int stotal;
void scount();
void sALL_IN();
void sALL_OUT();
char Name[40];
int Age;
unsigned long Cost;
char His[100];
Sup()
{
//Creation of datafile if program opened for first time:
fstream f;
f.open( "CB_SALE.DAT", ios::out | ios::noreplace | ios::binary);
f.close();
scount();
sALL_IN();
}
~Sup()
{ sALL_OUT(); }
}s[20],sob,sob2;
6: [4]
PROGRAM CODE
//GLOBAL MEMBERS
void PASS_IN();
void PASS_OUT();
void BAL_IN();
void BAL_OUT();
class Mngr
{
public:
Mngr()
{
//Creation of datafile if program opened for first time:
fstream f;
f.open( "CB_PASS.DAT", ios::out | ios::noreplace );
f.close();
fstream f2;
f2.open( "CB_BAL.DAT", ios::out | ios::noreplace );
f2.close();
~Mngr()
{
PASS_OUT(); //Sends the password into a datafile
BAL_OUT(); //Sends the current store balance into a datafile
}
void CCash(); // Function that opens the menu for CUBE CASHIER
} m1;
6: [5]
PROGRAM CODE
fstream f;
f.open( "CB_LIST.DAT", ios::in | ios::binary );
int counter=0;
while( ! f.eof() )
{
f.read((char*)&sob, sizeof(LIST));
counter++;
};
f.close();
total=counter;
}
// Reads the data from the datafile and Stores the values intohe array objects.
void ALL_IN()
{
fstream chew;
chew.open( "CB_LIST.DAT", ios::in | ios::binary );
int i=0;
while( i<total )
{
chew.read((char*)&ob, sizeof(ob));
strcpy(cb[i].itmNo, ob.itmNo);
strcpy(cb[i].Name, ob.Name);
cb[i].Age=ob.Age;
cb[i].Cost=ob.Cost;
strcpy(cb[i].His, ob.His );
i++;
};
chew.close();
}
6: [6]
PROGRAM CODE
// Writes the data from the array objects into the data file.
void ALL_OUT()
{
fstream blow;
blow.open( "CB_LIST.DAT", ios::out | ios::binary | ios::trunc );
int i=0;
while( i<total )
{
blow.write((char*)&cb[i], sizeof(LIST));
i++;
};
blow.close();
}
void scount()
{
fstream f;
f.open( "CB_SALE.DAT", ios::in | ios::binary );
int counter=0;
while( ! f.eof() )
{
f.read((char*)&sob2, sizeof(sob2));
counter++;
};
f.close();
stotal=counter;
}
6: [7]
PROGRAM CODE
// Reads the data from the data file and Stores the values into the array objects.
void sALL_IN()
{
fstream chew;
chew.open( "CB_SALE.DAT", ios::in | ios::binary );
int i=0;
chew.read((char*)&sob, sizeof(sob));
strcpy(s[i].Name, sob.Name);
s[i].Age=sob.Age;
s[i].Cost=sob.Cost;
strcpy(s[i].His, sob.His );
i++;
};
chew.close();
}
// Writes the data from the array objects into the data file.
void sALL_OUT()
{
fstream blow;
blow.open( "CB_SALE.DAT", ios::out | ios::binary | ios::trunc );
int i=0;
blow.write((char*)&s[i], sizeof(LIST));
i++;
};
blow.close();
}
6: [8]
PROGRAM CODE
void BAL_IN()
{
fstream chew;
chew.open( "CB_BAL.DAT", ios::in);
chew>>bal;
chew.close();
}
void BAL_OUT()
{
fstream blow;
blow.open( "CB_BAL.DAT", ios::out | ios::binary | ios::trunc );
blow<<bal;
blow.close();
}
void PASS_IN()
{
fstream chew;
chew.open( "CB_PASS.DAT", ios::in);
chew>>pass;
chew.close();
}
void PASS_OUT()
{
fstream blow;
blow.open( "CB_PASS.DAT", ios::out | ios::binary | ios::trunc );
blow<<pass;
blow.close();
}
6: [9]
PROGRAM CODE
bal+=dw;
Cview();
}
else
{ bal+=dep; }
if( dw>bal )
{ cout<<"\n There is not enough money to withdraw."; }
else
{bal-=dw; }
Cview();
}
else
{ bal-=wid; }
}
6: [10]
PROGRAM CODE
void Mngr::CCash()
{
int ch; char ok;
cout<<"\n Welcome to The Cube Cashier.";
do
{
cout<<"\n Choose Among The Options Below: \n\n 1. View Balance\n\n 2.
Deposit\n\n 3. Withdraw \n ";
cout<<"\n Your Choice (1-3) :"; cin>>ch;
cin.ignore(); cout<<endl;
switch(ch)
{
case 1: Cview(); break;
case 2: Cdep(); break;
case 3: Cwid(); break;
default: cout<<"\n Invalid Option.";
}
cout<<endl;
}while(ok=='n' || ok=='N');
}
6: [11]
PROGRAM CODE
void LIST::view()
{
SORT_LIST();
cout<<"|\n\n";
Space(12,cb[j].itmNo);
Space(42,cb[j].Name);
Space(7,cb[j].Age);
Space(12,cb[j].Cost);
cout<<"\n\n";
if(ch=='y' || ch=='Y')
continue;
else
break;
}
//Exception Handling
if(total==0)
{
Space(22,"");
Space(52,"<<<< NO ITEMS FOUND! >>>>");
cout<<endl<<endl;
}
6: [12]
PROGRAM CODE
void LIST::viewHis()
{
char temp[100];
SORT_LIST();
Space(12,cb[i].itmNo);
Space(42,cb[i].Name);
Space(7,cb[i].Age);
Space(12,cb[i].Cost);
cout<<"\n\n";
if( (i+1)!=total )
Space(74,"",'_');
cout<<"\n\n";
if(ch=='y' || ch=='Y')
{
clrscr();
cout<<"|\n\n";
continue;
}
else
break;
6: [13]
PROGRAM CODE
//Exception Handling
if(total==0)
{
Space(22,"");
Space(52,"<<<< NO ITEMS FOUND! >>>>");
cout<<endl<<endl;
}
void LIST::SORT_LIST()
{
char tempIN[40];
char tempName[40];
int tempAge;
unsigned long tempCost;
char tempHis[100];
int i;
int flag=0;
else if(cb[j].itmNo[o]>cb[j+1].itmNo[o])
{ flag=1; break; }
else
{flag=0; break;}
if(flag==1)
{
strcpy(tempIN,cb[j].itmNo);
strcpy(c b[j].itmNo,cb[j+1].itmNo);
strcpy(cb[j+1].itmNo,tempIN);
strcpy(tempName,cb[j].Name);
strcpy(cb[j].Name,cb[j+1].Name);
strcpy(cb[j+1].Name,tempName);
6: [14]
PROGRAM CODE
tempAge=cb[j].Age;
cb[j].Age=cb[j+1].Age;
cb[j+1].Age=tempAge;
tempCost=cb[j].Cost;
cb[j].Cost=cb[j+1].Cost;
cb[j+1].Cost=tempCost;
strcpy(tempHis,cb[j].His);
strcpy(cb[j].His,cb[j+1].His);
strcpy(cb[j+1].His,tempHis);
void LIST::Search()
{
int i;
char S[40];
char Su[40];
char Sl[40];
switch(ch)
{
case 1:
cout<<"\n";
Space(30,"_",'_'); Space(44,"SEARCH RESULTS",'_'); cout<<endl;
Space(12,"Item No | ");
Space(42,"Name of Item");
Space(7,"| Age");
Space(12,"| Cost");
cout<<"|";
6: [15]
PROGRAM CODE
cout<<"\n\n";
if(cb[i].Name[j]==' ')
continue;
//outermost if
if(count==strlen(S))
{ //if the lengths of searched item and word are same.
if(cb[i].Name[j+o]==Su[o] || cb[i].Name[j+o]==Sl[o])
{ // if the character of the searched word and word in the Item Name is same
}//end of innermost if
6: [16]
PROGRAM CODE
//moves the counter ( j )of the loop that searches word by word to the next
//word of item Name.
j+=(count-1);
count=0;
//Exception Handling
if(flag==0)
{
Space(22,"");
Space(52,"<<<< NO SUCH ITEM FOUND! >>>>");
cout<<endl<<endl;
}
Space(27,"_",'_'); Space(47,"[Enter To Continue]",'_');
getch();
break;
6: [17]
PROGRAM CODE
case 4:
//The Search in the History of an item is the same
//as the Search in the Name of the item
cout<<"\n";
Space(30,"_",'_'); Space(44,"SEARCH RESULTS",'_'); cout<<endl;
Space(12,"Item No | ");
Space(42,"Name of Item");
Space(7,"| Age");
Space(12,"| Cost");
cout<<"|";
cout<<"\n\n";
if(cb[i].His[j]==' ')
continue;
//outermost if
if(count==strlen(S))
{ //if the lengths of searched item and word is same.
6: [18]
PROGRAM CODE
{
for(int o=0; o<count; o++)
{
if(cb[i].His[j+o]==Su[o] || cb[i].His[j+o]==Sl[o])
{
if(o==count-1)
{
flag=1;
Space(12,cb[i].itmNo);
Space(42,cb[i].Name);
Space(7,cb[i].Age);
Space(12,cb[i].Cost);
cout<<"\n";
Space(12," | ");
Space(10, "History: "); cout<<"\n";
Space(12," | ");
Space(70, cb[i].His); cout<<"... ";
cout<<"\n\n\n";
} //end of 4th inner if
}
else
{ break; }
}//end of if loop
} //outermost if
j+=(count-1);
count=0;
} //outer loop.
if(flag==0)
{
Space(22,"");
Space(52,"<<<< NO SUCH ITEM FOUND! >>>>");
cout<<endl<<endl;
}
Space(27,"_",'_'); Space(47,"[Enter To Continue]",'_');
getch();
break;
6: [19]
PROGRAM CODE
cout<<"\n Enter the Upper Limit and Lower Limit. (Both Included in
Search.)\n";
cout<<"\n";
Space(30,"_",'_'); Space(44,"SEARCH RESULTS",'_'); cout<<endl;
Space(12,"Item No | ");
Space(42,"Name of Item");
Space(7,"| Age");
Space(12,"| Cost");
cout<<"|";
cout<<"\n\n";
//EXCEPTION HANDLING:
if(flag==0)
{
Space(22,"");
Space(52,"<<<< NO SUCH ITEM FOUND! >>>>");
cout<<endl<<endl;
}
Space(27,"_",'_'); Space(47,"[Enter To Continue]",'_');
getch();
break;
6: [20]
PROGRAM CODE
flag=0;
cout<<"\n Enter the Upper Limit and Lower Limit. (Both Included in
Search.)\n";
cout<<"\n";
Space(30,"_",'_'); Space(44,"SEARCH RESULTS",'_'); cout<<endl;
Space(12,"Item No | ");
Space(42,"Name of Item");
Space(7,"| Age");
Space(12,"| Cost");
cout<<"|";
cout<<"\n\n";
if(flag==0)
{
Space(22,"");
Space(52,"<<<< NO SUCH ITEM FOUND! >>>>");
cout<<endl<<endl;
}
Space(27,"_",'_'); Space(47,"[Enter To Continue]",'_');
getch();
break;
} // End of Search()
6: [21]
PROGRAM CODE
//String Comparism
for(int i=0; i<total; i++)
{
if(chk[0]==cb[i].itmNo[0])
{
for(int j=0; j<strlen(cb[i].itmNo); j++)
{
if(chk[j]==cb[i].itmNo[j])
{
if(j==strlen(cb[i].itmNo)-1)
pos=i;
}
else
{ break; }
}
}
}
return pos;
int pos=Find_it(chk);
//Deleting the items at position pos:
6: [22]
PROGRAM CODE
void LIST::DEL()
{
do
{
cout<<" Enter the item number of the item you wish to delete.\n ";
gets(chk);
int pos=Find_it(chk);
cout<<"\n";
}
else
{
Remove_it(chk);
cout<<"\n\n The Item has been deleted.\n\n";
ok='n';
}
}
while(ok=='y' || ok=='Y');
char ok2='n';
cout<<" Would you like to see THE LIST? (Y/N) \n ";
cin.get(ok2);
if(ok2=='y' || ok2=='Y')
{ cout<<"\n\n"; view(); }
6: [23]
PROGRAM CODE
void LIST::Buy()
{
char ok='n';
int pos[5];
int count=-1;
char chk[5][40];
char bought='n';
do
{count++;
cout<<" Enter the item number of the item you wish to buy\n ";
gets(chk[count]);
if(ok3==1)
{cout<<"\n You cannot buy the same item twice! \n\n"; count--; continue; }
//END OF ERROR HANDLING.
pos[count]=Find_it(chk[count]);
cin.get(ok); cout<<endl;
cin.ignore(); //Buffer error
}
while(ok=='y' || ok=='Y');
if(bought=='y')
{
6: [24]
PROGRAM CODE
6: [25]
PROGRAM CODE
void LIST::EDIT()
{
char chk[40];
cout<<" Enter the Item No of the Item to Edit\n ";
gets(chk);
int pos=Find_it(chk);
if(pos==-5)
cout<<"\n Invalid Item No.";
else
{ char ok='n';
do
{
cout<<"\n Which entity do you want to edit?";
cout<<"\n\n 1. Name\n\n 2. Age\n\n 3. Cost\n\n 4. History\n\n Your
Choice (1-4) : ";
int ch; cin>>ch;
cin.ignore();
switch(ch)
{
case 1:
cout<<"\n Enter the new Name: ";
char name[40]; gets(name);
strcpy(cb[pos].Name,name);
break;
case 2:
cout<<"\n Enter the new Age: ";
int age; cin>>age;
cb[pos].Age=age;
break;
case 3:
cout<<"\n Enter the new Cost: ";
unsigned long cost; cin>>cost;
cb[pos].Cost=cost;
break;
case 4:
cout<<"\n Enter the new History:\n ";
char his[100]; gets(his);
strcpy(c b[pos].His , his);
break;
6: [26]
PROGRAM CODE
} // END OF EDIT()
void LIST::ADD()
{
cout<<"\n TO ADD AN ITEM TO THE STORE.\n\n 1. From Supplier\n\n 2.
From Manager.\n\n ";
cout<<"Your Choice (1-2) : ";
switch(chk)
{
case 1:
if(ch2=='a' || ch2=='A')
{
for(int j=0; j<1; j++)
{
m1.Cwid(s[i].Cost);
//removing asked price by supplier from the store balance.
strcpy( cb[total].Name,s[i].Name );
6: [27]
PROGRAM CODE
cb[total].Age=s[i].Age;
strcpy( cb[total].His,s[i].His );
total++;
}
fstream f;
f.open("CB_SALE.DAT", ios::out | ios::trunc );
f.close();
//end of clearing
}
} //end of for loop.
}
else
{
cout<<"\n No Items by Supplier \n";
}
break;
case 2:
6: [28]
PROGRAM CODE
break;
if(ok=='y' || ok=='Y')
{ cout<<"\n\n"; view(); }
}
void LIST::Sell()
{
cout<<"\n Welcome Supplier.\n How many items to sell?\n ";
int noi; cin>>noi; //no of items to sell
cout<<endl;
6: [29]
PROGRAM CODE
void main()
{
int ch;
do
{
clrscr();
Space(74,"",'_'); cout<<endl;
Space(33,"",'_'); Space(41,"MAIN MENU",'_'); cout<<endl;
Space(25,"\n 4. I AM A CUSTOMER");
Space(28," | Buy something nice for Yourself.");
cout<<endl;
Space(25,"\n 5. I AM A SUPPLIER");
Space(28," | Sell us something We may like.");
cout<<endl;
Space(25,"\n 0. EXIT.");
Space(28," | Done here? Leave the Online Store.");
cout<<endl;
Space(74,"",'_');
cout<<"\n\n Your Choice (0-6): ";
clrscr();
switch(ch)
{
case 1: ob.view(); break;
6: [30]
PROGRAM CODE
case 4:
cout<<endl;
Space(30,"_",'_'); Space(44,"I AM A CUSTOMER",'_'); cout<<endl;
cout<<endl;
ob.Buy();
cout<<endl;
Space(27,"_",'_'); Space(47,"[Enter To Continue]",'_');
getch();
break;
case 5:
cout<<endl;
Space(30,"_",'_'); Space(44,"I AM A SUPPLIER",'_'); cout<<endl;
cout<<endl;
ob.Sell();
cout<<endl;
Space(27,"_",'_'); Space(47,"[Enter To Continue]",'_');
getch();
break;
if(strcmp(ps,pass)==0)
{
cout<<"\n Welcome Back Manager.\n\n";
do
{
clrscr();
cout<<endl;
Space(29,"_",'_'); Space(45,"I AM THE MANAGER",'_'); cout<<endl;
cout<<endl;
6: [31]
PROGRAM CODE
Space(33,"\n 0. EXIT.");
Space(20," | Done? Log out Safely.");
cout<<endl;
Space(74,"",'_');
cout<<"\n\n Your Choice (0-5): ";
clrscr();
cout<<endl;
Space(29,"_",'_'); Space(45,"I AM THE MANAGER",'_'); cout<<endl;
cout<<endl;
switch(ch2)
{
case 1: m1.PW(); break;
case 3:
ob.EDIT();
cout<<endl;
Space(27,"_",'_'); Space(47,"[Enter To Continue]",'_');
getch();
break;
case 0:
cout<<"\n Thank you & Goodbye Manager! You Have been logged out
Safely. \n";
cout<<endl;
Space(2 7,"_",'_'); Space(47,"[Enter To Continue]",'_');
getch();
break;
6: [32]
PROGRAM CODE
}
else
{ cout<<"\n Wrong Password!\n "; getch(); }
break;
default: cout<<"\n\n Thank you For Visitng & Come Again Soon! ";
}
}while(ch!=0);
getch();
}
6: [33]
SAMPLE INPUT & OUTPUT
__________________________________________________________________________
_________________________________MAIN MENU________________________________
_________________________________THE LIST_________________________________
Item No | Name of Item | Age| Cost|
___________________________[Enter To Continue]____________________________
7: [1]
SAMPLE INPUT & OUTPUT
__________________________________________________________________________
_________________________________MAIN MENU________________________________
_______________________________THE HISTORY________________________________
Item No | Name of Item | Age| Cost|
#23022 Compass of Peter Tsar The Terrible 140 7000000
_______________________________THE HISTORY________________________________
Item No | Name of Item | Age| Cost|
7: [2]
SAMPLE INPUT & OUTPUT
__________________________________________________________________________
_______________________________THE HISTORY________________________________
Item No | Name of Item | Age| Cost|
___________________________[Enter To Continue]____________________________
7: [3]
SAMPLE INPUT & OUTPUT
__________________________________________________________________________
_________________________________MAIN MENU________________________________
_________________________________THE SEARCH_______________________________
Which entity to search in?
1. Name
2. Age
3. Cost
4. History
______________________________SEARCH RESULTS______________________________
Item No | Name of Item | Age| Cost|
___________________________[Enter To Continue]____________________________
_________________________________THE SEARCH_______________________________
1. Name
2. Age
3. Cost
4. History
Enter the Upper Limit and Lower Limit. (Both Included in Search.)
Lower Limit: 0
Upper Limit: 1000000
[ 0 <--> 1000000 ]
______________________________SEARCH RESULTS______________________________
Item No | Name of Item | Age| Cost|
___________________________[Enter To Continue]____________________________
7: [4]
SAMPLE INPUT & OUTPUT
_________________________________THE SEARCH_______________________________
2. Age
3. Cost
4. History
Enter the Upper Limit and Lower Limit. (Both Included in Search.)
Lower Limit: 100
Upper Limit: 200
___________________________[Enter To Continue]____________________________
_________________________________THE SEARCH_______________________________
Which entity to search in?
1. Name
2. Age
3. Cost
4. History
______________________________SEARCH RESULTS______________________________
Item No | Name of Item | Age| Cost|
___________________________[Enter To Continue]____________________________
7: [5]
SAMPLE INPUT & OUTPUT
__________________________________________________________________________
_________________________________MAIN MENU________________________________
______________________________I AM A CUSTOMER_____________________________
Enter the item number of the item you wish to buy
#23033
7: [6]
SAMPLE INPUT & OUTPUT
__________________________________________________________________________
_________________________________MAIN MENU________________________________
_________________________________THE LIST_________________________________
Item No | Name of Item | Age| Cost|
___________________________[Enter To Continue]____________________________
7: [7]
SAMPLE INPUT & OUTPUT
_________________________________MAIN MENU________________________________
______________________________I AM A SUPPLIER_____________________________
Welcome Supplier.
How many items to sell?
2
Enter Item's History: It still holds the piece of lettuce he pulled out
___________________________[Enter To Continue]____________________________
7: [8]
SAMPLE INPUT & OUTPUT
__________________________________________________________________________
_________________________________MAIN MENU________________________________
Your Password has been Changed from " Hamburger " to " pass " .
___________________________[Enter To Continue]____________________________
7: [9]
SAMPLE INPUT & OUTPUT
1. From Supplier
2. From Manager.
Item #1
Name of Item : The Orb of Galactus
Age of Item : 68
Asked Price : 5000000
History : The power of the cosmos trapped in an orb
Item is Declined.
Item #2
Name of Item : The Toothpick of Gibralter
Age of Item : 45
Asked Price : 5600000
History : It still holds the piece of lettuce he pulled out
7: [10]
SAMPLE INPUT & OUTPUT
_________________________________THE LIST_________________________________
Item No | Name of Item | Age| Cost|
___________________________[Enter To Continue]____________________________
1. From Supplier
2. From Manager.
Enter the Item's History : Weapon used by Alura for hunt and battle
7: [11]
SAMPLE INPUT & OUTPUT
_________________________________THE LIST_________________________________
Item No | Name of Item | Age| Cost|
#23001 Boomerang of Alura 89 6900000
___________________________[Enter To Continue]____________________________
7: [12]
SAMPLE INPUT & OUTPUT
1. Name
2. Age
3. Cost
4. History
Your Choice (1-4) : 1
1. Name
2. Age
3. Cost
4. History
7: [13]
SAMPLE INPUT & OUTPUT
_________________________________THE LIST_________________________________
Item No | Name of Item | Age| Cost|
___________________________[Enter To Continue]____________________________
7: [14]
SAMPLE INPUT & OUTPUT
_________________________________THE LIST_________________________________
Item No | Name of Item | Age| Cost|
___________________________[Enter To Continue]____________________________
7: [15]
SAMPLE INPUT & OUTPUT
1. View Balance
2. Deposit
3. Withdraw
1. View Balance
2. Deposit
3. Withdraw
7: [16]
SAMPLE INPUT & OUTPUT
Thank you & Goodbye Manager! You Have been logged out Safely.
___________________________[Enter To Continue]____________________________
__________________________________________________________________________
_________________________________MAIN MENU________________________________
7: [17]
BIBLIOGRAPHY
2 HTTP://CPLUSPLUS.COM
3 HTTP://TDOCPP.CO.CC
8: [1]
SCOPE FOR FUTURE EXPANSION
The next thing would be to encrypt the data files. Presently, the files
store the details of the items on sale, the balance of the store and the
password to access the manager options. These can be easily accessed
using a notepad in windows. To prevent this, the files should be
encrypted so that those who do try to read the data will not be able to
make sense of it, and making the files Read Only can prevent offenders
from changing the information.
9: [1]
NEIL MATHEW
XII B 13
DON BOSCO SCHOOL