懂英文,学过java的朋友进来帮帮忙(一道作业题)

问题描述:

懂英文,学过java的朋友进来帮帮忙(一道作业题)
Question 4
In this question you will extend the BankAccount class to include additional support for
representing the interest rate that is applied to the account.
1.Add an additional instance field for representing the interest rate that will be applied to
the savings account.The interest rate should be represented as a double.
2.Add an additional overloaded constructor for the BankAccount class that allows both the
balance and interest rate to be set when a bank account object is created.
3.A getter and setter methods for getting and setting the interest rate.
4.Add a method applyInterest() that updates the balance by adding the interest to the
current balance.For example if the balance is $500 and the interest rate is 5%,then the
balance after the interest has been applied will be 500+500*5/100= $525.
(不是麻烦您给我翻译啊.
1个回答 分类:英语 2014-10-17

问题解答:

我来补答
类似是一个操作api,教你如何操作(比如写一个类里要包含哪些字段啊,属性啊等等),还有重载,getter(),setter()方法
 
 
展开全文阅读
剩余:2000