You are on page 1of 4

PROJECT 2 (QUESTION 1) BANK ACCOUNT PROCESSING MyJAVA Bank has contracted you to design an application program that will

l process savings account data for a given month. Assume that the savings account accrues interest at a rate 12% per year and that the user must enter the current balance, amount of deposits, and amount of withdrawals. Use the Problem-Solving technique to design the solution. 1. Defining Diagram

INPUT amountOfSalesTax salesTaxRate=6%

PROCESSING amountOfSalesTax* salesTaxRate 6% =totalCostOfSalesItem

OUTPUT totalCostOfSalesItem

2. Data Dictionary

NAME salesTaxRate costOfSalesItem

DATA TYPE double double

DESCRIPTION The amount of sales tax which is 6% The amount tax rate of a sales item The total cost of a sales item which pay by the customers

amountOfSalesTax double

3. Pseudocode 1.) 2.) 3.) 4.) 5.) 6.) START Input the amountOfSalesTax and salesTaxRate Input the amountOfSalesTax and salesTaxRate Calculate the totalCostOfSalesItem Display cost END

4. Flowchart

START

Input amountOfSalesTax * salesTaxRate

Calculate totalCostOfSales

Output Display total

END

5. Hierarchy Charts Main ( )

setData ( )

Calculate ( )

getTotal ( )

6. Class Diagram

TAX amountOfSalesRate salesTaxRate costOfSalesItem

setData() calculateData() getData() 7. Desk Check 1. 2. 3. 4. 5. START Input the amountOfSalesTax and salesTaxRate Culculate the totalCostOfSalesItem Display cost END

LINE AMOUNT OF NUMBER SALES TAX 1 2 3 4 5

SALES TAX RATE

COST OF SALES ITEM

INPUT/OUTPU T

amountOfSalesTax 6% totalOfCostItem costOfSalesItem

You might also like