Open Ended Activity Report On: Grocery Store Billing System
Open Ended Activity Report On: Grocery Store Billing System
KLE Society's
KLE Technological University
Submitted by
Name Roll no SRN
Abdul Azeez 107 01FE19BCS009
Sairajath R. N 116 01FE19BCS020
Yashasvi A R 114 01FE19BCS017
Anu B Herakal 133 01FE19BCS038
Team Number: 01
Faculty In-charge:
1. Introduction
1.1 Overview of the Problem Statement
2. Design
3.2 Firing and reloading a gun: void fireGun(Gun *g), void reload(Gun *g)
4 Implementation
4.1 Results
1. Introduction
The Grocery store billing system consists of different divisions: Customers, items, employees. Class
item inherites from class food, class toiletries, class home essentials. Class food inherites from class
farm fresh, class preserved, class poultry. Class toiletries inherites from class imported and class
made_in_india. A class date has a “has” a relation with class food and class toiletries, class date
provides the attributes “dom(date of manufacture), doe(date of expiry)”. Class normal
1. Class Item
All the items present in the store are listed under this class. The products are classified in as
Food(GST 18%) , toileteries(GST 22%) and home essentials(GST 30%).
Food is classified into three categories. Farm fresh, preserved and poultry.
Farm fresh contains food items such as fruits and vegetables i.e anything which is to be
consumed fresh.(tax applied 0%)
Preserved food contains all foods that are packed and contain some form of preservatives
Such as chips, soft drinks, packed milk etc.(tax applied 8%)
Poultry contains food items like chicken meat and eggs. (tax applies 5%)
consumer products used in personal hygiene and for beautification are categorised under
Toiletries certain items under toiletries are either imported(tax applicable 26%) or made in
India(tax free).
Items that provide comfort and safety are classified under home essentials such as bed
sheets,blankets ,home hygiene etc.
2. Class Customer
Customers are classified based on their membership status
Customer that have premium membership can avail 27% discount on their total bill
Customers that have VIP membership can avail 19% discount on their total bill
Non member customers don’t get any discount
3. Class Employee
The people employed at the grocery store are categorised as store manager,cashier
and support staff
The store manager is paid 15000 rupees monthly..
The cashier is paid 10000 rupees monthly.
The support staff are paid 5000 rupees monthly.
There might be several cashiers working in shifts
2. Design
i. Class Diagram
item
This is the main class which is used to display the store name
It has 3 sub classes: Item,Employee, Customer.
The classes like employee,customer and item aggregate from it.
2. Item
It is a class which has 2 objects which are used to display name and code of the item later.
It further inherits form Class food, toiletries and home essentials
3. Customer
This class has 4 objects which are used to display customer details
This class is further in a has-a relation with Class Premium,Class VIP,Class normal.
.
4. Employee
This class has objects name and salary which are further used in functions getemp( ) and dispay( )
This class further in a has-a relation with Class store manager,Class cashier,Class support staff.
5.Class Food.
This is a class which has 4 objects which are further used in functions getfood( ) and
calgst( )
The functions used in the class are made public
This class further is in a has-a relation with Class date where class date provides DOM and DOE. This
class inherits from Class Farm Fresh,Class Preserved and Class Poultry.
The above classes are used to classify and create objects of food type using
666666666669999999999factory design pattern.66666666669999999999 \
The food items classified under classes Farm Fresh,Preserved(singleton class) and
Poultry(singleton class) have extra taxes respectively . Each of the class has 2 functions to
calculate the tax and display the final price(Farm Frsh has only one function to display the price).
7. Toiletries
The class toiletries has 5 objects and 2 functions getoil( ) and calgst( )
The functions used in the class are made public
This class inherits from Class Imported and Class Made_in_India.
The class imported is a singleton class which has only one object and two functions
caltax( ) and displayprice( )
The class made_in_India has no object and only one function i.e displayprice( )
After the authentication the read and display functions are called to read an display the already
stored data from the text files.
There is a switch menu for different options like creating Person, Artillery, Vehicles and Bases.
Also options like recruiting MilitaryPersonnel and simulating a war are provided.
According to the user input we will create a Vehicle and an Artillery using factory design pattern.
Once they get created we ask user which military area they want to keep them in. After creating a
person user can enroll him for recruitment drive . Using Army, Navy and AirForce objects any of
the functions of ArmedForces can be called. Any exceptions are handled through the instantiation
of the object of ErrorException class.
Factory design pattern and singleton pattern are used for the above application.
• Factory method pattern(creational pattern):
1. Authentication
The user is required to enter the correct password to be able to use the system
THE SYSTEM WILL RESPOND AS FOLLOWS:-
2. The customer details are displayed by reading it directly from .txt file
Expected output:-
SIMILARLY THE OTHER READ FUNCTIONS ARE USED TO READ FROM THE
.TXT FILES AND THE DISPLAY FUNCTIONS ARE USED TO DISLPAY MANAGER
DETAILS, CASHIER DETAILS, SUPPORT STAFF DETAILS, CUSTOMERS DETAILS
WITH PREMIUM MEMBERSHIP, VIP AND NORMAL MEMBERSHIP. ITEM DETAILS
WHICH ARE FOOD,TOILETTRIES AND HOME ESSENTIALS.
The recruitment process involves giving person details, analyzing the details and
checking the eligibility criteria, giving the induction test and finally the induction of
that person in a particular force.
Then the person is asked for the force they want to join, and their eligibility is checked:
Input:
1
Enter person details
Full Name: Ankit
Age: 18
Blood group: B+ve
Height: 1.88
1. Army
2. AirForce
3. Navy
2
Enter y for yes and n for no for the following:
1. Educational qualification: Passed Intermediate with Mathematics, Physics and
English with minimum 50% marks in aggregate and 50% marks in English.
y
2. Marital status:
n
3. Without glasses better eye 6/6 and worse eye 6/9 and not colour blind and not
suffering from night blindness:
y
4. Good mental and physical health free from any disease/disability. y
5. Permanent body tattoos other than on inner face of the fore arms n
Expected output:
Actual output:
Input:
1
Enter person details
Full Name: Rohan
Age: 21
Blood group: B-ve
Height: 1.23
Expected output:
Actual Output:
Then the person gives the screening test and after passing the test, he gets inducted.
Service Number and Rank are assigned to that person:
Input:
c
2. Capital of India was transferred from Calcutta to Delhi in the year: a.
1901
b. 1911
c. 1921
d. 1922
b
3. The world's longest river is:
a. Brahmaputra
b. Amazon
c. Nile
d. Mississipi
c
4. Which of the following is not a union territory ?
a. Laddakh
b. Sikkim
c. Lakshadweep
d. Puducherry
b
5. Which one of the following does not remain to be a planet now ?
a. Neptune
b. Uranus
c. Pluto
d. Venus
c
Enter the details like service number,rank,enrollment date and service:
788546
Aircraftsmen
25/Apr/2020
AirForce
Expected Output:
Actual Output:
Input:
School of Computer Science and Engineering 4A21 Page 21
Armed Forces
a
2. Capital of India was transferred from Calcutta to Delhi in the year:
a. 1901
b. 1911
c. 1921
d. 1922
d
3. The world's longest river is:
a. Brahmaputra
b. Amazon
c. Nile
d. Mississipi
c
4. Which of the following is not a union territory ?
a. Laddakh
b. Sikkim
c. Lakshadweep
d. Puducherry
c
5. Which one of the following does not remain to be a planet now ?
a. Neptune
b. Uranus
c. Pluto
d. Venus
b
Expected Output:
Actual Output:
2. Firing and reloading a gun: void fireGun(Gun *g), void reload(Gun *g)
A person is assigned a gun to participate in war activities. He can fire it in single mode
or burst mode. The gun can be reloaded once it has been fired.
Input:
Select an option
1. Fire a gun
2. Throw a grenade
3. Fly an aircraft
4. Submerge a submarine
5. Deploy a tank
6. Deploy a Warship
1
Enter gun name
M416
Enter the fullname to search
Ankit
Select an option
1. Fire single
2. Fire in Burst mode(3 bullets)
3. Reload
4. Exit
1
Select an option
1. Fire single
2. Fire in Burst mode(3 bullets)
3. Reload
4. Exit
Expected Output:
Ankit has fired the gun M416 and now the count of bullets in it is 39
Ankit has fired the gun M416 and now the count of bullets in it is 38
Ankit has fired the gun M416 and now the count of bullets in it is 37 Ankit
has fired the gun M416 and now the count of bullets in it is 36
Actual Output:
Input:
Select an option
1. Fire single
2. Fire in Burst mode(3 bullets)
3. Reload
4. Exit
3
Expected Output:
The Gun is reloaded. The number of bullets are:41
Actual Output:
Input:
1
Enter gun name
AK51
Expected output:
Actual Output:
Input:
1
Enter gun name
M416
Enter the fullname to search
Ash
Expected Output:
10:Military personnel not found
Actual output:
Input:
Select an option
1. Fire single
2. Fire in Burst mode(3 bullets)
3. Reload
4. Exit
1
Select an option
1. Fire single
2. Fire in Burst mode(3 bullets)
3. Reload
4. Exit
1
Expected Output:
Ankit has fired the gun M416 and now the count of bullets in it is 0
Actual Output:
A person is assigned to a Fighter Jet. The flying of a fighter jet can be simulated using
this method:
Input:
Select an option
1. Fire a gun
2. Throw a grenade
3. Fly an aircraft
4. Submerge a submarine
5. Deploy a tank
6. Deploy a Warship 3
Enter Fighter Jet name
Tejas
Enter person name
Ankit
Ankit is flying the fighterjet Tejas
Expected Ouptut:
Input:
Select an option
1. Fire a gun
2. Throw a grenade
3. Fly an aircraft
4. Submerge a submarine
5. Deploy a tank
6. Deploy a Warship
3
Enter Fighter Jet name
Mig-21
Expected Output:
Actual Output:
Input:
Expected Output:
Input:
Expected Output:
Actual Output:
Input:
Expected Output:
Actual Output:
4. Results
1. Main Menu
2. Create person
3. Create a Base
4. Create submarine
5. Create Warship
6. Create Tank
7. Create FighterJet
9. Create gun
12. Recruitment
13. Training
V. Fly a FighterJet: