You are on page 1of 7

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 alance! amount of deposits! and amount of withdrawals. "se the #ro lem$%olving techni&ue to design the solution. 1. Defining Diagra '(#") amount+f%ales)a/ sales)a/*ate01% 2. Da!a Di"!i#nar$ (AMamount+f%ales)a/ sales)a/*ate cost+f%ales'tem %. P&e'(#"#(e 1.5 %)A*) 2.5 'nput the amount+f%ales)a/ and sales)a/*ate 6.5 ,alculate the total,ost+f%ales'tem 7.5 3isplay cost 8.5 -(3 3A)A )4#dou le dou le dou le 3-%,*'#)'+( )he amount of sales ta/ which is 1% )he amount ta/ rate of a sales item )he total cost of a sales item which pay y the customers #*+,-%%'(. amount+f%ales)a/2 sales)a/*ate 1% 0total,ost+f%ales'tem +")#") total,ost+f%ales'tem

). *+#,"-ar!

%)A*)

'nput amount+f%ales)a/ 2 sales)a/*ate

,alculate total,ost+f%ales

+utput 3isplay total

-(3

.. /ierar"-$ C-ar!&
Main : 5

set3ata : 5

,alculate : 5

get)otal : 5

0. C+a&& Diagra )A9 amount+f%ales*ate sales)a/*ate cost+f%ales'tem set3ata:5 calculate3ata:5 get3ata:5

1. De&2 C-e"2 1. %)A*) 2. 'nput the amount+f%ales)a/ and sales)a/*ate 6. ,ulculate the total,ost+f%ales'tem 7. 3isplay cost 8. -(3 ;'(("MB-* 1 2 6 7 8 AM+"() +< %A;-% )A9 %A;-% )A9 *A),+%) +< %A;-% ')-M total+f,ost'tem cost+f%ales'tem '(#")=+")#")

amount+f%ales)a/ 1%

PROJECT 2 (QUESTION 2) STUDENT PA3RO44 MyJAVA <atty Burger is an on campus cafe speciali>e in healthy fast food <or students and staffs. Many students work part time there and the owner has hired you to design a solution to calculate the gross pay for a student working part time :less than 7? hours a week5. Assume that the student will enter his=her hourly rate of pay and num er of worked given week. "se the formula@ .ross#ay 0 AoursBorked 2 #ay*ate Make sure the report show the student name! date! hourly rate pay! num er of hour work and total gross pay. 1. Defining Diagra 'nput AoursBorked %tudent (ame 3ate #ay*ate 2. Da!a Di"!i#nar$ (ame %tudent name 3ate #ay*ate AoursBorked )otal.ross#ay 3ata )ype ,har 'nt 'nt 'nt 'nt 3escription )he first character to e added )he first num er to e added )he second num er to e added )he third num er to e )he total num er second and third added together #rocessing +utput .ross#ay 0 AoursBorked 2 %tudent (ame! 3ate! #ay*ate #ay*ate! AoursBorked! )otal.ross#ay.

%. P&e'(#"#(e 1.5 %)A*) 2.5 'nput %tudent(ame! 3ate! #ay*ate! AoursBorked! )otal.ross#ay 6.5 ,alculate .ross#ay 0 AoursBorked 2 #ay*ate 7.5 3isplay 8.5 -(3 ). *+#,"-ar! %)A* )

'nput %tudent(ame! 3ate! #ay*ate! AoursBorked! )otal.ross#ay

,alculate AoursBorked 2 #ay*ate

3isplay +uput )otal.ross#ay

-(3

.. /ierar"-$ "-ar!

Main : 5

set3ata : 5

,alculate : 5

get)otal : 5

0. C+a&& Diagra )otal.ross#ay AoursBorked #ay*ate )otal %et3ata : 5 ,alculate)otal : 5 get3ata : 5

1. De&2 C-e"2 1.5 %)A*) 2.5 'nput student name! 3ate! #ay*ate! AoursBorked! )otal.ross#ay 6.5 ,alculate .ross#ay 0 AoursBorked 2 #ay*ate 7.5 3isplay 8.5 -(3 ;ine %tudent 3ate #ay*ate AourseBorked )otal.ross#ay 'nput=ouput num er name 1 2 Ali CMA,?D *M8.?? 8 -nter AoursBorkedE 8 -nter #ayrateE *M8.?? 6 82 *M8.?? 0 *M28.??

7 8

)otal.ross#ay 0 *M28.??

You might also like