(Enable the Accountclass comparable & cloneable)
@ Create ComparableAccount class inheritancefrom the Account class, and implemented thecomparable and cloneable interfaces. Override thecompareTo method to compare the balanceof two accounts. Print the Account ID, balance and dataCreatedinformation from the toString() method.
Implements the cloneable interface and override theclone method to perform a deep copy onthe dateCreated field.
Write a driver program to create one array contains 5ComparableAcccount objects (account #: 1001-1005,initial balance=$1000). Make deposit $500 to each account, andwithdraw $100 – $500 for each account. Clone all 5 accounts (beforesort) into a new array – use a for-loop.
Print out each object info from the
PayPal Gateway not configured
PayPal Gateway not configured