0% found this document useful (0 votes)
16 views20 pages

Rescued Document

Uploaded by

go12var
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views20 pages

Rescued Document

Uploaded by

go12var
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 20

GROCERY

MANAGEMENT
SYSTEM
- G. VARSHA
XII-D

1
TABLE OF CONTENTS

PAGE
S.NO DESCRIPTION
NO

01 INTRODUCTION 3

02 OBJECTIVES OF THE PROJECT 3

03 PROPOSED SYSTEM 4

SYSTEM DEVELOPMENT LIFE CYCLE


04 5
(SDLC)
HARDWARE AND SOFTWARE
05 6
REQUIREMENTS

06 SOURCE CODE 7

07 OUTPUT 14

08 TESTING 19

09 REFERENCES AND BIBLIOGRAPHY 20

2
➢ INTRODUCTION

The Grocery Management System maintained as a software is very useful


for grocery shops who sell variety of grocery items to its customers. This software
allows Grocery Shop owner to manage the stock of various grocery items sold in
the shop.

➢ OBJECTIVES OF THE PROJECT

The objective of this project is to let the students apply the programming
knowledge into a real- world situation/problem and exposed the students
how programming skills helps in developing a good software.

1. Write programs utilizing modern software tools.


2. Apply object-oriented programming principles effectively when
developing small to medium sized projects.
3. Write effective procedural code to solve small to medium sized
problems.
4. Students will demonstrate a breadth of knowledge in computer science,
as exemplified in the areas of systems, theory and software development.
5. Students will demonstrate ability to conduct a research or applied
Computer Science project, requiring writing and presentation skills
which exemplify scholarly style in computer science.

3
➢ PROPOSED SYSTEM

Today one cannot afford to rely on the fallible human beings of be really
wants to stand against today’s merciless competition where not to wise saying
“to err is human” no longer valid, it’s outdated to rationalize your mistake. So,
to keep pace with time, to bring about the best result without malfunctioning
and greater efficiency so to replace the unending heaps of flies with a much
sophisticated hard disk of the computer.

One has to use the data management software. Software has been an
ascent in atomization various organizations. Many software products working
are now in markets, which have helped in making the organizations work
easier and efficiently. Data management initially had to maintain a lot of
ledgers and a lot of paper work has to be done but now software product on
this organization has made their work faster and easier. Now only this
software has to be loaded on the computer and work can be done.

This prevents a lot of time and money. The work becomes fully
automated and any information regarding the organization can be obtained by
clicking the button. Moreover, now it’s an age of computers of and automating
such an organization gives the better look.

4
➢ SYSTEM DEVELOPMENT LIFE CYCLE (SDLC)

The systems development life cycle is a project management technique


that divides complex projects into smaller, more easily managed segments or
phases. Segmenting projects allows managers to verify the successful
completion of project phases before allocating resources to subsequent phases.
Software development projects typically include initiation, planning,
design, development, testing, implementation, and maintenance phases.
However, the phases may be divided differently depending on the
organization involved.
For example, initial project activities might be designated as request,
requirements-definition, and planning phases, or initiation, concept-
development, and planning phases. End users of the system under
development should be involved in reviewing the output of each phase to
ensure the system is being built to deliver the needed functionality.

5
➢ HARDWARE AND SOFTWARE REQUIREMENTS

I.OPERATING SYSTEM : WINDOWS 10 AND ABOVE

II. PROCESSOR : PENTIUM(ANY) OR AMD

ATHALON(3800+- 4200+ DUALCORE)

III. MOTHERBOARD : 1.845 OR 915,995 FOR PENTIUM 0R MSI

K9MM-V VIAK8M800+8237R PLUS

CHIPSET FOR AMD ATHALON

IV. RAM : 512MB+

V. Hard disk : SATA 40 GB OR ABOVE

VI. CD/DVD r/w multi drive combo: (If back up required)

VII. FLOPPY DRIVE 1.44 MB : (If Backup required)

VIII. MONITOR 14.1 or 15 -17 inch

IX. Key board and mouse

X. Printer : (if print is required – [Hard copy])

SOFTWARE REQUIREMENTS:

I. Windows OS
II. Python

6
SOURCE CODE

import pickle
import datetime

def storeitem():
f = open("grocery.dat","ab")
g = {}
icode=int(input("Enter itemcode "))
iname=input("Enter itemname ")
unit=input("Enter unit ")
ucost=int(input("Enter unit cost "))
qty=int(input("Enter quantity "))
brand=input("Enter brand name ")
g["itemcode"] = icode
g["itemname"] = iname
g["unit"] = unit
g["unitcost"] = ucost
g["qty"] = qty
g["brand"] = brand
pickle.dump(g, f)
print("New Grocery item details saved...")

def displayall():
f = open("grocery.dat","rb")
g = {}

7
print("%-10s%-20s%-10s%-10s%-10s%-15s%-
10s"% ("Itemcode","Itemname","Unit","Unitcost","Quantity","Brand")) print("------
-----------------------------------------------------------------------------------")
try:
while True:
g = pickle.load(f)
print("%-10d%-20s%-10s%-10d%-10d%-15s%-
10s"%(g["itemcode"],g["itemname"],g["unit"],g["unitcost"],g["qty"],g["brand"],g
["category"]))
print("------------------------------------------------------------------------------------")
except EOFError:
f.close()

def edititem():
f = open("grocery3.dat","rb+")
g = {}
sitemcode = int(input("Enter search itemcode "))
flag=0
try:
while True:
cpos = f.tell()#the position of the record
g = pickle.load(f)
if sitemcode == g["itemcode"]:
print("Itemcode exist..")
flag=1
break
except EOFError:
print("In except")
f.close()

8
if flag==0:
print("Itemcode does not exist...")
else:
ans=input("Do you want to change quantity / cost of item y/n ?")
if ans=='y':
x = input("Do you want to change quantity y/n? ")
if x=='y':
newqty = int(input("Enter new quantity "))
g["qty"] = g["qty"] + newqty
a = input("Do you want to change cost y/n? ")
if a=='y':
newcost = int(input("Enter new cost "))
g["unitcost"] = newcost
f.seek(cpos)
pickle.dump(g,f)
f.close()

def reports():
f=open("gsale.dat","rb")
g={}
cost=0
print('===========================')
print('daily grocessary reports:')
print('===========================')
print("%-10s%-20s%-10s%-10s"%("itemcode","itemname","qty","cost"))
try:
while True:
g=pickle.load(f)

9
print("%-10d%-20s%-10d%-
10s"%(g["itemcode"],g["itemname"],g["qty"],g["cost"]))
print('---------------------------------------------------------------------------------------
-')
except EOFError:
f.close()

def orderentry():
x=datetime.datetime.now()
sdate=str(x.day)+"/"+str(x.month)+"/"+str(x.year)
cmobile=input("Enter mobile number ")
ans='y'
myorder=[]
while ans=='y':
itemcode=int(input("Enter itemcode "))
qty=int(input("Enter sale quantity "))
f=open("grocery3.dat","rb")
g={}
cost=0
try:
while True:
g=pickle.load(f)
if g["itemcode"]==itemcode:
iname=g["itemname"]
cost=g["unitcost"]
except EOFError:
f.close()
o=[itemcode, iname, qty, cost]
myorder.append(o)

10
#print(myorder)
ans=input("Add another item y/n? ")
print("%60s"%"********************************")
print("%45s"%"Bill")
print("%60s"%"********************************")
print("%-10s%-20s%-10s%-20s%-20s"%("Itemcode","Itemname","Qty
sold","Unitcost","Amount"))
print("--------------------------------------------------------------------------------")
total=0
for x in myorder:
print("%-10d%-20s%-10d%-20d%-20d"%(x[0],x[1],x[2],x[3],x[2]*x[3]))
total = total + x[2] * x[3]
print("---------------------------------------------------------------------------------")
print("%15s%49d"%("Total amount ",total))
print("---------------------------------------------------------------------------------")
#updating stock
for x in myorder:
f=open("grocery3.dat","rb+")
try:
while True:
cpos = f.tell()
g=pickle.load(f)
if g["itemcode"]==x[0]:
g["qty"] = g["qty"] - x[2]
break
except EOFError:
f.close()
f.seek(cpos)
pickle.dump(g,f)

11
f.close()
#storing sales data
f1=open("gsale.dat","ab")
c={}
for x in myorder:
c["mobile"]= cmobile
c["sdate"]= sdate
c["itemcode"]=x[0]
c["itemname"]=x[1]
c["qty"]=x[2]
c["cost"]=x[3]
pickle.dump(c,f1)
f1.close()

while True:
print("%60s"%"********************************")
print("%57s"%"Grocery Shop Point of Sale")
print("%60s"%"********************************")
print("1.Manage Grocery Items ")
print("2.Sell Grocery Items ")
print("3.Display sales Report ")
print("4.Exit")
choice = int(input("Enter your choice 1/2/3/4 ? "))
if choice==1:
print("%60s"%"********************************")
print("%57s"%"Manage Grocery Items")
print("%60s"%"********************************")
while True:

12
print("1.Store new grocery item ")
print("2.Display all grocery items ")
print("3.Edit grocery item ")
print("4.Exit")
ch = int(input("Enter your choice 1/2/3/4 "))
if ch==1:
storeitem()
elif ch==2:
displayall()
elif ch==3:
edititem()
elif ch==4:
break
elif choice==2:
orderentry()
elif choice==3:
reports()
elif choice==4:
break

13
OUTPUT

MAIN SCREEN

MANAGE GROCERY ITEMS

14
STORE NEW GROCERY ITEM

DISPLAY ALL GROCERY ITEMS

15
EDIT GROCERY ITEM

EXIT

16
SELL GROCERY ITEMS

17
DISPLAY SALES REPORT

FINAL EXIT

18
TESTING

Software Testing is an empirical investigation conducted to


provide stakeholders with information about the quality of the
product or service under test [1], with respect to the context in which
it is intended to operate. Software Testing also provides an objective,
independent view of the software to allow the business to appreciate
and understand the risks at implementation of the software. Test
techniques include, but are not limited to, the process of executing a
program or application with the intent of finding software bugs.
It can also be stated as the process of validating and verifying
that a software program/application/product meets the business
and technical requirements that guided its design and development,
so that it works as expected and can be implemented with the same
characteristics. Software Testing, depending on the testing method
employed, can be implemented at any time in the development
process, however the most test effort is employed after the
requirements have been defined and coding process has been
completed.

19
REFERENCES & BIBLIOGRAPHY

1. COMPUTER SCIENCE - Class XI& XII


By: Sumita Arora

2. A Project Report on School Management System

3. Website: https://www.w3resource.com
a. python.org
b. Code Academy
c. tutorialsPoint.com
d. PythonChallenge.com
e. Google’s Python Class
f. LearnPython.org
g. GreeksforGreeks

20

You might also like