Question: Your Account class should include the following method from the Comparable interface. compare To - This method should have one parameter of StudentAccount type and
Your Account class should include the following method from the Comparable interface. compare To - This method should have one parameter of StudentAccount type and retum an integer (1, 0, or -1). The method is to test the order of two Student Account objects (the this object and the parameter) based on their account balance. If the balance of this object is higher, it returns 1; if the balances are the same, it returns 0, otherwise it returns - 1. Note that in order to have this method, your Student Account class should implement the Comparable Student Account interface
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
