问题描述:
懂英文,学过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.
(不是麻烦您给我翻译啊.
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.
(不是麻烦您给我翻译啊.
问题解答:
我来补答展开全文阅读