Answer:

Finishing the Program

Here are two tasks from the original version of the program:


' Get the starting balance 
PRINT "What is the starting balance"
INPUT BALANCE

'Handle one transaction
' Determine transaction type  
PRINT "Type a 'D' for a deposit or a 'C' for a check"
INPUT TYPE$
'
IF TYPE$ = "D" THEN
  ' Process a deposit. 
  PRINT "What is the deposit amount"
  INPUT DEPOSIT
  LET BALANCE = BALANCE + DEPOSIT
ELSE
  ' Process a check. 
  PRINT "What is the check amount"
  INPUT CHECK
  LET BALANCE = BALANCE - CHECK
END IF
'
' Print the new balance. 
PRINT "The new balance is", BALANCE
'

Here is the program with dummy statements:

' get the starting balance
'
PRINT "Get starting balance"
LET QUIT$ = "N"
DO WHILE QUIT$ = "N" 

  ' handle one transaction
  PRINT "handle one transaction"
  PRINT "Do you want to quit? Y or N"
  READ QUIT$ 
LOOP
'
END

QUESTION 21:

Mentally replace the dummy statements in the program with the statements from each of the above tasks. The result is a complete program.