REM REM Date REM Instructor Name REM Assignment Chapter 1 Number 8 Page 30 REM REM Statement of problem : REM Analysis IPO. REM REM Data Requirements REM REM Constants REM REM Inputs REM REM Outputs blank sales receipt REM REM Variables REM REM Formulas REM REM Design REM REM Algorithm REM REM 1. REM 2. REM 3. REM 4. Etc. REM REM Implementation - here you begin to code. CLS AB = 0 Hits = 0 PlayerName$ = " " playerNumber$ = " " teamname$ = " " HR = 0 BatAvg = 0 teamab = 0 teamhits = 0 teamavg = 0 CLS MenuOption = 0 DO WHILE MenuOption <> 7 CLS PRINT PRINT PRINT " M E N U" PRINT "----------------" PRINT "1. Input Team Statistics " PRINT "2. Display Team Statistical Report" PRINT "3. OPTION 3" PRINT "4. OPTION 4" PRINT "5. OPTION 5" PRINT "6. OPTION 6" PRINT "7. EXIT PROGRAM" PRINT INPUT "YOUR CHOICE =>"; MenuOption SELECT CASE MenuOption CASE IS = 1 teamname$ = " " OPEN "c:\temp\team.txt" FOR APPEND AS #1 DO WHILE teamname$ <> "QUIT" CLS INPUT "Enter the team name:"; teamname$ PlayerName$ = " " DO WHILE PlayerName$ <> "QUIT" CLS INPUT "Enter the players name:"; PlayerName$ INPUT "Enter the players number"; playerNumber$ INPUT "Enter the players at bats"; AB INPUT "Enter the players hits"; Hits INPUT "Enter the players home runs:"; HR WRITE #1, teamname$, PlayerName$, playerNumber$, AB, Hits, HR INPUT "Enter Quit to enter another team, else touch anykey to enter another player"; PlayerName$ PlayerName$ = UCASE$(PlayerName$) LOOP CLS INPUT "Enter quit to return to main menu, else touch anykey to enter another team"; teamname$ teamname$ = UCASE$(teamname$) LOOP CLOSE #1 PRINT "option 1" CASE IS = 2 OPEN "c:\temp\team.txt" FOR INPUT AS #1 CLS INPUT "Enter the team name that you want to show stats for"; teamname1$ CLS PRINT TAB(30); "Team Statistics" PRINT "Team Name"; TAB(20); "Player Name"; TAB(40); "Number"; TAB(48); "At Bat"; TAB(55); "Hits"; TAB(60); "Home Runs"; TAB(70); "Bat Average" DO WHILE NOT EOF(1) INPUT #1, teamname$, PlayerName$, playerNumber$, AB, Hits, HR IF teamname1$ = teamname$ THEN BatAvg = Hits / AB PRINT teamname$; TAB(20); PlayerName$; TAB(40); playerNumber$; TAB(48); AB; TAB(55); Hits; TAB(60); HR; PRINT USING ".###"; TAB(70); BatAvg ELSE END IF LOOP INPUT "touch any key to continue"; anykey$ CASE IS = 3 PRINT PRINT "You selected option 3." CASE IS = 4 PRINT PRINT "You selected option 4." CASE IS = 5 PRINT PRINT "you have selected option 5" CASE IS = 6 PRINT PRINT "You have selected option 6" CASE IS = 7 PRINT PRINT "Thank you for using this program." CASE ELSE PRINT PRINT "Invalid Menu Option" END SELECT LOOP DATA .06 END REM Input Section REM Processing Section REM Output Section