Thursday

October 30, 2014

October 30, 2014

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

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

- computer programming -
**MathMate**, Tuesday, March 20, 2012 at 10:38pmIt looks like a very good start for the pseudocode.

I would give the following comments:

1. include the definition of variables at the beginning of the pseudocode, as well as the type (int, double, etc.). If necessary, give a description.

2. You have included a lot of details of reading and printing, that is good.

3. Give the exact operations you plan to do with the variables, example,

- for a deposit, add the amount to the account balance.

- for a withdrawal, verify if the withdrawal exceeds the balance. If exceeded, print a message to that effect and cancel the withdrawal.

If the amount is not exceeded, proceed with the withdrawal (i.e. deduct the withdrawal amount from the account balance).

These checks should be done BEFORE each transaction is processed.

Also, it will help reading if you make a distinction between comments

"Read savings_account_record" is a comment, and

"Get final_account_balance "

is a computer executable statement.

You can put REM before comments (as in VB) or // (as in Java).

**Answer this Question**

**Related Questions**

math - Jenna has $1500 in a savings account. She adds $30 to her account each ...

business - An account at a commercial bank designed for people who want to earn ...

pre algebra - At the beginning of the year 2000, Bob put $100 in a savings ...

Math - (a) Themba wants to deposit a sum of money into a savings account so that...

consumer math - You are debating about whether to buy a new computer for $800.00...

accounting - Visit any commercial bank in your city.Meet the staff and find out ...

Maths ,science - Bongiwe invests R12000 in a savings account at 6,5% per annum ...

Math - a person deposited $500 in a savings account that pays 5% annual interest...

math - 37. A person deposited $500 in a savings account that pays 5% annual ...

Math - A person deposited $500 in a savings account that pays 5% annual interest...