0% found this document useful (0 votes)
18 views18 pages

Class 10 Board Project 2

Uploaded by

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

Class 10 Board Project 2

Uploaded by

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

NAME : KETAN KR.

DAS
CLASS : X SEC : C ROLL : 03
SUBJECT : COMPUTER APPLICATION

PROJECT-1

PROJECT
User Specification

As the name says this program is very useful for generating


the cash memo of a garment store.

The user basically needs an option to create product list so


that the stock can be maintained.

The user should be able to input product list. He should then


be asked for viewing product list, adding product, deleting
product, generating bill and to exit. The program should
calculate the grand total by the addition of all amount
obtained through rate and quantity of products. The cash
memo must be printed out on the printer in a neat format.
Program Specification
The computerized bill generation is a very fast, easy to
operate, written in a basic language. Its main features are
very easy data entry, quick calculation and fast output.

The program basically has six option, to create product list,


add product, view product list, delete product, bill generate
and to exit. It is written in the format of a typical garment
store’s requirements.

The program ask the user for the name of buyer, data,
product name, quantity and print the name and address of
garment store. It will calculate the grand total of the
products purchased and prints along with the quantity and
rate of each product.
Lastly, it will print the data and signature.
Variable Name Variable Type Purpose

CH Numeric Choice Number

ANS$ String To Continue

P$ String Name of Product

Q Numeric Quantity of
Product

P Numeric Price of each unit

AN$ String To Continue

X$ String Return key to


Continue

P1$ String New Product to be


added

Q1 Numeric Quantity to be
added

N$ String Name of the Buyer

D$ String Date

L Numeric Grand Total

I$ String Return key to


continue

ANS$ String To Get the Hard


Copy

of the Bill
Step 1: Clear the screen
Step 2: print “STOCK MAINTENANCE PROGRAM”
Step 3: print “1. CREATE PRODUCT LIST”
Step 4: print “2. LIST OF PRODUCT”
Step 5: print “3. ADD PRODUCT”
Step 6: print “4. DELETE PRODUCT”
Step 7: print “5. BILL GENERATE”
Step 8: print “6. EXIT”
Step 9: print “WARNING”
Step 10: print “IF YOU SELECT CREATE LIST MAIN CHOICE”
Step 11: print “No.1 THEN YOU WILL LOSE YOUR PREVIOUS LIST”
Step 12: print “SO USE THIS OPTION CAREFULLY”
Step 13: Read the choice no. and call it as CH
Step 14: Depending on Ch goto 15, 24, 32, 57, 81, 138
Step 15: Clear the screen
Step 16: Read “do you want to store new list” and call it as ANS$
Step 17: If ANS$=”y” or ANS$=”y” then goto step 18 other wise goto step 1
Step 18: open file 1 in output mode with name “Stock.dat”
Step 19: Read product name, quantity and unit price and call them as P$, Q, R
respectively
Step 20: Store P$, Q , P in the file “stock.dat”
Step 21: Read “do you want to add more product and call it as AN$
Step 22: If AN$=”Y” or AN$”y” then goto step 19 else 23
Step 23: Close file 1 and goto 1
Step 24: Open file 1 in input mode
Step 25: Clear the screen
Step 26: Print “Product name”, “Quality”, “Price”
Step 27: Read P$,Q, P from file 1
Step 28: Print P$, Q, P
Step 29: If end of file(1) then goto step 30 else step 27
Step 30: Close file 1
Step 31: Goto Step 1
Step 32: Clear the screen
Step 33: Read name of the product and call it as P14
Step 34: Open file in input mode
Step 35: Read P$, Q, P from file 1
Step 36: If P1$=P$ then goto step 44 else step 37
Step 37: If end of file (1) then goto step 39 else step 35
Step 38: Print “It is a new product”
Step 39: Close file 1
Step 40: Open file in append mode
Step 41: Read Quantity, price and call them as Q, P respectively
Step 42: Store P$,Q, P in file 1
Step 43: Close file 1 and goto step 1
Step 44: Close file 1 and print “The product is present in the list”
Step 45: Open file 1 in input mode
Step 46: Open file 2 in output mode with name “temp.dat”
Step 47: Read P$, Q , P from stock.dat file
Step 48: If P1$=P$ the go to step 49 else step 51
Step 49: Read Quantity as Q1
Step 50: Calculate Q=Q+1
Step 51: Store P$, Q, P in the file “temp.dat”
Step 52: If end of file (1) then go to step 53 else go to step 47
Step 53: close file 1
Step 54: Delete file 1
Step 55: Change the name of “stock.dat” to “temp.dat”
Step 56: go to step 1
Step 57: Open file 1 in input mode
Step 58: Open file 2 in output mode with name “temp.dat”
Step 59: Clear the screen
Step 60: Read the name of the product to be erased and call it as P1$
Step 61: Read P$, Q, P from the file
Step 62: If P1$=P$ the go to step 64 else step 63
Step 63: Store P$, Q, P in the file 2
Step 64: Set X$=P$
Step 65: If end of file (1) then go to step 66 else go to step 61
Step 66: close file 1
Step 67: If P1$<>X$ then print “product is not present in the list”
Step 68: Delete “stock.dat” file
Step 69: Change the name of “temp.dat’ as “stock.dat”
Step 70: Go to step 10
Step 71: Clear the screen
Step 72: Print “Program for preparing bill”
Step 73: Open the file 3 in output mode with name “bill. dat ”
Step 74: Close file 3
Step 75: Open file 1 “stock.dat” in input mode
Step 76: Open file 2 “temp.dat” in output mode
Step 77: Open file 3 “bill.dat” in append mode
Step 78: Read the name of the product and call it as P1$
Step 79: Read P$, Q, P from file 1
Step 80: If P1$=P$ then go to step 81 else step 91
Step 81: Set X$ in P$
Step 82; Read Quantity as Q1
Step 83: Calculate Q=Q-Q1
Step 84: If Q<0 then goto step 85 else 90
Step 85: Clear the screen
Step 86: Print “WARNING”
Step 87: Print “MESSAGE”
Step 88: Print “You can’t purchase because quantity is out of stop
Step 89: Calculate Q=Q+1 and go to step 91
Step 90: Store P1$, Q1, P in file 3
Step 91: Store P$, Q, P in file 2
Step 92: If end of file (1) then go to step 93 else 79
Step 93: Close
Step 94: If P1$<>X$ then print “Product is not present in the list”
Step 95: Delete “stock.dat’ file
Step 96: Change the name of “temp.dat” to “stock.dat”
Step 97: Read “do you want to purchase another product “ and call it as ans$
Step 98: If ans$=”Y” or ans$=”y” then go to step 75 else 99
Step 99: read name, date, and call then as N$, D$
Step 100: Open file 3 in input mode
Step 101: Set L as 0
Step 102: Print “Cash Memo”
Step 103: Print “Address of the COMPANY”
Step 104: Print “Address of the COMPANY”
Step 105: Print “Phone number of the COMPANY”
Step 106: Print “Name of the COMPANY”
Step 107: Print “Name” with N$
Step 108: Read P$, Q, P from file 3
Step 109: Calculate L=L+Q*P
Step 110: If end of file 3 then go to step 111 else 108
Step 111: Print “Grand Total”; L
Step 112: Print “Date and Signature”
Step 113: Delete file 3
Step 114: Print “THANK YOU”
Step 115: Close
Step 116: Print “Do you want the hard copy of the bill”
Step 117: If ans$=”Y” or ans$=”y” then go to step 118 else 129
Step 118: Open the file 3 in input mode with name “bill.dat”
Step 119: Print name on the paper
Step 120: Read P$, Q, P
Step 121:Print P$, Q, P on the paper
Step 122: Print “date” on paper
Step 123: Print “signature” on paper
Step 124: Print “THANK YOU” on paper
Step 125: Close file 3
Step 126: Delete files 3
Step 127: Print “ press enter to continue” and call it as I$
Step 128: Go to step 1
Step 129: Stop
10 CLS: KEY OFF

20 LOCATE 5, 30: PRINT STRING$(28, 4)

30 LOCATE 6, 30: PRINT “STOCK MAINTENANCE PROGRAM”

40 LOCATE 7, 30: PRINT STRING$ (28, 4)

60 LOCATE 9, 30: PRINT STRING$(2, 4); “2.LIST OF PRODUCT “; STRING$(2, 4)

70 LOCATE 10, 30: PRINT STRING$ (2,4);”3 ADD PRODUCT “ STRING$(2,4)

90 LOCATE 12,30: PRINT STRING$ (2,4)”5 BILL.GENERATE “; STRINGE$(2,3)

100 LOCATE 13, 30: PRINT STRING$ (2,4); “6 EXIT “; STRING$(2,4)

110 LOCATE 14, 30: PRINT STRINGE$ (28,4)

120 LOCATE 15, 30: PRINT STRINGE$ (13,42)

130 LOCATE 17, 30: PRINT “WARNING”

140 LOCATE 19,30: PRINT STRING$(13,42)

150 LOCATE 20, 20: PRINT “IF YOU SELECT CREATE PRODUCT LIST MAIN CHOICE”

160 LOCATE 21, 20: PRINT “NO 1 THEN YOU WILL LOSE YOUR PREVIOUS LIST”

170 LOCATE 22, 20: PRINT “SO USE THIS OPTIUON CAREFULLY

180 LOCATE 23, 20: INPUT “ENTER YOUR CHOICE NO.”;CH

190 ON CH GOTO 200, 330, 430, 690, 840, 1750

200 CLS

210 LOCATE 16, 20: INPUT “ DO YOU WANT TO STORE NEW LIST”: ANS$

220 IF ANS$=”Y” OR ANS$=”y” THEN GOTO 230 ELSE GOTO 10

230 CLS

240 OPEN “O”, #1, “STOCK.DAT”

250 CLS

260 LOCATE 5, 10: INPUT “ENTER NAME OF THE PRODUCT:”; P$

270 LOCATE 6, 10: INPUT “ENTER QUANTITY:” ; Q

280 LOCATE 7, 10: INPUT “ENTER PRICE OF EACH UNIT:”; P

290 WRITE #1, P$, Q, P

300 LOCATE 10, 20; INPUT “DO YOU WANT TO ADD MORE PRODUCT;”; AN$

310 IF ANS$=”Y” OR ANS$=’y” THEN GOTO 250 ELSE GOTO 320


320 CLOSE #1: GOTO 10

330 OPEN “I”, #1, “ STOCK.DAT

340 CLS

350 PRINT TAB (2); STRING$(1`2, 22), TAB(22);STRING$(10, 22), TAB(45); STRING$(7,22)

360 PRINT TAB (2): “PRODUCT NAME”, TAB(22);” QUANTITY”,TAB(45);”PRICE”

370 PRINT TAB (2); STRING$(12, 22), TAB(22); STRINGF$(10, 22), TAB(45): STEING$(7, 22)

380 INPUT #1, P$, Q, P

390 PRINT TAB (2); P$, TAB (22);Q, TAB(45)

400 IF EOF (1) THEN GOTO 410 ELSE 380

410 CLOSE $#1

420 LOCATE 1`7, 25; INPUT “PRESS ENTER TO CONTINUE”; X$: GOTO 10

430 CLS

440 INPUT “ENTER NAME OF THE PRODUCT:” P1$

450 OPEN “I” #1, “STOCK.DAT”

460 INPUT #1, P$, Q, P

470 IF P1$=P$ THEN GOTO 560 ELSE 480

480 IF EOC (1) THEN GOTO 500 ELSE 460

490 PRINT “IT IS A NEW PRODUCT”

500 CLOSE #1

510 OPEN “A”, #1, “STOCK.DAT”

520 INPUT “ENTER QUANYTITY”, Q

530 INPUT “ENTER PRICE “, P

540 WRITE #1, P1$, Q, P

550 CLOSE #1:GOTO 10

560 CLOSE #1: PRINT “THE PRODUCT IS PRESENT IN THE LIST”

570 OPEN “I”, #1, “STOCK.DAT”

580 OPEN “O”, #2, “TEMP.DAT”

590 INPUT #1, P$, Q, P

600 IF P1$=P$ THEN GOTO 610 ELSE 630


610 INPUT “ENTER QUANTITY”; Q1

620 LET Q=Q+Q1

630 WRITE #2, P$, Q, P

640 IF EOF (1) THEN GOTO 650 ELSE 590

650 CLOSE

660 KILL “STOCK.DAT”

670 NAME “TEMP.DAT” AS “STOCK.DAT”

680 GOTO 10

690 OPEN “I”, #1, “STOCK.DAT”

700 OPEN “O”, #2, “TEMP.DAT

710 CLS

720 PRINT “ENTER PRODUCT TO BE ERASED

730 INPUT “ENTER NAME OF THE PRODUCT”,P1$

740 INPUT #1, P$, Q, P

750 IF P1$=P$ THEN GOTO 770 ELSE 760

760 WRITE #2, P$, Q, P

770 LET X$=P$

780 IF EOF(1) THEN GOTO 790 ELSE 740

790 CLOSE

800 IF P1$=X$ THEN PRINT “PRODUCT IS NOT IN THE LIST”

810 KILL “STOCK.DAT”

820 NAME “TEMP.DAT” AS “STOCK.DAT”

830 GOTO 10

840 CLS: PRINT “PROGRAM FOR PREPARING BILL”

850 OPEN “O” , #3, “BILL.DAT”

860 CLOSE #3

870 OPEN “I”, #1, “STOCK.DAT

880 OPEN “O”, #2, “TEMP.DAT

890 OPEN “A”, #3, “BILL.DAT


900 INPUT “ENTER NAME OF THE PRODUCT”, P1$

910 INPUT #1, P$, Q, P

920 IF P1$=P$ THEN GOTO 930 ELSE 1000

930 X$=P$: INPUT “ENTER QUANTITY”; Q1

940 LET Q=Q-Q1

950 IF Q<0 THEN GOTO 960 ELSE 990

960 CLS: LOCATE4, 20: PRINT “WARNING”: FOR I=1 TO 10: NEXT I

970 LOCATE 5, 10: PRINT “MESSAGE”

980 LOCATE 8, 10; PRINT “YOU CAN’T PURCHASE BECAUSE QUANTITY IS OUT OF STOCK”: Q=Q+1

990 WRITE #3, P1$, Q1, P

1000 WRITE #2, P$, Q, P

1010 IF EOF (1) THEN GOTO 1020 ELSE 910

1020 CLOSE

1030 IF P1$<> X$ THEN PRINT “PRODUCT IS NOT IN THE LIST”

1040 KILL “STOCK.DAT”

1050 NAME “TEMP.DART” AS “STOCK.DAT”

1060 INPUT “DO YOU WANT TO PURCHASE ANOTHER PRODUCT”; ANS$

1070 IF ANS$=”Y” OR ANS$”y” THEN GOTO 870 ELSE GOTO 1080

1080 INPUT “ENTER YOUR NAME”; N$

1090 INPUT “ENTER DATE” ; D$

1100 CLS: OPEN “I”, #3, “BILL.DAT”: L=0

1110 PRINT TAB (20); STRING$(11,42)

1120 PRINT TAB (20); “*CASH-MEMO*”

1130 PRINT TAB (20); “STRING$(11, 42)

1140 PRINT TAB (50); “ADDRESS OF THE COMPANY”

1150 PRINT TAB (50); ‘ADDRESS OF THE COMPANY

1160 PRINT TAB (50); “PHONE NO. OF THE COMPANY

1170 LOCATE 5 , 8; PRINT “NAME OF THE COMPANY

1180 PRINT
1190 PRINT “NAME” N$

1200 PRINT STRING$(4, 42); SPACE$(2); STRING$(20, 42)

1210 PRINT

1220 PRINT STRING$(79, 4)

1230 PRINT TAB (20); “STRING$(11, 42)

1240 PRINT TAB (50): “ADDRESS OF THE COMPANY “

1250 PRINT TAB (50); “ADDRESS OF THE COMPANY”

1260 PRINT TAB (50); “PHONE NO. OF THE COMPANY

1270 LET L= L+Q*P

1280 IF EOF (3) THEN GOTO 1290 ELSE 1250

1290 PRINT STRING$ (79, 4)

1300 PRINT: PRINT TAB (55); GRAND TOTAL: RS. ”; L

1310 PRINT

1320PRINT STRING$ (79, 4)

1330 PRINT “DATE”, D$, TAB (55); “E. & 0.E”

1340 PRINT STRING$ (79, 4)

1350 PRINT TAB (55); STRING$ (9, 42)

1360 PRINT TAB (55); “SIGNATURE”

1370 PRINT TAB (55); STRING$ (9, 42)

1380 PRINT TAB (35); “THANK YOU!”

1390 PRINT STRING$ (79, 4)

1400 CLOSE

1410 INPUT “DO YOU WANT THE HARD COPY OF THE BILL? (Y/N)”, ANS$

1420 IF ANS$= “Y” OR ANS$=”y” THEN GOTO 14330 ELSE GOTO 1750

1430 OPEN “I”, #3, “BILL.DAT”

1440 LPRINT TAB (20); STRING$ (11, 42)

1450 LPRINT TAB (20); “*CASH-MEMO*”

1460 LPRINT TAB (20); STRING$ (11, 42)

1470 LPRINT TAB (50); “NAME OF THE COMPANY”


1480 LPRINT TAB (50): “NAME OF THE COMPANY”

1490 LPRINT TAB (50): “PHONE NUMBER OF THE COMPANY”

1500 LPRINT TAB (10); “NAME OF THE COMPANY”

1510 LPRINT

1520 LPRINT “NAME;” N$

1530 LPRINT STRING$ (4, 42); SPACE$ (2); STRING$ (20, 42)

1540 LPRINT

1550 LPRINT STRING$ (79, 4)

1560 LPRINT “PRODUCT NAME”, TAB(22); “QUANTITY”, TAB(45); “RATE”, TAB(60); “AMOUNT”

1570 LPRINT STRING$(12, 4); TAB(22); STRING$(8, 4), TAB(45); STRING$(4, 4);TAB(60); STRING (6, 4)

1580 INPUT #3, P$, Q, P

1590 LPRINT P$, TAB (22); Q, TAB(45); “RS.”; P, TAB(60);”RS.” Q*P

1600LET L=L+Q*P

1610 IF EOF (3) THEN GOTO 1620 ELSE 1580

1620 LPRINT STRING$ (79, 4)

1630 LPRINT: LPRINT TAB (55): “GRAND TOTAL: RS.” L

1640 LPRINT

1650 LPRINT STRING$(79, 4)

1660 LPRINT “DATE:” D$, TAB(55), “E. &.O.E”

1670 LPRINT STRING$ (79, 4)

1680 LPRINT TAB (55); STRING$ (9, 42)

1690 LPRINT TAB (55): “SIGNATURE”

1700 LPRINT TAB (55); STRING$ (9, 42)

1710 LPRINT TAB (35);” THANK YOU!”

1720 LPRINT STRING$(79, 4)

1730 CLOSE

1740 KILL “BILL DAT”: INPUT “PRESS ENTER TO CONTINUE” I$; GOTO 1

1750 END
NAME OF THE COMPANY (YOUR CHOICE)

ADDRESS OF THE COMPANY (YOUR CHOICE)

**************************************************

NAME:

**************************************************

SL NO. PARTICULAR NO. PRICE TOTAL


1 CAPRI PANTS 6 Rs.475 Rs. 2850

2 SALWAR PIECE 3 Rs.500 Rs. 1500

3 SAREES 5 Rs.750 Rs. 3750

4 FANCY KURTIS 5 Rs.375 Rs. 1875

5 T- SHIRTS 6 Rs.400 Rs. 2400

**************************************************
***********************

GRAND TOTAL:- Rs. 12375

**************************************************

DATE: 3.11.2023 E. & O. E

**************************************************
FOR COMPANY’S NAME

{THANK YOU} *GOODS ONCE SOLD CAN’T BE RETURNED*

You might also like