+1(316)4441378

+44-141-628-6690

java program

Base Class
Write an Account class containing an instance variable called balance with an accessor called getBalance and mutators called deposit and withdraw. To allow members of the Account class to be sorted, implement the java.lang.Comparableinterface to compare two accounts using balance.

Derived Classes
Create two subclasses of Account calledSavingsAccount and CheckingAccount. SavingsAccount will add an instance variable called interest to store interest percentage and a mutator method for increasing its balance by applying the interest called compound().
CheckingAccount will keep track of check numbers using an instance variable called nextCheckNumber starting with 1000. It will have a method called orderChecks that increments the current check number instance variable by 1000.
To facilitate displaying account information each of these accounts should override the toString() method from the java.lang.Object class.
Driver
All of your classes should include constructors that yield properly initialized accounts. Your driver should test your SavingsAccount and CheckingAccount classes by creating an ArrayList of Account and adding a number of SavingsAccount and CheckingAccount objects with various balances. All methods and constructors should be called at least once and your ArrayList should be passed as an argument to java.util.Collections.sort().

 

You can place an order similar to this with us. You are assured of an authentic custom paper delivered within the given deadline besides our 24/7 customer support all through.

 

Latest completed orders:

# topic title discipline academic level pages delivered
6
Writer's choice
Business
University
2
1 hour 32 min
7
Wise Approach to
Philosophy
College
2
2 hours 19 min
8
1980's and 1990
History
College
3
2 hours 20 min
9
pick the best topic
Finance
School
2
2 hours 27 min
10
finance for leisure
Finance
University
12
2 hours 36 min
[order_calculator]