Question
***In Java*** Given... public class Account { private String accountName; private static double INTEREST; private double iRate; private double balance; ..... 1. write a static
***In Java***
Given...
public class Account {
private String accountName; private static double INTEREST; private double iRate; private double balance; .....
1. write a static bool method (with an array object parameter) that returns true if the sum of balances for Account objects from the parameter is greater than the INTEREST. if not, return false.
2. Write a method 'calculate' with a parameter newAcc. it stars by multiplying iRate and balance to get the interest. Next increase the value of balance by the interest rounded to nearest penny.
3.Write a constructor with parameters of a double and string. and have them set to the instance iRate and accountName
4. Finally, write a main method that creates three instances of Account. 1st - Doug with iRate of .3, 2nd - Jackson with iRate of .4, 3rd - Leeroy with iRate of .6 ... set the interest to 250 and calculate interest for the three instances.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started