You are on page 1of 2

10/30/2015

TheAceStudent:ProgramChapter13GradingInformation

ProgramChapter13GradingInformation
ProgramChapter13GradingInformation
ProgramChapter13
GradingInformation:ThisProgramisdueonSundayatMidnight.
CommentsareREQUIREDflowchartsandpseudocodeareNOTREQUIRED.
DirectionsPoints
Thefilemustbecalled(driverprogram)
FiLiSavingsAccount.java(handlesinterestandbalancecalculations)
(FiLi=FirstInitialLastInitial)
Example:KenDeweyChapter13.java(driverprogram)
KDSavingsAccount.java
EnsureyouincludeALLfilesrequiredtomakeyourprogramcompileandrun.
Iwouldliketoseeyour.javafilesonly.
Propercodingconventionsrequiredthefirstletteroftheclassstartwithacapital
letterandthefirstletterofeachadditionalwordstartwithacapitalletter.
5%
OverallRequirements
Writeaprogramthatestablishestwosavingsaccountswithsaver1havingaccount
number10002withaninitialbalanceof$2,000,andsaver2havingaccount10003
withaninitialbalanceof$3,000.Setacommonrateofinterestat5%peryear.Atthe
endofeachmonth,updatethebalancebyaddingonemonthsinteresttothe
balance,sothatthebalancecompoundsmonthly.Printanoutputthatdisplaysthe
monthnumberandtheaccountnumberandthebalanceforeachofthetwo
accounts.Usemonth0todisplaytheinitialbalances,month1todisplaythe
balancesafterthefirstmonthsinterest,andsoon.Attheendoftheyear,displaythe
totalbalanceforbothaccountscombined,likethis:
Output:
Monthlybalancesforoneyearwith0.05annualinterest:
MonthAccount#BalanceAccount#Balance

0100022000.00100033000.00
1100022008.33100033012.50
2100022016.70100033025.05
3100022025.10100033037.66
4100022033.54100033050.31
5100022042.02100033063.02
6100022050.52100033075.79
7100022059.07100033088.60
8100022067.65100033101.47
10%
9100022076.26100033114.39
10100022084.91100033127.37
11100022093.60100033140.40
12100022102.32100033153.49
Finalbalanceofbothaccountscombined:5255.81
Usetwoclasses,aFiLiSavingsAccountclassandaYourNameChapter13asyour
Driverclass.
FiLiSavingsAccount.javaclass
IntheSavingsAccountclass,declareaclassvariablecalledannualInterestRate,
aninstanceconstantcalledACCOUNT_NUMBER,andaninstancevariablecalled
balance.Provideatwoparameterconstructortoinitializetheinstanceconstantand
data:text/htmlcharset=utf8,%3Ch3%20class%3D%22posttitle%20entrytitle%22%20itemprop%3D%22name%22%20style%3D%22margin%3A%200px

1/2

10/30/2015

TheAceStudent:ProgramChapter13GradingInformation

instancevariable,andprovideaccessorsfortheinstanceconstantandinstance
variable.ProvideanaddMonthlyInterestmethodtoupdatethebalance,byadding
(balance*annualInterestRate/12)tothecurrentbalance.
Youarealsorequiredtoprovideaclassmethodthatsetstheannualinterestrate.
40%
YourNameChapter13.javaclass
IntheYourNameChapter13Driverclass,instantiatethesaver1andsaver2objects.
Settheannualinterestrateat0.05.Printthetableheadinglines.Useaforloopto
printtheinitialaccountnumbersandbalancesandtheaccountnumbersand
balanceseachmonthafterthatmonthsinteresthasbeenadded.Afterthelast
monthsprintout,computeanddisplaythetotalofbothbalances.
40%
Yourdrivershouldgeneratethefollowingoutputs:
Output:
Monthlybalancesforoneyearwith0.05annualinterest:
MonthAccount#BalanceAccount#Balance

0100022000.00100033000.00
1100022008.33100033012.50
2100022016.70100033025.05
3100022025.10100033037.66
4100022033.54100033050.31
5100022042.02100033063.02
6100022050.52100033075.79
7100022059.07100033088.60
8100022067.65100033101.47
9100022076.26100033114.39
10100022084.91100033127.37
11100022093.60100033140.40
5%
12100022102.32100033153.49
Finalbalanceofbothaccountscombined:5255.81
UploadyourpagetotheDropbox.
NOTE:CompleteyouractivityandsubmitittotheDropboxineCollege
TotalPoints100%
ProgramChapter13GradingInformation

data:text/htmlcharset=utf8,%3Ch3%20class%3D%22posttitle%20entrytitle%22%20itemprop%3D%22name%22%20style%3D%22margin%3A%200px

2/2

You might also like