Modularisation Sample Flashcards
1
Q
Bill_gas_customers
A
Bill_gas_customers Perform_initial_processing read customer record DOWHILE more records calculate_amount_owing print_customer_details read customer record ENDDO print_gas_totals END
2
Q
Perform_initial_processing
A
Perform_initial_processing print ‘CUSTOMER USAGE FIGURES’ heading set total_Customer to zero set total_amount_owing to zero END
3
Q
Print_customer_details
A
Print_customer_details
print customer_number, name, address, gas_usage, amount_owing
add 1 to total_customers
END
4
Q
Print_gas_totals
A
Print_gas_totals
print total_customers
print total_amount_owing
END
5
Q
calculate_amount_owing
A
calculate_amount_owing IF usage "less than" 60 THEN amount_owing = usage * $2.00 ELSE amount_owing = (60 * 1.75) + ((usage - 60) * $1.50) ENDIF add amount_owing to total_amount_owing END