This document contains a summary of a project report on software called "The Cube" which maintains records for an antique store. The software allows customers to view items, suppliers to provide offers, and managers to add/remove items. It summarizes the main sections of the report including introduction, user functions, flow chart, sample inputs/outputs, and future scope.
This is the project i made for my 12th grade.
Using basic C++, I made this software (which i call 'The Cube') capable of handling operations ranging from displaying store items to money tracking.
1
WEEK # 2 - EXERCISES CHAPTER # 5
Exercise 2: Level 2 – Order 2 Form for Golf Balls
Now that Vijay has completed the order form for tennis products, he needs to work on the order form for golf equipment. As with
tennis products, Vijay must include shipping charges and a discount for orders according to their total amount. In addition, he must
add a handling charge because most golf equipment must be packed by hand. TheZone calculates handling costs for golf equipment as
shown in Table 5.9.
Vijay has updated the Golf workbook and renamed it Golf2. He consolidated the order information on a worksheet named Orders, and
added worksheets for pricing information, handling charges (including a maximum fee), discounts, and shipping charges. Figure 5.25
shows the Orders worksheet with some order-related data already entered.
In these steps, you need to complete the Orders worksheet using lookup functions to display the product description, and to calculate
the order total and shipping, handling, and discount charges.
2
WEEK # 2 - EXERCISES CHAPTER # 5
Complete the following:
1. Open the workbook named Golf2.xlsx located in the assignment, and then save the file as
W2-2-Golf-Orders2 -YourName.xlsx.
2. Examine the contents of each worksheet, and name the ranges listed in Table 5.10. Use these range names as appropriate in
Questions 3 through 9.
3. In cell C8 of the Orders worksheet, write a formula that displays the product description for the first item in the order. Copy the
formula into cells C9:C12.
4. In cell D8 of the Orders worksheet, calculate the total value of the item (price multiplied by quantity). Copy the formula into cells
D9:D12.
5. In cell D15 of the Orders worksheet, calculate the total cost of the order.
6. In cell D16 of the Orders worksheet, calculate the total shipping charge for this order based on four variables: the ship to region, the
customer type (standard, preferred, or most preferred), the total weight, and the method of shipping.
7. In cell D17 of the Orders worksheet, calculate the handling cost. Be certain to account for the maximum handling charge. Handling
fees are based on the total order value excluding shipping and discounts.
8. In cell D18 of the Orders worksheet, calculate the discount. Be certain to write the formula so that the discount is deducted from the
total amount when all values are added. Discounts are again based on the total order value excluding shipping and handling fees.
9. In cell D20 of the Orders worksheet, calculate the grand total for the order.
10. Save and close the W2-2-Golf-Orders2 -YourName.xlsx workbook.
LEVEL
3
WEEK # 2 - EXERCISES CHAPTER # 5
Exercise 3: Level 3 – Fishing Order
Vijay has been asked to develop an order form for fishing equipment. He has already created a workbook named Fishing.xlsx, which
contains the worksheets described in Table 5.14.
In these steps, you wil.
The Date and Time functions section will include GETDATE(), DATEPART(), DATEADD(), DATEDIFF(), EOMONTH (2012), along with a variety of DATE/TIME FROMPARTS Functions. Following that will be the logical functions which includes CASE, IIF, CHOOSE, and COALESCE. ISNULL is usually covered in this section, but we already covered that in an earlier session.
CMS Project Phase II InstructionsIn this phase, you will create t.docxmary772
CMS Project: Phase II Instructions
In this phase, you will create tables based upon the ERD and SQL code below.You will thenpopulate each table with the data presented below. Finally, you will create queries that will be used to support reports for Accounting and Management. You will not actually create the reports in a GUI environment– only the queries that will serve as the basis for the reports. Screenshots are required for a grade to be given. One screenshot is not the idea; however, multiple screenshots along the way is the goal.
Background
:
The following ERD will be used as the basis for this Phase.
Part A: Table Creation and Data Loading
Instructions
: Create a new database in SQL Server and run the following CREATE TABLE commands. Note that you must run the CREATE TABLE statements in the order presented (and load the data in the order presented) to avoid conflicts resulting from foreign key constraints.
Additional instructions for materials to turn in for this phase of your project are included at the end of this specification document.
CREATE TABLE Regions
(RegionID int not null,
RegionAbbreviation varchar(4),
RegionName varchar(100),
CONSTRAINT PK_Regions PRIMARY KEY (RegionID))
CREATE TABLE Countries
(CountryID int not null,
CountryName varchar(50),
WeeklyHours int,
Holidays int,
VacationDays int,
RegionID int,
CONSTRAINT PK_Countries PRIMARY KEY (CountryID),
CONSTRAINT FK_CountriesRegions FOREIGN KEY (RegionID) References Regions)
CREATE TABLE EmployeeTitles
(TitleID int not null,
Title varchar(15),
CONSTRAINT PK_EmpTitles PRIMARY KEY (TitleID))
CREATE TABLE BillingRates
(TitleID int not null,
Level int not null,
Rate float,
CurrencyName varchar(5),
CONSTRAINT PK_BillingRates PRIMARY KEY (TitleID, Level),
CONSTRAINT FK_BillingRatesTitles FOREIGN KEY (TitleID) References EmployeeTitles)
CREATE TABLE Employees
(EmpID int not null,
FirstName varchar(30),
LastName varchar(30),
Email varchar(50),
Salary decimal(10,2),
TitleIDint,
Level int,
SupervisorID int,
CountryID int,
CONSTRAINT PK_Employees PRIMARY KEY (EmpID),
CONSTRAINT FK_EmployeesCountries FOREIGN KEY (CountryID) References Countries,
CONSTRAINT FK_EmployeesEmpTitles FOREIGN KEY (TitleID) References EmployeeTitles,
CONSTRAINT FK_EmployeeSupervisors FOREIGN KEY (SupervisorID) References Employees)
CREATE TABLE ContactTypes
(ContactTypeID int not null,
ContactType varchar(30)
CONSTRAINT PK_ContactTypes PRIMARY KEY (ContactTypeID))
CREATE TABLE ContractTypes
(ContractTypeID int not null,
ContractType varchar(30)
CONSTRAINT PK_ContractTypes PRIMARY KEY (ContractTypeID))
CREATE TABLE BenefitTypes
(BenefitTypeID int not null,
BenefitType varchar(30)
CONSTRAINT PK_BenefitTypes PRIMARY KEY (BenefitTypeID))
CREATE TABLE Clients
(ClientID int not null,
LegalName varchar(50),
CommonName varchar(50),
AddrLine1 varchar(50),
AddrLine2 varchar(50),
City varchar(25),
State_Province varchar(25),
Zip varchar(9),
CountryID int,
CONSTRAINT PK_Cli.
This is the project i made for my 12th grade.
Using basic C++, I made this software (which i call 'The Cube') capable of handling operations ranging from displaying store items to money tracking.
1
WEEK # 2 - EXERCISES CHAPTER # 5
Exercise 2: Level 2 – Order 2 Form for Golf Balls
Now that Vijay has completed the order form for tennis products, he needs to work on the order form for golf equipment. As with
tennis products, Vijay must include shipping charges and a discount for orders according to their total amount. In addition, he must
add a handling charge because most golf equipment must be packed by hand. TheZone calculates handling costs for golf equipment as
shown in Table 5.9.
Vijay has updated the Golf workbook and renamed it Golf2. He consolidated the order information on a worksheet named Orders, and
added worksheets for pricing information, handling charges (including a maximum fee), discounts, and shipping charges. Figure 5.25
shows the Orders worksheet with some order-related data already entered.
In these steps, you need to complete the Orders worksheet using lookup functions to display the product description, and to calculate
the order total and shipping, handling, and discount charges.
2
WEEK # 2 - EXERCISES CHAPTER # 5
Complete the following:
1. Open the workbook named Golf2.xlsx located in the assignment, and then save the file as
W2-2-Golf-Orders2 -YourName.xlsx.
2. Examine the contents of each worksheet, and name the ranges listed in Table 5.10. Use these range names as appropriate in
Questions 3 through 9.
3. In cell C8 of the Orders worksheet, write a formula that displays the product description for the first item in the order. Copy the
formula into cells C9:C12.
4. In cell D8 of the Orders worksheet, calculate the total value of the item (price multiplied by quantity). Copy the formula into cells
D9:D12.
5. In cell D15 of the Orders worksheet, calculate the total cost of the order.
6. In cell D16 of the Orders worksheet, calculate the total shipping charge for this order based on four variables: the ship to region, the
customer type (standard, preferred, or most preferred), the total weight, and the method of shipping.
7. In cell D17 of the Orders worksheet, calculate the handling cost. Be certain to account for the maximum handling charge. Handling
fees are based on the total order value excluding shipping and discounts.
8. In cell D18 of the Orders worksheet, calculate the discount. Be certain to write the formula so that the discount is deducted from the
total amount when all values are added. Discounts are again based on the total order value excluding shipping and handling fees.
9. In cell D20 of the Orders worksheet, calculate the grand total for the order.
10. Save and close the W2-2-Golf-Orders2 -YourName.xlsx workbook.
LEVEL
3
WEEK # 2 - EXERCISES CHAPTER # 5
Exercise 3: Level 3 – Fishing Order
Vijay has been asked to develop an order form for fishing equipment. He has already created a workbook named Fishing.xlsx, which
contains the worksheets described in Table 5.14.
In these steps, you wil.
The Date and Time functions section will include GETDATE(), DATEPART(), DATEADD(), DATEDIFF(), EOMONTH (2012), along with a variety of DATE/TIME FROMPARTS Functions. Following that will be the logical functions which includes CASE, IIF, CHOOSE, and COALESCE. ISNULL is usually covered in this section, but we already covered that in an earlier session.
CMS Project Phase II InstructionsIn this phase, you will create t.docxmary772
CMS Project: Phase II Instructions
In this phase, you will create tables based upon the ERD and SQL code below.You will thenpopulate each table with the data presented below. Finally, you will create queries that will be used to support reports for Accounting and Management. You will not actually create the reports in a GUI environment– only the queries that will serve as the basis for the reports. Screenshots are required for a grade to be given. One screenshot is not the idea; however, multiple screenshots along the way is the goal.
Background
:
The following ERD will be used as the basis for this Phase.
Part A: Table Creation and Data Loading
Instructions
: Create a new database in SQL Server and run the following CREATE TABLE commands. Note that you must run the CREATE TABLE statements in the order presented (and load the data in the order presented) to avoid conflicts resulting from foreign key constraints.
Additional instructions for materials to turn in for this phase of your project are included at the end of this specification document.
CREATE TABLE Regions
(RegionID int not null,
RegionAbbreviation varchar(4),
RegionName varchar(100),
CONSTRAINT PK_Regions PRIMARY KEY (RegionID))
CREATE TABLE Countries
(CountryID int not null,
CountryName varchar(50),
WeeklyHours int,
Holidays int,
VacationDays int,
RegionID int,
CONSTRAINT PK_Countries PRIMARY KEY (CountryID),
CONSTRAINT FK_CountriesRegions FOREIGN KEY (RegionID) References Regions)
CREATE TABLE EmployeeTitles
(TitleID int not null,
Title varchar(15),
CONSTRAINT PK_EmpTitles PRIMARY KEY (TitleID))
CREATE TABLE BillingRates
(TitleID int not null,
Level int not null,
Rate float,
CurrencyName varchar(5),
CONSTRAINT PK_BillingRates PRIMARY KEY (TitleID, Level),
CONSTRAINT FK_BillingRatesTitles FOREIGN KEY (TitleID) References EmployeeTitles)
CREATE TABLE Employees
(EmpID int not null,
FirstName varchar(30),
LastName varchar(30),
Email varchar(50),
Salary decimal(10,2),
TitleIDint,
Level int,
SupervisorID int,
CountryID int,
CONSTRAINT PK_Employees PRIMARY KEY (EmpID),
CONSTRAINT FK_EmployeesCountries FOREIGN KEY (CountryID) References Countries,
CONSTRAINT FK_EmployeesEmpTitles FOREIGN KEY (TitleID) References EmployeeTitles,
CONSTRAINT FK_EmployeeSupervisors FOREIGN KEY (SupervisorID) References Employees)
CREATE TABLE ContactTypes
(ContactTypeID int not null,
ContactType varchar(30)
CONSTRAINT PK_ContactTypes PRIMARY KEY (ContactTypeID))
CREATE TABLE ContractTypes
(ContractTypeID int not null,
ContractType varchar(30)
CONSTRAINT PK_ContractTypes PRIMARY KEY (ContractTypeID))
CREATE TABLE BenefitTypes
(BenefitTypeID int not null,
BenefitType varchar(30)
CONSTRAINT PK_BenefitTypes PRIMARY KEY (BenefitTypeID))
CREATE TABLE Clients
(ClientID int not null,
LegalName varchar(50),
CommonName varchar(50),
AddrLine1 varchar(50),
AddrLine2 varchar(50),
City varchar(25),
State_Province varchar(25),
Zip varchar(9),
CountryID int,
CONSTRAINT PK_Cli.
This was done as part of my Advertising and Sales Promotion Course. It explains Copywriting and Storyboarding with the help of one of my favorite ADs, 'Dumb Ways to Die'.
Good Governance Leads To Flourish Society & Nation (BS SAP)Neil Mathew
Our 10th Semester BS SAP (Behavioural Science - Social Awareness Program). This included a presentation, a hand-made poster, a survey and a short video.
High Fortune (Product Brand Management)Neil Mathew
A fun little exercise (part of Product Brand Management course) where our group had to design a new product in India. With the little time we had, I think we did alright.
My Presentation on the Corporate Entrepreneurship seen at WIPRO. It starts with a brief idea of how WIPRO started, the opportunities utilized, the challenges faced and how those issues were ingeniously resolved.
This was presented as part of the Corporate Entrepreneurship Course by the B.Tech + MBA batch (Dual Degree) (2010-2015), Amity University, comprising of ACHYUT CHANDRA, NEIL MATHEW, SHIKHAR AGNIHOTRI, SHOUMIK GOSWAMI and UTSAV KHURANA.
Consumer Perception of Job Seekers in updating their Job Profiles on Job PortalsNeil Mathew
The presentation used for my Summer Internship Project Viva.
I did my Internship this year at Monster.com India Pvt Ltd. I conducted a survey and analyzed the results using SmartPLS to assess why Job Seekers do not update their Job Profile Information.
How OLX changed the consumer involvement in the Scrap MarketNeil Mathew
Our Presentation for 'Consumer Behaviour' Class.
Topic: 'How OLX changed the consumer involvement in the Scrap Market'
Group Members: KRATIKA TOMAR, NEIL MATHEW, RAGHAV DUDEJA, SURBHI PURI
The Powerpoint presentation I used for the INK TALK session during the Grand Finale of 'Accenture Innovation Jockeys 3' (Powered by Yahoo).
I was the Category Winner in 'Digital Government', among 1300 entries from about 400 colleges across India.
Honest Reviews of Tim Han LMA Course Program.pptxtimhan337
Personal development courses are widely available today, with each one promising life-changing outcomes. Tim Han’s Life Mastery Achievers (LMA) Course has drawn a lot of interest. In addition to offering my frank assessment of Success Insider’s LMA Course, this piece examines the course’s effects via a variety of Tim Han LMA course reviews and Success Insider comments.
Model Attribute Check Company Auto PropertyCeline George
In Odoo, the multi-company feature allows you to manage multiple companies within a single Odoo database instance. Each company can have its own configurations while still sharing common resources such as products, customers, and suppliers.
Unit 8 - Information and Communication Technology (Paper I).pdfThiyagu K
This slides describes the basic concepts of ICT, basics of Email, Emerging Technology and Digital Initiatives in Education. This presentations aligns with the UGC Paper I syllabus.
Read| The latest issue of The Challenger is here! We are thrilled to announce that our school paper has qualified for the NATIONAL SCHOOLS PRESS CONFERENCE (NSPC) 2024. Thank you for your unwavering support and trust. Dive into the stories that made us stand out!
Biological screening of herbal drugs: Introduction and Need for
Phyto-Pharmacological Screening, New Strategies for evaluating
Natural Products, In vitro evaluation techniques for Antioxidants, Antimicrobial and Anticancer drugs. In vivo evaluation techniques
for Anti-inflammatory, Antiulcer, Anticancer, Wound healing, Antidiabetic, Hepatoprotective, Cardio protective, Diuretics and
Antifertility, Toxicity studies as per OECD guidelines
Introduction to AI for Nonprofits with Tapp NetworkTechSoup
Dive into the world of AI! Experts Jon Hill and Tareq Monaur will guide you through AI's role in enhancing nonprofit websites and basic marketing strategies, making it easy to understand and apply.
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...Levi Shapiro
Letter from the Congress of the United States regarding Anti-Semitism sent June 3rd to MIT President Sally Kornbluth, MIT Corp Chair, Mark Gorenberg
Dear Dr. Kornbluth and Mr. Gorenberg,
The US House of Representatives is deeply concerned by ongoing and pervasive acts of antisemitic
harassment and intimidation at the Massachusetts Institute of Technology (MIT). Failing to act decisively to ensure a safe learning environment for all students would be a grave dereliction of your responsibilities as President of MIT and Chair of the MIT Corporation.
This Congress will not stand idly by and allow an environment hostile to Jewish students to persist. The House believes that your institution is in violation of Title VI of the Civil Rights Act, and the inability or
unwillingness to rectify this violation through action requires accountability.
Postsecondary education is a unique opportunity for students to learn and have their ideas and beliefs challenged. However, universities receiving hundreds of millions of federal funds annually have denied
students that opportunity and have been hijacked to become venues for the promotion of terrorism, antisemitic harassment and intimidation, unlawful encampments, and in some cases, assaults and riots.
The House of Representatives will not countenance the use of federal funds to indoctrinate students into hateful, antisemitic, anti-American supporters of terrorism. Investigations into campus antisemitism by the Committee on Education and the Workforce and the Committee on Ways and Means have been expanded into a Congress-wide probe across all relevant jurisdictions to address this national crisis. The undersigned Committees will conduct oversight into the use of federal funds at MIT and its learning environment under authorities granted to each Committee.
• The Committee on Education and the Workforce has been investigating your institution since December 7, 2023. The Committee has broad jurisdiction over postsecondary education, including its compliance with Title VI of the Civil Rights Act, campus safety concerns over disruptions to the learning environment, and the awarding of federal student aid under the Higher Education Act.
• The Committee on Oversight and Accountability is investigating the sources of funding and other support flowing to groups espousing pro-Hamas propaganda and engaged in antisemitic harassment and intimidation of students. The Committee on Oversight and Accountability is the principal oversight committee of the US House of Representatives and has broad authority to investigate “any matter” at “any time” under House Rule X.
• The Committee on Ways and Means has been investigating several universities since November 15, 2023, when the Committee held a hearing entitled From Ivory Towers to Dark Corners: Investigating the Nexus Between Antisemitism, Tax-Exempt Universities, and Terror Financing. The Committee followed the hearing with letters to those institutions on January 10, 202
A Strategic Approach: GenAI in EducationPeter Windle
Artificial Intelligence (AI) technologies such as Generative AI, Image Generators and Large Language Models have had a dramatic impact on teaching, learning and assessment over the past 18 months. The most immediate threat AI posed was to Academic Integrity with Higher Education Institutes (HEIs) focusing their efforts on combating the use of GenAI in assessment. Guidelines were developed for staff and students, policies put in place too. Innovative educators have forged paths in the use of Generative AI for teaching, learning and assessments leading to pockets of transformation springing up across HEIs, often with little or no top-down guidance, support or direction.
This Gasta posits a strategic approach to integrating AI into HEIs to prepare staff, students and the curriculum for an evolving world and workplace. We will highlight the advantages of working with these technologies beyond the realm of teaching, learning and assessment by considering prompt engineering skills, industry impact, curriculum changes, and the need for staff upskilling. In contrast, not engaging strategically with Generative AI poses risks, including falling behind peers, missed opportunities and failing to ensure our graduates remain employable. The rapid evolution of AI technologies necessitates a proactive and strategic approach if we are to remain relevant.
Embracing GenAI - A Strategic ImperativePeter Windle
Artificial Intelligence (AI) technologies such as Generative AI, Image Generators and Large Language Models have had a dramatic impact on teaching, learning and assessment over the past 18 months. The most immediate threat AI posed was to Academic Integrity with Higher Education Institutes (HEIs) focusing their efforts on combating the use of GenAI in assessment. Guidelines were developed for staff and students, policies put in place too. Innovative educators have forged paths in the use of Generative AI for teaching, learning and assessments leading to pockets of transformation springing up across HEIs, often with little or no top-down guidance, support or direction.
This Gasta posits a strategic approach to integrating AI into HEIs to prepare staff, students and the curriculum for an evolving world and workplace. We will highlight the advantages of working with these technologies beyond the realm of teaching, learning and assessment by considering prompt engineering skills, industry impact, curriculum changes, and the need for staff upskilling. In contrast, not engaging strategically with Generative AI poses risks, including falling behind peers, missed opportunities and failing to ensure our graduates remain employable. The rapid evolution of AI technologies necessitates a proactive and strategic approach if we are to remain relevant.
2. This is to certify that
Neil Mathew, Roll No: _____ ,
has successfully completed his Project
under my guidance and has fulfilled
the requirements for the submission of this project.
Ms. Geetu Munjal,
_________________
CERTIFICATE
3. CONTENTS
S No: Name: Page No:
1 ACKNOWLEDGEMENT 1 [ 1 - 1 ]
2 INTRODUCTION 2 [ 1-2 ]
3 THE 6 FACES OF THE CUBE 3 [ 1–2 ]
4 FLOW CHART DIAGRAM 4 [ 1-4 ]
5 USER DEFINED FUNCTIONS 5 [ 1-1 ]
6 PROGRAM CODE 6 [ 1-17 ]
7 SAMPLE INPUT & OUTPUT 7 [ 1-33 ]
8 BIBLIOGRAPHY 8 [ 1-1 ]
9 SCOPE FOR FUTURE EXPANSION 9 [ 1-1 ]
4. 1: [1]
ACKNOWLEDGEMENT
I am indebted to my computer teacher,
Ms Geetu Munjal
for her guidance and whole hearted support
in the making of this project.
5. 2:[1]
I call this software ‘THE CUBE’.
This is mainly because of the fact that it performs 6 types of tasks.
Three of them are general while the other three are user specific.
The Cube is made for 3 types of users:
A Customer, A Supplier and The Manager.
A more elaborate coverage of The Cube’s function can be seen in
‘THE 6 FACES OF THE CUBE”.
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.
This allows the Store to have a constantly updated reference to check
the progress of the store.
6. 2: [2]
INTRODUCTION
To make it implementable in the real world, I have ensured that:
(1) Data is stored in files and opened in binary mode for speed.
(2) The interface has been made interactive and user friendly.
(3) It has covered all possible threats to efficacy by means of
Intensive Exception Handling like:
(i) Invalid Entries by User
(ii) An Advanced Search that is NOT case sensitive.
(iii) And many others like:
Maintaining transfer of cash through sale and purchase of the store,
Maintaining Transfer of Data from Supplier Offer to Item On Sale, etc
7. 3: [1]
THE LIST
This is a Tabular representation of the list of items on sale in the
store. The following 4 entities are displayed here.
The Item number
The Name
The Age (in Years)
The Cost
SPACING TOOL
There is a function
which is responsible
for the tabular
format of THE LIST.
1
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 This allows users to search for an item, making it much easier
than going through the long list to find something specific.
The search allows us to narrow down the list by
Providing Ranges in the Cost and Age
A word search for Name and History.
THE 6 FACES OF THE CUBE
This is a more elaborate explanation of THE CUBE
and the various tasks that it performs.
8. 3: [2]
I AM A CUSTOMER
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.
4
I AM A SUPPLIER
5 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.
I AM THE MANAGER
6
This option is for the manager. Since this is restricted to the
general public, it is password protected.
The Manager has the most number of options. He can add,
delete and edit an item on THE LIST. He can change the
password and access the CUBE CASHIER.
THE 6 FACES OF THE CUBE
This is one of the 3 user specific options.
If this is chosen, the user will be able to choose and buy the item
of his choice.
CUBE CASHIER
This is a money organizer
for the store. When an
item is sold or bought by
the store, the balance
increases and decreases
accordingly.
This option is for those who have something
to sell to the store.
When the manager accepts:
The item will be added to the LIST.
There will be a decrease in the store balance.
9. FLOW CHART DIAGRAM
START
DISPLAY THE VARIOUS OPTIONS:
(1) THE LIST | (2) THE HISTORY | (3) THE SEARCH |
| (4) I AM A CUSTOMER | (5) I AM A SUPPLIER | (6) I AM THE MANAGER
CHOOSE
(Input Ch)
RESTART
THE DO WHILE LOOP
421 3 5 6
IF
CH=1
|| CH=2 || CH=3
|| CH=4 || CH=5
|| CH=6 ||
CH=0
Ch=1 Ch=2 Ch=3 Ch=4 Ch=5 Ch=6 ELSE
END
Ch=0
SHOW
ERROR
MESSAGE
0
10. 1 void view()
SHOWS THE LIST OF ITEMS
void Space()
PROVIDES TABULAR FORMAT
FOR THE LIST
void SORT_LIST()
SORTS THE LIST ACCORDING
TO ASCENDING ITEMNO
2
void viewHis()
SHOWS THE LIST OF ITEMS
WITH HISTORY OF EACH
Call Call
Call Call
3
DISPLAYS THE VARIOUS OPTIONS
| PROVIDE RANGES IN
(1) AGE (2) COST
| A WORD SEARCH FOR
(3) NAME OF ITEM (4) HISTORY
CHOOSE
(Input Ch)
IF
CH=1
|| CH=2
|| CH=3
|| CH=4
ELSE
Ch=1 Ch=2 Ch=3
SHOW
ERROR
MESSAGE
Ch=4
0
0
0
ASKS FOR
UPPER LIMIT &
LOWER LIMIT
THEN DISPLAYS
THE SEARCH
RESULTS
ASKS FOR
THE WORD TO
SEARCH FOR
THEN DISPLAYS
THE SEARCH
RESULTS
ASKS FOR
UPPER LIMIT &
LOWER LIMIT
THEN DISPLAYS
THE SEARCH
RESULTS
ASKS FOR
THE WORD TO
SEARCH FOR
THEN DISPLAYS
THE SEARCH
RESULTS
FLOW CHART DIAGRAM
11. 5
SHOW
ASKS HOW MANY ITEMS THE
SUPPLIER IS WILLIING TO SELL.
ENTER
(Input num)
SHOW:
ASKS FOR ITEM NO: TO BUY:
4
ENTER ITEMNO
(INPUT CHK)
TRUE
IF
CHK
COINCIDES WITH
EXISTING
ITEM NO
FALSE
SHOW:
ASKS WHETHER TO BUY MORE? (y/n)
ENTER
(INPUT OK)
TRUE
IF
OK = ‘Y’
||
OK= ‘y’
FALSE
SHOW:
THE BILL OF ALL
ITEMS PURCHASED
0
SHOW:
SHOW WHICH ALL
DETAILS OF ITEM IS
REQUIRED:
IF
num LOOPS
ARE COMPLETED.
ENTER THE DETAILS
FALSE
FLOW CHART DIAGRAM
12. FLOW CHART DIAGRAM
6
DISPLAYS THE VARIOUS OPTIONS
| (1) CHANGE YOUR PASSWORD.
| (2) ADD AN ITEM TO THE LIST.
| (3) DELETE AN ITEM ON THE LIST.
| (4) EDIT AN ITEM ON THE LIST.
| (5) USE THE CUBE CASHIIER
| (0) EXIT
SHOW
“ENTER PASSWORD” SHOW
“WRONG PASSWORD”
IF
PW == PASS
ENTER
(Input PW)
FALSE
TRUECHOOSE
(Input Ch)
IF
CH=1
|| CH=2 || CH=3
|| CH=4 || CH=5
|| CH=0
ELSE
0
Ch=0
CHANGES THE
STRING STORED IN
PASS OF CLASS
MANAGER WHICH
IS LATER STORED
INTO A DATAFILE.
Ch=1
void ADD()
ALLOWS MANAGER TO ADD
RECORDS/ITEMS FROM
(1) SUPPLIER
(HIS ITEMS’S DETAILS ARE
SHOWN AND USER CAN
ACCEPT OR DECLINE THE
SUPPLIER’S OFFER )
(2) FROM MANAGER
( HE CAN ADD THE ITEMS
HIMSELF TO THE STORE )
void EDIT()
ACCORDING TO THE ITEM NO
INPUTTED, DETAILS CAN BE CHANGED
void DEL()
ACCORDING TO THE ITEM NO INPUTTED,
ITEM & ITS DETAILS ARE DELETED.void CCASH()
ALLOWS USER TO
VIEW, DEPOSIT AND
WITHDRAW FROM HIS
STORES’ BALANCE
0
Ch=4
Ch=3
Ch=5
Ch=2
13. 5: [1]
.
OTHERS10
I AM THE MANAGER16
I AM A SUPPLIER15
I AM A CUSTOMER14
THE SEARCH
13
THE HISTORY12
THE LIST1 VOID VIEW() - DISPLAYS THE ITEMS IN TABULAR FORMAT
VOID VIEWHIS() - SHOWS THE HISTORY OF THE ITEM
VOID SEARCH() - FINDS AN ITEM BY SEARCHING
FOR KEYWORDS IN NAME, AND RANGE IN AGE AND COST
VOID BUY() - ALLOWS USER TO BUY ITEMS ON THE LIST
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
VOID SELL() - ALLOWS USER TO SELL ITEMS TO STORE
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
USER DEFINED FUNCTIONS
14. 6: [1]
PROGRAM CODE
#include<fstream.h>
#include<stdio.h>
#include<string.h>
#include<conio.h>
#include<ctype.h>
#include<dos.h>
//SPACING TOOL OVERLOADED FUNCTIONS
//For Strings:
void Space(int n,char str[40],char sp=' ')
{
/* There is a fixed number of places(n),
and after the string (str) is displayed, the
remaining places are filled with spaces OR a char (sp).
This allows the data to be shown more aligned. */
int i;
cout.write(str,strlen(str));
int L=(n-strlen(str));
for(i=1; i<=L; i++)
{
cout<<sp;
}
}
//For Unsigned Long:
void Space(int n, unsigned long a)
{
/* Same concept as above
BUT a different arrangement for Nos.
From the fixed number of places(n),
the number (a) is displayed at the end
rather than the beginning as for strings. */
unsigned long i=a;
int count=0;
do
{
i=i/10;
count++;
}
while(i>0);
for(i=1; i<=(n-count); i++)
putchar(' ');
cout<<a;
}
15. 6: [2]
PROGRAM CODE
//For Integers.
void Space(int n, int a)
{
int i=a;
int count=0;
do
{
i=i/10;
count++;
}
while(i>0);
for(i=1; i<=((n-count)); i++)
putchar(' ');
cout<<a;
}
16. 6: [3]
PROGRAM CODE
//GLOBAL MEMBERS
int total;
void count();
void ALL_IN();
void ALL_OUT();
//THE CLASS LIST STARTS HERE:
class LIST
{
public:
char itmNo[40];
char Name[40];
int Age;
unsigned long Cost;
char His[100];
LIST()
{ clrscr();
//Creation of datafile if program opened for first time:
fstream f;
f.open( "CB_LIST.DAT", ios::out | ios::noreplace );
f.close();
count();
ALL_IN();
}
~LIST()
{ ALL_OUT(); }
void view(); //Displays the List in tabular form
void viewHis(); //Displays List with History
void Search(); //Search an item on List.
void Buy(); //Deletes an item (Customer Option)
void Sell(); /*Saves the details of the item to sell
for consideration (Supplier Option) */
void DEL(); //Deletes an item (Manager Option)
void ADD(); //Adds an item (Manager Option)
void EDIT(); //Edits an existing item (Manager Option)
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;
17. 6: [4]
PROGRAM CODE
//GLOBAL MEMBERS
int stotal;
void scount();
void sALL_IN();
void sALL_OUT();
// THE CLASS Sup STARTS HERE:
class Sup
{
public:
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;
18. 6: [5]
PROGRAM CODE
//GLOBAL MEMBERS
void PASS_IN();
void PASS_OUT();
void BAL_IN();
void BAL_OUT();
// THE CLASS MNGR STARTS HERE:
unsigned long bal; //balance
char pass[10]; //password
class Mngr
{
public:
unsigned long dw; //deposit or withdraw.
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();
PASS_IN(); //Retrieves the password from a datafile
BAL_IN(); //Retrieves the current store balance from a datafile
}
~Mngr()
{
PASS_OUT(); //Sends the password into a datafile
BAL_OUT(); //Sends the current store balance into a datafile
}
void PW(); //Function that changes the password
void Cview(); //Function that shows Store Balance
void Cdep(unsigned long); //Function that allows us to deposit money
void Cwid(unsigned long); //Function that allows us to withdraw money
void CCash(); // Function that opens the menu for CUBE CASHIER
} m1;
19. 6: [6]
PROGRAM CODE
// THE FUNCTIONS THAT WORK WITH DATA FILES.
// Function count Finds No of Items in Store
void count()
{
fstream f;
f.open( "CB_LIST.DAT", ios::in | ios::binary );
int counter=0;
while( ! f.eof() )
{
f.read((char*)&sob, sizeof(LIST));
counter++;
};
counter--; //since one record extra is always counted.
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();
}
20. 6: [7]
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();
}
// Counts the no of Supplier offers for the manager to decide on later.
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++;
};
counter--; //since one record extra is always counted.
f.close();
stotal=counter;
}
21. 6: [8]
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;
while( i < stotal )
{
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;
while( i< stotal )
{
blow.write((char*)&s[i], sizeof(LIST));
i++;
};
blow.close();
}
22. 6: [9]
PROGRAM CODE
// Retrieves the store balance from the Data File.
void BAL_IN()
{
fstream chew;
chew.open( "CB_BAL.DAT", ios::in);
chew>>bal;
chew.close();
}
// Stores the Store Balance into the Data File.
void BAL_OUT()
{
fstream blow;
blow.open( "CB_BAL.DAT", ios::out | ios::binary | ios::trunc );
blow<<bal;
blow.close();
}
// Retrieves the Password from the Data File.
void PASS_IN()
{
fstream chew;
chew.open( "CB_PASS.DAT", ios::in);
chew>>pass;
chew.close();
}
// Stores the Password into the Data File.
void PASS_OUT()
{
fstream blow;
blow.open( "CB_PASS.DAT", ios::out | ios::binary | ios::trunc );
blow<<pass;
blow.close();
}
23. 6: [10]
PROGRAM CODE
// THE CLASS MNGR FUNCTIONS:
void Mngr ::PW()
{
char Upass[10]; //user pass
cout<<"n Please enter the new Password (10 char)n ";
gets(Upass);
cout<<"n Your Password has been Changed from”;
cout<<“ " "<<pass<<" " to " "<<Upass<<" " .n";
strcpy(pass,Upass);
}
void Mngr ::Cview()
{
cout<<"n The Balance in your Account: "<<bal;
cout<<endl;
}
void Mngr ::Cdep(unsigned long dep=-1)
{
if(dep==-1) //by manager
{
cout<<"n How much money to deposit into Account?n ";
cin>>dw; cin.ignore();
bal+=dw;
Cview();
}
else
{ bal+=dep; }
}
void Mngr ::Cwid(unsigned long wid=-1)
{
if(wid==-1) //by manager
{
cout<<"n How much money to withdraw into Account?n ";
cin>>dw; cin.ignore();
if( dw>bal )
{ cout<<"n There is not enough money to withdraw."; }
else
{bal-=dw; }
Cview();
}
else
{ bal-=wid; }
}
24. 6: [11]
PROGRAM CODE
void Mngr::CCash()
{
int ch; char ok;
cout<<"n Welcome to The Cube Cashier.";
do
{
cout<<"n Choose Among The Options Below: nn 1. View Balancenn 2.
Depositnn 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<<"n Exit Cube Cashier? (Y/N) :";
cin.get(ok);
cout<<endl;
}while(ok=='n' || ok=='N');
}
25. 6: [12]
PROGRAM CODE
// THE CLASS LIST FUNCTIONS:
void LIST::view()
{
SORT_LIST();
Space(33,"_",'_'); Space(41,"THE LIST",'_'); cout<<endl;
Space(12,"Item No | ");
Space(42,"Name of Item");
Space(7,"| Age");
Space(12,"| Cost");
cout<<"|nn";
for(int j=0; j<total; j++)
{
Space(12,cb[j].itmNo);
Space(42,cb[j].Name);
Space(7,cb[j].Age);
Space(12,cb[j].Cost);
cout<<"nn";
if((j+1)%10==0 && j!=0 && total>10)
{ cout<<" See the next 10 items? (Y/N) : ";
char ch; cin.get(ch); cout<<endl;
if(ch=='y' || ch=='Y')
continue;
else
break;
}
} //End of for loop.
//Exception Handling
if(total==0)
{
Space(22,"");
Space(52,"<<<< NO ITEMS FOUND! >>>>");
cout<<endl<<endl;
}
Space(27,"_",'_'); Space(47,"[Enter To Continue]",'_');
cout<<endl; getch(); cout<<endl;
}
26. 6: [13]
PROGRAM CODE
void LIST::viewHis()
{
char temp[100];
SORT_LIST();
Space(31,"_",'_'); Space(43,"THE HISTORY",'_'); cout<<endl;
Space(12,"Item No | ");
Space(42,"Name of Item");
Space(7,"| Age");
Space(12,"| Cost");
cout<<"|nn";
for(int i=0; i<total; i++)
{
Space(12,cb[i].itmNo);
Space(42,cb[i].Name);
Space(7,cb[i].Age);
Space(12,cb[i].Cost);
cout<<"nn";
Space(12," | HISTORY: ");
Space(57, cb[i].His ); cout<<endl;
if( (i+1)!=total )
Space(74,"",'_');
cout<<"nn";
if( (i+1)%5==0 && i!=0 && total>5)
{ cout<<" See the next 5 items? (Y/N) : ";
char ch; cin.get(ch); cout<<endl;
if(ch=='y' || ch=='Y')
{
clrscr();
Space(31,"_",'_'); Space(43,"THE HISTORY",'_'); cout<<endl;
Space(12,"Item No | ");
Space(42,"Name of Item");
Space(7,"| Age");
Space(12,"| Cost");
cout<<"|nn";
continue;
}
else
break;
} //end of outer if loop
} //end of for loop
27. 6: [14]
PROGRAM CODE
//Exception Handling
if(total==0)
{
Space(22,"");
Space(52,"<<<< NO ITEMS FOUND! >>>>");
cout<<endl<<endl;
}
Space(27,"_",'_'); Space(47,"[Enter To Continue]",'_');
cout<<endl; getch(); cout<<endl;
}
void LIST::SORT_LIST()
{
char tempIN[40];
char tempName[40];
int tempAge;
unsigned long tempCost;
char tempHis[100];
int i;
int flag=0;
for(i=total; i>0; i--)
{
for(int j=0; j<i-1; j++)
{
//To Compare the Strings.
for(int o=0; o<strlen(cb[j].itmNo); o++)
{
if(cb[j].itmNo[o]==cb[j+1].itmNo[o])
continue;
else if(cb[j].itmNo[o]>cb[j+1].itmNo[o])
{ flag=1; break; }
else
{flag=0; break;}
} //inner most for loop.
if(flag==1)
{
strcpy(tempIN,cb[j].itmNo);
strcpy(cb[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);
29. 6: [16]
PROGRAM CODE
cout<<"nn";
int count=0; //counts no of letters in each word
int J=0; //a memory location for temporary positions.
int flag=0;
// Outer loop searches moves from item to item nof LIST
for(i=0; i<total; i++)
{
//Making Last character of every String/Name an End of Word character
// i.e <space>
if( cb[i].Name[ (strlen(cb[i].Name)-1) ] !=' ' )
cb[i].Name[ (strlen(cb[i].Name)) ]=' ';
// Inner loop compares word by word of an item NAME at a time
for(int j=0; j< strlen( cb[i].Name ) ; j++)
{
J=j-1;
if(cb[i].Name[j]==' ')
continue;
do //Finds total length of the word.
{
J++;
count++;
}
while(cb[i].Name[J+1] != ' ');
//outermost if
if(count==strlen(S))
{ //if the lengths of searched item and word are same.
if( (cb[i].Name[j]==Su[0]) || (cb[i].Name[j]==Sl[0]) )
{ // if the first character of both searched item and name is same
// Innermost loop compares character by character from
// the starting of each word in the Item Name.
for(int o=0; o<count; o++)
{
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
if(o==count-1) // if this is the last character
{
flag=1;
Space(12,cb[i].itmNo);
Space(42,cb[i].Name);
Space(7,cb[i].Age);
Space(12,cb[i].Cost);
cout<<"nn";
}//end of innermost if
30. 6: [17]
PROGRAM CODE
} // end of if statement that checks first character of both words
else
{break; } //end of 3rd inner if-else
}//end of innermost for loop
}//end of inner if loop
}//outermost if
//moves the counter ( j )of the loop that searches word by word to the next
//word of item Name.
j+=(count-1);
count=0;
} //inner for loop.
} //outer loop.
//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;
31. 6: [18]
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 Enter a Word to Search for: ";
gets(S);
//to remove the case sensitivity of a search.
for(i=0; i<strlen(S); i++)
{
Su[i]=toupper(S[i]);
Sl[i]=tolower(S[i]);
}
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<<"nn";
count=0; //counts no of letters in each word
J=0; //a memory location for temporary positions.
flag=0;
for(i=0; i<total; i++)
{
if( cb[i].His[ (strlen(cb[i].His)-1) ] !=' ' )
cb[i].His[ (strlen(cb[i].His)) ]=' ';
for(int j=0; j< strlen( cb[i].His ) ; j++)
{
J=j-1;
if(cb[i].His[j]==' ')
continue;
//Finds total length of the word.
do
{
J++;
count++;
}
while(cb[i].His[J+1] != ' ');
//outermost if
if(count==strlen(S))
{ //if the lengths of searched item and word is same.
if( (cb[i].His[j]==Su[0]) || (cb[i].His[j]==Sl[0]) )
32. 6: [19]
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<<"nnn";
} //end of 4th inner if
}
else
{ break; }
}//end of innermost for loop
}//end of if loop
} //outermost if
j+=(count-1);
count=0;
} //inner for loop.
} //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;
33. 6: [20]
PROGRAM CODE
case 2: //Search in Age of Item
unsigned long U,L; //upper limit, lower limit
flag=0;
cout<<"n Enter the Upper Limit and Lower Limit. (Both Included in
Search.)n";
cout<<"n ttt Lower Limit: "; cin>>L;
cout<<" ttt Upper Limit: "; cin>>U;
cout<<"nn ttt [ "<<L<<" <--> "<<U<<" ]";
cout<<endl;
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<<"nn";
for(i=0; i<total; i++)
{
if( cb[i].Age >=L && cb[i].Age <=U )
{
flag=1;
Space(12,cb[i].itmNo);
Space(42,cb[i].Name);
Space(7,cb[i].Age);
Space(12,cb[i].Cost);
cout<<"nn";
}
}
//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;
34. 6: [21]
PROGRAM CODE
case 3: //Search in Cost
// It is the same as the search in age,
//except for the fact that Cost is an unsigned long datatype,
//and Age is an integer datatype
flag=0;
cout<<"n Enter the Upper Limit and Lower Limit. (Both Included in
Search.)n";
cout<<"n ttt Lower Limit: "; cin>>L;
cout<<" ttt Upper Limit: "; cin>>U;
cout<<"nn ttt [ "<<L<<" <--> "<<U<<" ]";
cout<<endl;
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<<"nn";
for(i=0; i<total; i++)
{
if( cb[i].Cost >=L && cb[i].Cost <=U )
{
flag=1;
Space(12,cb[i].itmNo);
Space(42,cb[i].Name);
Space(7,cb[i].Age);
Space(12,cb[i].Cost);
cout<<"nn";
}
}
if(flag==0)
{
Space(22,"");
Space(52,"<<<< NO SUCH ITEM FOUND! >>>>");
cout<<endl<<endl;
}
Space(27,"_",'_'); Space(47,"[Enter To Continue]",'_');
getch();
break;
default: cout<<"Invalid Choice. "<<'n';
}
//end of switch case
} // End of Search()
35. 6: [22]
PROGRAM CODE
int LIST::Find_it(char chk[40])
{
int pos=-5;
//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;
}
void LIST::Remove_it(char chk[40])
{
int pos=Find_it(chk);
//Deleting the items at position pos:
for(int i=pos; i<total-1; i++)
{
strcpy(cb[i].itmNo,cb[i+1].itmNo);
strcpy(cb[i].Name, cb[i+1].Name);
cb[i].Age=cb[i+1].Age;
cb[i].Cost=cb[i+1].Cost;
}
total--;
}
36. 6: [23]
PROGRAM CODE
void LIST::DEL()
{
char chk[40]; char ok='n';
do
{
cout<<" Enter the item number of the item you wish to delete.n ";
gets(chk);
int pos=Find_it(chk);
if(pos==-5) //Error Handling
{
cout<<" No such Item Number. n You may have typed it Wrong."<<'n';
cout<<"nn Try again (y/n) ?n ";
cin.get(ok);
cin.ignore(); //Buffer error removed.
cout<<"n";
}
else
{
Remove_it(chk);
cout<<"nn The Item has been deleted.nn";
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<<"nn"; view(); }
}
37. 6: [24]
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 buyn ";
gets(chk[count]);
//Error Handling : You can not buy same item twice.
int ok3=0;
for(int i=0; i<count; i++)
{
if(strcmp(chk[count],chk[i])==0)
ok3=1;
}
if(ok3==1)
{cout<<"n You cannot buy the same item twice! nn"; count--; continue; }
//END OF ERROR HANDLING.
pos[count]=Find_it(chk[count]);
//Error Handling: Wrong Item Number Entered.
if(pos[count]==-5)
{ cout<<"n INVALID Item Number. Try Again. (y/n) n ";
count--;
ok='n';
}
//To allow users to buy more than one item. max 5.
else
{
bought='y';
cout<<"n Buy Another item? (y/n) [MAX: 5 items per Bill] n ";
}
cin.get(ok); cout<<endl;
cin.ignore(); //Buffer error
}
while(ok=='y' || ok=='Y');
if(bought=='y')
{
Space(20,"_",'_'); Space(30,"BILL",'_'); cout<<endl;
Space(40,"| Name");
38. 6: [25]
PROGRAM CODE
Space(1 0,"| Cost");
cout<<endl;
unsigned long totalcost=0;
for(int i=0; i<=count; i++)
{
Space(40,cb[pos[i]].Name);
Space(10,cb[pos[i]].Cost);
totalcost+=cb[pos[i]].Cost;
cout<<endl;
}
Space(20,"_",'_'); Space(30,"_",'_'); cout<<endl;
Space(40," TOTAL: "); Space(10,totalcost);
cout<<"nn Thank you for shopping at This Antique Store. n";
for(i=0; i<=count; i++)
{
Remove_it(cb[pos[i]].itmNo);
}
bal+=totalcost; //increasing store balance.
}
else
{
cout<<"n Hope you find something of interest next time.";
}
}
39. 6: [26]
PROGRAM CODE
void LIST::EDIT()
{
char chk[40];
cout<<" Enter the Item No of the Item to Editn ";
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<<"nn 1. Namenn 2. Agenn 3. Costnn 4. Historynn 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(cb[pos].His , his);
break;
default: cout<<" INVALID CHOICE. n";
}
cin.ignore();
cout<<" nn Any more EDITs on this item? (Y/N) : ";
cin.get(ok);
}
while(ok=='y' || ok=='Y');
cout<<" n Your EDITING has been successful! ";
}
40. 6: [27]
PROGRAM CODE
} // END OF EDIT()
void LIST::ADD()
{
cout<<"n TO ADD AN ITEM TO THE STORE.nn 1. From Suppliernn 2.
From Manager.nn ";
cout<<"Your Choice (1-2) : ";
int chk; cin>>chk;
int i;
switch(chk)
{
case 1:
if( stotal > 0 )
{
for(i=0; i<stotal; i++)
{
cout<<"n Item #"<<(i+1);
cout<<"n Name of Item : "<<s[i].Name;
cout<<"n Age of Item : "<<s[i].Age;
cout<<"n Asked Price : "<<s[i].Cost;
cout<<"n History : "<<s[i].His;
cout<<"nn ACCEPT OR DECLINE? (A/D): ";
char ch2; cin>>ch2;
cout<<endl;
if(ch2=='a' || ch2=='A')
{
for(int j=0; j<1; j++)
{
cout<<" Enter the Item No of new Item:n ";
gets(cb[total].itmNo);
//ERROR HANDLING. ITEM NO MUST BE UNIQUE.
if(Find_it(cb[total].itmNo)!=-5) //if item number as such exists
{
cout<<" Entered Item Number Already Exists. RETRY! nn";
j--;
continue;
}
//END OF ERROR HANDLING.
} //END of inner FOR LOOP
cout<<"n Enter the new Item's Price:n ";
cin>>cb[total].Cost;
m1.Cwid(s[i].Cost);
//removing asked price by supplier from the store balance.
strcpy( cb[total].Name,s[i].Name );
41. 6: [28]
PROGRAM CODE
cb[total].Age=s[i].Age;
strcpy( cb[total].His,s[i].His );
total++;
}
else if(ch2=='d' || ch2=='D')
{
cout<<" Item is Declined.n";
}
if( (i+1) == stotal )
{
cout<<"n No More Items By Supplier.n";
//clearing the CB_SALE.dat
fstream f;
f.open("CB_SALE.DAT", ios::out | ios::trunc );
f.close();
//end of clearing
}
} //end of for loop.
//Deleting items from the Supplier Waiting List.
stotal=0;
}
else
{
cout<<"n No Items by Supplier n";
}
break;
case 2:
cout<<"n How many items to add? : ";
int noi; cin>>noi; //no of items to sell
cout<<endl;
for(i=0; i<noi; i++)
{
cout<<"n Item To Add ("<<(i+1)<<"/"<<noi<<")nn";
cout<<" Enter the Item No of new Item : "; gets(cb[total].itmNo);
//ERROR HANDLING. ITEM NO MUST BE UNIQUE.
if(Find_it(cb[total].itmNo)!=-5) //if itm number as such exists
{cout<<"n Entered Item Number Already Exists. RETRY! nn";
i--;
continue;
}
//END OF ERROR HANDLING.
cout<<"n Enter the Name of the Item : "; gets(cb[total].Name);
cout<<"n Enter the Age of the Item : "; cin>>cb[total].Age;
cout<<"n Enter the Item's Price : "; cin>>cb[total].Cost;
cout<<"n Enter the Item's History : "; gets(cb[total].His);
total++;
}
42. 6: [29]
PROGRAM CODE
break;
default: cout<<"n Invalid Choice.";
} //End of Switch Case
char ok='n'; cin.ignore();
cout<<"n Would you like to see THE LIST? (Y/N) : ";
cin.get(ok); cin.ignore();
if(ok=='y' || ok=='Y')
{ cout<<"nn"; 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;
for(int i=0; i<noi; i++)
{
cout<<"n Item To Sell No:"<<(i+1)<<"nn";
cout<<" Enter the Name of the Item: "; gets(s[stotal].Name);
cout<<"n Enter the Age of the Item: "; cin>>s[stotal].Age;
cout<<"n Enter your Selling Price: "; cin>>s[stotal].Cost;
cout<<"n Enter Item's History: "; gets(s[stotal].His);
stotal++;
}
cout<<"n Thank you for your offer. n";
}
43. 6: [30]
PROGRAM CODE
// THE VOID MAIN FUNCTION:
void main()
{
int ch;
do
{
clrscr();
Space(74,"",'_'); cout<<endl;
Space(33,"",'_'); Space(41,"MAIN MENU",'_'); cout<<endl;
Space(25,"n 1. THE LIST");
Space(28," | Shows the List of items on Sale.");
cout<<endl;
Space(25,"n 2. THE HISTORY");
Space(28," | Learn more about an Item or Store");
cout<<endl;
Space(25,"n 3. THE SEARCH ");
Space(28," | Can't Find what you're looking for?",' ');
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 6. I AM THE MANAGER");
Space(28," | A Password Protected Control Centre. ");
cout<<endl;
Space(25,"n 0. EXIT.");
Space(28," | Done here? Leave the Online Store.");
cout<<endl;
Space(74,"",'_');
cout<<"nn Your Choice (0-6): ";
cin>>ch; cin.ignore(); cout<<endl;
clrscr();
switch(ch)
{
case 1: ob.view(); break;
case 2: ob.viewHis(); break;
case 3: ob.Search(); break;
44. 6: [31]
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;
case 6: int ch2;
cout<<" Enter the Password: n ";
char ps[10]; gets(ps);
if(strcmp(ps,pass)==0)
{
cout<<"n Welcome Back Manager.nn";
do
{
clrscr();
cout<<endl;
Space(29,"_",'_'); Space(45,"I AM THE MANAGER",'_'); cout<<endl;
cout<<endl;
Space(33,"n 1. CHANGE THE PASSWORD ");
Space(20," | Be Safe & Secure. ");
cout<<endl;
Space(33,"n 2. ADD AN ITEM TO THE LIST ");
Space(20," | More items to add? ");
cout<<endl;
Space(33,"n 3. EDIT AN ITEM ON THE LIST ");
Space(20," | Make some Changes. ",' ');
cout<<endl;
Space(33,"n 4. DELETE AN ITEM FROM THE LIST");
45. 6: [32]
PROGRAM CODE
Space(20," | Remove the Unwanted.");
cout<<endl;
Space(33,"n 5. USE THE CUBE CASHIER ");
Space(20," | Check. Deposit. Withdraw.");
cout<<endl;
Space(33,"n 0. EXIT.");
Space(20," | Done? Log out Safely.");
cout<<endl;
Space(74,"",'_');
cout<<"nn Your Choice (0-5): ";
cin>>ch2; cin.ignore(); cout<<endl;
clrscr();
cout<<endl;
Space(29,"_",'_'); Space(45,"I AM THE MANAGER",'_'); cout<<endl;
cout<<endl;
switch(ch2)
{
case 1: m1.PW(); break;
case 2: ob.ADD(); break;
case 3:
ob.EDIT();
cout<<endl;
Space(27,"_",'_'); Space(47,"[Enter To Continue]",'_');
getch();
break;
case 4: ob.DEL(); break;
case 5: m1.CCash(); break;
case 0:
cout<<"n Thank you & Goodbye Manager! You Have been logged out
Safely. n";
cout<<endl;
Space(27,"_",'_'); Space(47,"[Enter To Continue]",'_');
getch();
break;
default: cout<<"n INVALID CHOICE! RETRY! n";
}
}
while(ch2!=0);
46. 6: [33]
PROGRAM CODE
}
else
{ cout<<"n Wrong Password!n "; getch(); }
break;
default: cout<<"nn Thank you For Visitng & Come Again Soon! ";
}
}while(ch!=0);
getch();
}
47. 7: [1]
SAMPLE INPUT & OUTPUT
__________________________________________________________________________
_________________________________MAIN MENU________________________________
1. THE LIST | Shows the List of items on Sale.
2. THE HISTORY | Learn more about an Item or Store
3. THE SEARCH | Can't Find what you're looking for?
4. I AM A CUSTOMER | Buy something nice for Yourself.
5. I AM A SUPPLIER | Sell us something We may like.
6. I AM THE MANAGER | A Password Protected Control Centre.
0. EXIT. | Done here? Leave the Online Store.
__________________________________________________________________________
Your Choice (0-6): 1
_________________________________THE LIST_________________________________
Item No | Name of Item | Age| Cost|
#23022 Compass of Peter Tsar The Terrible 140 7000000
#23023 Gustave's Blueprints 120 6000000
#23032 Hitler's Globe 76 3800000
#23033 Karl's Ink Pen 125 6250000
#23058 Katana of Shogan Tokugawa 414 20700000
#23059 Mahatma Gandhi's Spectacles 62 3100000
#23067 Red Barron's Remains 96 4800000
#23076 Silver Claws Of Maharana 74 3700000
#23077 Stallon's Lost Diary 76 3800000
#23081 Sword of Tipu Sultan 87 4350000
See the next 10 items? (Y/N) : Y
#23091 The Pharaoh's Sceptre 124 6200000
#23096 Viking's Sledgehammer 168 8400000
___________________________[Enter To Continue]____________________________
48. 7: [2]
SAMPLE INPUT & OUTPUT
__________________________________________________________________________
_________________________________MAIN MENU________________________________
1. THE LIST | Shows the List of items on Sale.
2. THE HISTORY | Learn more about an Item or Store
3. THE SEARCH | Can't Find what you're looking for?
4. I AM A CUSTOMER | Buy something nice for Yourself.
5. I AM A SUPPLIER | Sell us something We may like.
6. I AM THE MANAGER | A Password Protected Control Centre.
0. EXIT. | Done here? Leave the Online Store.
__________________________________________________________________________
Your Choice (0-6): 2
_______________________________THE HISTORY________________________________
Item No | Name of Item | Age| Cost|
#23022 Compass of Peter Tsar The Terrible 140 7000000
| HISTORY: The compass used by the famous conqueror
__________________________________________________________________________
#23023 Gustave's Blueprints 120 6000000
| HISTORY: The original blueprints of the Eiffel Tower
__________________________________________________________________________
#23032 Hitler's Globe 76 3800000
| HISTORY: The globe he used to strategize his conquests
__________________________________________________________________________
#23033 Karl's Ink Pen 125 6250000
| HISTORY: He wrote the Communist Manifesto with this pen
__________________________________________________________________________
#23058 Katana of Shogan Tokugawa 414 20700000
| HISTORY: The sword of the first Shogun of the Tokugawa clan
__________________________________________________________________________
See the next 5 items? (Y/N) : Y
_______________________________THE HISTORY________________________________
Item No | Name of Item | Age| Cost|
#23059 Mahatma Gandhi's Spectacles 62 3100000
| HISTORY: See the world through the eyes of this reputed freedom fighter
__________________________________________________________________________
#23067 Red Barron's Remains 96 4800000
| HISTORY: The famous fighter plane from World War 1
__________________________________________________________________________
#23076 Silver Claws Of Maharana 74 3700000
| HISTORY: The weapon he was most skilled in
__________________________________________________________________________
#23077 Stallon's Lost Diary 76 3800000
| HISTORY: The journal where he wrote his strategies and plans
__________________________________________________________________________
#23081 Sword of Tipu Sultan 87 4350000
| HISTORY: The sword he held before he met his death
49. 7: [3]
SAMPLE INPUT & OUTPUT
__________________________________________________________________________
See the next 5 items? (Y/N) : Y
_______________________________THE HISTORY________________________________
Item No | Name of Item | Age| Cost|
#23091 The Pharaoh's Sceptre 124 6200000
| HISTORY: An Egyptian artefact that was a symbol of authority
__________________________________________________________________________
#23096 Viking's Sledgehammer 168 8400000
| HISTORY: A weapon of great power used by the Vikings
___________________________[Enter To Continue]____________________________
50. 7: [4]
SAMPLE INPUT & OUTPUT
__________________________________________________________________________
_________________________________MAIN MENU________________________________
1. THE LIST | Shows the List of items on Sale.
2. THE HISTORY | Learn more about an Item or Store
3. THE SEARCH | Can't Find what you're looking for?
4. I AM A CUSTOMER | Buy something nice for Yourself.
5. I AM A SUPPLIER | Sell us something We may like.
6. I AM THE MANAGER | A Password Protected Control Centre.
0. EXIT. | Done here? Leave the Online Store.
__________________________________________________________________________
Your Choice (0-6): 3
_________________________________THE SEARCH_______________________________
Which entity to search in?
1. Name
2. Age
3. Cost
4. History
Your Choice (1-4) : 1
Enter a Word to Search for: gLoBe
______________________________SEARCH RESULTS______________________________
Item No | Name of Item | Age| Cost|
#23032 Hitler's Globe 76 3800000
___________________________[Enter To Continue]____________________________
_________________________________THE SEARCH_______________________________
Which entity to search in?
1. Name
2. Age
3. Cost
4. History
Your Choice (1-4) : 3
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|
<<<< NO SUCH ITEM FOUND! >>>>
___________________________[Enter To Continue]____________________________
51. 7: [5]
SAMPLE INPUT & OUTPUT
_________________________________THE SEARCH_______________________________
Which entity to search in?
1. Name
2. Age
3. Cost
4. History
Your Choice (1-4) : 2
Enter the Upper Limit and Lower Limit. (Both Included in Search.)
Lower Limit: 100
Upper Limit: 200
[ 100 <--> 200 ]
______________________________SEARCH RESULTS______________________________
Item No | Name of Item | Age| Cost|
#23022 Compass of Peter Tsar The Terrible 140 7000000
#23023 Gustave's Blueprints 120 6000000
#23033 Karl's Ink Pen 125 6250000
#23091 The Pharaoh's Sceptre 124 6200000
#23096 Viking's Sledgehammer 168 8400000
___________________________[Enter To Continue]____________________________
_________________________________THE SEARCH_______________________________
Which entity to search in?
1. Name
2. Age
3. Cost
4. History
Your Choice (1-4) : 4
Enter a Word to Search for: fighter
______________________________SEARCH RESULTS______________________________
Item No | Name of Item | Age| Cost|
#23059 Mahatma Gandhi's Spectacles 62 3100000
| History:
| See the world through the eyes of this reputed freedom fighter
...
#23067 Red Barron's Remains 96 4800000
| History:
| The famous fighter plane from World War 1
...
___________________________[Enter To Continue]____________________________
52. 7: [6]
SAMPLE INPUT & OUTPUT
__________________________________________________________________________
_________________________________MAIN MENU________________________________
1. THE LIST | Shows the List of items on Sale.
2. THE HISTORY | Learn more about an Item or Store
3. THE SEARCH | Can't Find what you're looking for?
4. I AM A CUSTOMER | Buy something nice for Yourself.
5. I AM A SUPPLIER | Sell us something We may like.
6. I AM THE MANAGER | A Password Protected Control Centre.
0. EXIT. | Done here? Leave the Online Store.
__________________________________________________________________________
Your Choice (0-6): 4
______________________________I AM A CUSTOMER_____________________________
Enter the item number of the item you wish to buy
#23033
Buy Another item? (y/n) [MAX: 5 items per Bill]
Y
Enter the item number of the item you wish to buy
#23081
Buy Another item? (y/n) [MAX: 5 items per Bill]
N
____________________BILL__________________________
| Name | Cost
Karl's Ink Pen 6250000
Sword of Tipu Sultan 4350000
__________________________________________________
TOTAL: 10600000
Thank you for shopping at This Antique Store.
___________________________[Enter To Continue]____________________________
53. 7: [7]
SAMPLE INPUT & OUTPUT
__________________________________________________________________________
_________________________________MAIN MENU________________________________
1. THE LIST | Shows the List of items on Sale.
2. THE HISTORY | Learn more about an Item or Store
3. THE SEARCH | Can't Find what you're looking for?
4. I AM A CUSTOMER | Buy something nice for Yourself.
5. I AM A SUPPLIER | Sell us something We may like.
6. I AM THE MANAGER | A Password Protected Control Centre.
0. EXIT. | Done here? Leave the Online Store.
__________________________________________________________________________
Your Choice (0-6): 1
_________________________________THE LIST_________________________________
Item No | Name of Item | Age| Cost|
#23022 Compass of Peter Tsar The Terrible 140 7000000
#23023 Gustave's Blueprints 120 6000000
#23032 Hitler's Globe 76 3800000
#23058 Katana of Shogan Tokugawa 414 20700000
#23059 Mahatma Gandhi's Spectacles 62 3100000
#23067 Red Barron's Remains 96 4800000
#23076 Silver Claws Of Maharana 74 3700000
#23077 Stallon's Lost Diary 76 3800000
#23091 The Pharaoh's Sceptre 124 6200000
#23096 Viking's Sledgehammer 168 8400000
___________________________[Enter To Continue]____________________________
54. 7: [8]
SAMPLE INPUT & OUTPUT
_________________________________MAIN MENU________________________________
1. THE LIST | Shows the List of items on Sale.
2. THE HISTORY | Learn more about an Item or Store
3. THE SEARCH | Can't Find what you're looking for?
4. I AM A CUSTOMER | Buy something nice for Yourself.
5. I AM A SUPPLIER | Sell us something We may like.
6. I AM THE MANAGER | A Password Protected Control Centre.
0. EXIT. | Done here? Leave the Online Store.
__________________________________________________________________________
Your Choice (0-6): 5
______________________________I AM A SUPPLIER_____________________________
Welcome Supplier.
How many items to sell?
2
Item To Sell No:1
Enter the Name of the Item: The Orb of Galactus
Enter the Age of the Item: 68
Enter your Selling Price: 5000000
Enter Item's History: The power of the cosmos trapped in an orb
Item To Sell No:2
Enter the Name of the Item: The Toothpick of Gibralter
Enter the Age of the Item: 45
Enter your Selling Price: 5600000
Enter Item's History: It still holds the piece of lettuce he pulled out
Thank you for your offer.
___________________________[Enter To Continue]____________________________
55. 7: [9]
SAMPLE INPUT & OUTPUT
__________________________________________________________________________
_________________________________MAIN MENU________________________________
1. THE LIST | Shows the List of items on Sale.
2. THE HISTORY | Learn more about an Item or Store
3. THE SEARCH | Can't Find what you're looking for?
4. I AM A CUSTOMER | Buy something nice for Yourself.
5. I AM A SUPPLIER | Sell us something We may like.
6. I AM THE MANAGER | A Password Protected Control Centre.
0. EXIT. | Done here? Leave the Online Store.
__________________________________________________________________________
Your Choice (0-6): 6
Enter the Password:
Hamburger
_____________________________I AM THE MANAGER_____________________________
1. CHANGE THE PASSWORD | Be Safe & Secure.
2. ADD AN ITEM TO THE LIST | More items to add?
3. EDIT AN ITEM ON THE LIST | Make some Changes.
4. DELETE AN ITEM FROM THE LIST | Remove the Unwanted.
5. USE THE CUBE CASHIER | Check. Deposit. Withdraw.
0. EXIT. | Done? Log out Safely.
__________________________________________________________________________
Your Choice (0-5): 1
_____________________________I AM THE MANAGER_____________________________
Please enter the new Password (10 char)
pass
Your Password has been Changed from " Hamburger " to " pass " .
___________________________[Enter To Continue]____________________________
56. 7: [10]
SAMPLE INPUT & OUTPUT
_____________________________I AM THE MANAGER_____________________________
1. CHANGE THE PASSWORD | Be Safe & Secure.
2. ADD AN ITEM TO THE LIST | More items to add?
3. EDIT AN ITEM ON THE LIST | Make some Changes.
4. DELETE AN ITEM FROM THE LIST | Remove the Unwanted.
5. USE THE CUBE CASHIER | Check. Deposit. Withdraw.
0. EXIT. | Done? Log out Safely.
__________________________________________________________________________
Your Choice (0-5): 2
_____________________________I AM THE MANAGER_____________________________
TO ADD AN ITEM TO THE STORE.
1. From Supplier
2. From Manager.
Your Choice (1-2) : 1
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
ACCEPT OR DECLINE? (A/D): D
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
ACCEPT OR DECLINE? (A/D): A
Enter the Item No of new Item:
#23077
Entered Item Number Already Exists. RETRY!
Enter the Item No of new Item:
#23078
Enter the new Item's Price:
7000000
No More Items By Supplier.
Would you like to see THE LIST? (Y/N) : Y
57. 7: [11]
SAMPLE INPUT & OUTPUT
_________________________________THE LIST_________________________________
Item No | Name of Item | Age| Cost|
#23022 Compass of Peter Tsar The Terrible 140 7000000
#23023 Gustave's Blueprints 120 6000000
#23032 Hitler's Globe 76 3800000
#23058 Katana of Shogan Tokugawa 414 20700000
#23059 Mahatma Gandhi's Spectacles 62 3100000
#23067 Red Barron's Remains 96 4800000
#23076 Silver Claws Of Maharana 74 3700000
#23077 Stallon's Lost Diary 76 3800000
#23078 The Toothpick of Gibralter 45 7000000
#23091 The Pharaoh's Sceptre 124 6200000
See the next 10 items? (Y/N) : N
___________________________[Enter To Continue]____________________________
_____________________________I AM THE MANAGER_____________________________
TO ADD AN ITEM TO THE STORE.
1. From Supplier
2. From Manager.
Your Choice (1-2) : 2
How many items to add? : 2
Item To Add (1/2)
Enter the Item No of new Item : #23001
Enter the Name of the Item : Boomerang of Alura
Enter the Age of the Item : 89
Enter the Item's Price : 6900000
Enter the Item's History : Weapon used by Alura for hunt and battle
Item To Add (2/2)
Enter the Item No of new Item : #23004
Enter the Name of the Item : Book of Odis
Enter the Age of the Item : 550
Enter the Item's Price : 8000000
Enter the Item's History : The book of spells according to Norse
Mythology
Would you like to see THE LIST? (Y/N) : Y
58. 7: [12]
SAMPLE INPUT & OUTPUT
_________________________________THE LIST_________________________________
Item No | Name of Item | Age| Cost|
#23001 Boomerang of Alura 89 6900000
#23004 Book of Odis 550 8000000
#23022 Compass of Peter Tsar The Terrible 140 7000000
#23023 Gustave's Blueprints 120 6000000
#23032 Hitler's Globe 76 3800000
#23058 Katana of Shogan Tokugawa 414 20700000
#23059 Mahatma Gandhi's Spectacles 62 3100000
#23067 Red Barron's Remains 96 4800000
#23076 Silver Claws Of Maharana 74 3700000
#23077 Stallon's Lost Diary 76 3800000
See the next 10 items? (Y/N) : Y
#23078 The Toothpick of Gibralter 45 7000000
#23091 The Pharaoh's Sceptre 124 6200000
#23096 Viking's Sledgehammer 168 8400000
___________________________[Enter To Continue]____________________________
59. 7: [13]
SAMPLE INPUT & OUTPUT
_____________________________I AM THE MANAGER_____________________________
1. CHANGE THE PASSWORD | Be Safe & Secure.
2. ADD AN ITEM TO THE LIST | More items to add?
3. EDIT AN ITEM ON THE LIST | Make some Changes.
4. DELETE AN ITEM FROM THE LIST | Remove the Unwanted.
5. USE THE CUBE CASHIER | Check. Deposit. Withdraw.
0. EXIT. | Done? Log out Safely.
__________________________________________________________________________
Your Choice (0-5): 3
_____________________________I AM THE MANAGER_____________________________
Enter the Item No of the Item to Edit
#23032
Which entity do you want to edit?
1. Name
2. Age
3. Cost
4. History
Your Choice (1-4) : 1
Enter the new Name: Globe of Adolf Hitler
Any more EDITs on this item? (Y/N) : Y
Which entity do you want to edit?
1. Name
2. Age
3. Cost
4. History
Your Choice (1-4) : 2
Enter the new Age: 81
Any more EDITs on this item? (Y/N) : N
Your EDITING has been successful!
Would you like to see THE LIST? (Y/N)
Y
60. 7: [14]
SAMPLE INPUT & OUTPUT
_________________________________THE LIST_________________________________
Item No | Name of Item | Age| Cost|
#23001 Boomerang of Alura 89 6900000
#23004 Book of Odis 550 8000000
#23022 Compass of Peter Tsar The Terrible 140 7000000
#23023 Gustave's Blueprints 120 6000000
#23032 Globe of Adolf Hitler 81 3800000
#23058 Katana of Shogan Tokugawa 414 20700000
#23059 Mahatma Gandhi's Spectacles 62 3100000
#23067 Red Barron's Remains 96 4800000
#23076 Silver Claws Of Maharana 74 3700000
#23077 Stallon's Lost Diary 76 3800000
See the next 10 items? (Y/N) : N
___________________________[Enter To Continue]____________________________
_____________________________I AM THE MANAGER_____________________________
61. 7: [15]
SAMPLE INPUT & OUTPUT
1. CHANGE THE PASSWORD | Be Safe & Secure.
2. ADD AN ITEM TO THE LIST | More items to add?
3. EDIT AN ITEM ON THE LIST | Make some Changes.
4. DELETE AN ITEM FROM THE LIST | Remove the Unwanted.
5. USE THE CUBE CASHIER | Check. Deposit. Withdraw.
0. EXIT. | Done? Log out Safely.
__________________________________________________________________________
Your Choice (0-5): 4
_____________________________I AM THE MANAGER_____________________________
Enter the item number of the item you wish to delete.
#23058
The Item has been deleted.
Would you like to see THE LIST? (Y/N)
Y
_________________________________THE LIST_________________________________
Item No | Name of Item | Age| Cost|
#23001 Boomerang of Alura 89 6900000
#23004 Book of Odis 550 8000000
#23022 Compass of Peter Tsar The Terrible 140 7000000
#23023 Gustave's Blueprints 120 6000000
#23032 Globe of Adolf Hitler 81 3800000
#23059 Mahatma Gandhi's Spectacles 62 3100000
#23067 Red Barron's Remains 96 4800000
#23076 Silver Claws Of Maharana 74 3700000
#23077 Stallon's Lost Diary 76 3800000
#23078 The Toothpick of Gibralter 45 7000000
See the next 10 items? (Y/N) : Y
#23091 The Pharaoh's Sceptre 124 6200000
#23096 Viking's Sledgehammer 168 8400000
___________________________[Enter To Continue]____________________________
62. 7: [16]
SAMPLE INPUT & OUTPUT
_____________________________I AM THE MANAGER_____________________________
1. CHANGE THE PASSWORD | Be Safe & Secure.
2. ADD AN ITEM TO THE LIST | More items to add?
3. EDIT AN ITEM ON THE LIST | Make some Changes.
4. DELETE AN ITEM FROM THE LIST | Remove the Unwanted.
5. USE THE CUBE CASHIER | Check. Deposit. Withdraw.
0. EXIT. | Done? Log out Safely.
__________________________________________________________________________
Your Choice (0-5): 5
_____________________________I AM THE MANAGER_____________________________
Welcome to The Cube Cashier.
Choose Among The Options Below:
1. View Balance
2. Deposit
3. Withdraw
Your Choice (1-3) :1
The Balance in your Account: 2437783003
Exit Cube Cashier? (Y/N) :N
Choose Among The Options Below:
1. View Balance
2. Deposit
3. Withdraw
Your Choice (1-3) :3
How much money to withdraw from Account?
7783003
The Balance in your Account: 2430000000
Exit Cube Cashier? (Y/N) : Y
63. 7: [17]
SAMPLE INPUT & OUTPUT
_____________________________I AM THE MANAGER_____________________________
1. CHANGE THE PASSWORD | Be Safe & Secure.
2. ADD AN ITEM TO THE LIST | More items to add?
3. EDIT AN ITEM ON THE LIST | Make some Changes.
4. DELETE AN ITEM FROM THE LIST | Remove the Unwanted.
5. USE THE CUBE CASHIER | Check. Deposit. Withdraw.
0. EXIT. | Done? Log out Safely.
__________________________________________________________________________
Your Choice (0-5): 0
_____________________________I AM THE MANAGER_____________________________
Thank you & Goodbye Manager! You Have been logged out Safely.
___________________________[Enter To Continue]____________________________
__________________________________________________________________________
_________________________________MAIN MENU________________________________
1. THE LIST | Shows the List of items on Sale.
2. THE HISTORY | Learn more about an Item or Store
3. THE SEARCH | Can't Find what you're looking for?
4. I AM A CUSTOMER | Buy something nice for Yourself.
5. I AM A SUPPLIER | Sell us something We may like.
6. I AM THE MANAGER | A Password Protected Control Centre.
0. EXIT. | Done here? Leave the Online Store.
__________________________________________________________________________
Your Choice (0-6): 0
Thank you For Visiting & Come Again Soon!
65. 9: [1]
There are a number of possibilities to make this software better.
After learning the usage and application of graphics, I plan on further
improving the interactive nature of the software. The menu would have
clickable buttons rather than typed in choices and by introducing the
mouse pointer, selection of those options would be far more convenient.
I also intend on introducing selective functionality through user
accounts. This would provide more options for suppliers and managers.
A Supplier can make an account, send an offer and be updated on the
manager’s decision as well. This would be possible only with user
accounts where the supplier can be identified by their username. Also, if
the store is run by more than one person and each person is assigned a
specific task to play, user accounts will be able to divide the manager
options accordingly.
As of now, its functions are restricted to those of an Antique Store. I
plan to generalize it so that it can be used in any type of store allowing
the manager to choose which fields and options are most suitable for his
store.
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.
Unfortunately, this software is mainly just recording changes in the
store with transactions. With much further study, I can implement it in
the real world. Rather than recording the money moving from one
account to another, the software can be made to access the bank
accounts and allow the transaction of actual money.
SCOPE FOR FUTURE EXPANSION