Thursday
April 24, 2014

Homework Help: computer programming

Posted by Anonymous on Monday, March 19, 2012 at 9:17pm.

Problem 7. Design an algorithm that will produce a savings account balance report from a customer savings account file. Each input savings account record contains the account number, balance forward, deposits (sum of all deposits) , withdrawals (sum of all withdrawals), and interest earned. Your program is to read the savings account file and print a detail line for each savings account record showing account number, balance forward, deposits, withdrawals, interest earned and final account balance. The final account balance is calculated as balance forward + deposits – withdrawals + interest. A heading is to appear at the top of each page and allowance is to be made for 45 detail lines per page. At the end of the report, print the total balances forward, total deposits, total withdrawals, total interest earned and total final account balances. 7C. Solution algorithm
MAINLINE
Process_savings_account_record
Perform_initial_processing
Read savings_account_record
Get final_account_balance
Set line count,total deposits, total withdrawals, total interest earned, to zero
Set
DOWHILE NOT EOF
Calculate_final_account_balance
Print detail_line
Print savings_account_report
Read savings_account_record
Get final_account_balance
ENDDO
Print 'Final account balance = ', final_account_balance
Print 'Total balances forward = ‘, total_balance_forward
Print ‘Total deposits = ‘, total_deposits
Print ‘Total withdrawals = ‘, total_withdrawals
Print ‘Total interest earned = ‘, total_interest_earned
Print ‘Total final account balances =’, total_final_account_balances
END
end of the report, print the total balances forward, total deposits, total withdrawals, total interest earned and total final account balances.

Calculate_final_account_balance
Print_detail_line
Print end_of_report



Perform_initial_processing
Set page_count, line_count to zero
Print_page_headings (line_count)
Read savings_account_records
DOWHILE more savings_account_records
IF line_count > 45 THEN
Print_page_headings (line_count)
ENDIF
MODULE
Calculate_final_account_balance
Print_detail_line (Account_num,Balance_forward, Sum_of_deposits, Sum_of_withdrawals, Final-_account_balance, line_count)
Read savings_account_record
ENDDO
END
MODULE
Print_page_headings (line_count)
add 1 to page_count
Print main heading
Print column headings
Print blank line
Set line_count to zero
END

Calculate final_account_balance =
(balance_forward+deposits-withdrawals+interest)
Print_detail_line (Account_num,Balance_forward, Sum_of_deposits, Sum_of_withdrawals, Final-_account_balance, line_count)
add 1 to line_count
Print end_of_report (Total_balances_forward, total_deposits, total_withdrawals, total_interest_earned, total_final_account_balances)
add 1 to line_count
END

Answer this Question

First Name:
School Subject:
Answer:

Related Questions

Max 2 - what is the effect of the delete operations on stack and queue. design ...
Computers - Problem-Solving 1. Develop an algorithm or write pseudocode to ...
programming - Write an algorithm that converts a decimal number to binary. Then...
programming - Write an algorithm that prints the factorial for the first 20 even...
Visual Basic (Computer Programming) - ALGORITHM EXERCISES 1. Wilma Peterson is ...
Computer - Programming - Please how do I compute an algorithm to compute the sum...
logic and design - You have been contracted by a local antique store to design ...
computer programming - Design a program that asks the user to enter a nonegative...
Programming & Algorithm - (1) How to design algorithms to implement the stack ...
programming - I need to do this but I don't know how to start! I'm so bad a this...

Search
Members