Class 10 Board Project 2
Class 10 Board Project 2
DAS
CLASS : X SEC : C ROLL : 03
SUBJECT : COMPUTER APPLICATION
PROJECT-1
PROJECT
User Specification
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
Q Numeric Quantity of
Product
Q1 Numeric Quantity to be
added
D$ String Date
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
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
200 CLS
210 LOCATE 16, 20: INPUT “ DO YOU WANT TO STORE NEW LIST”: ANS$
230 CLS
250 CLS
300 LOCATE 10, 20; INPUT “DO YOU WANT TO ADD MORE PRODUCT;”; AN$
340 CLS
350 PRINT TAB (2); STRING$(1`2, 22), TAB(22);STRING$(10, 22), TAB(45); STRING$(7,22)
370 PRINT TAB (2); STRING$(12, 22), TAB(22); STRINGF$(10, 22), TAB(45): STEING$(7, 22)
420 LOCATE 1`7, 25; INPUT “PRESS ENTER TO CONTINUE”; X$: GOTO 10
430 CLS
500 CLOSE #1
650 CLOSE
680 GOTO 10
710 CLS
790 CLOSE
830 GOTO 10
860 CLOSE #3
960 CLS: LOCATE4, 20: PRINT “WARNING”: FOR I=1 TO 10: NEXT I
980 LOCATE 8, 10; PRINT “YOU CAN’T PURCHASE BECAUSE QUANTITY IS OUT OF STOCK”: Q=Q+1
1020 CLOSE
1180 PRINT
1190 PRINT “NAME” N$
1210 PRINT
1310 PRINT
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
1510 LPRINT
1530 LPRINT STRING$ (4, 42); SPACE$ (2); STRING$ (20, 42)
1540 LPRINT
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)
1600LET L=L+Q*P
1640 LPRINT
1730 CLOSE
1740 KILL “BILL DAT”: INPUT “PRESS ENTER TO CONTINUE” I$; GOTO 1
1750 END
NAME OF THE COMPANY (YOUR CHOICE)
**************************************************
NAME:
**************************************************
**************************************************
***********************
**************************************************
**************************************************
FOR COMPANY’S NAME