**THIS IS AN IN CLASS EXCERCISE AND WILL NOT DIRECTLY AFFECT YOUR GRADE**

* Your solutions will be evaluated by the TAs to judge your knowledge of the material so please write neatly and keep your solution organized.

Problem #1: Recall the classes LeadersBoard and Player discussed in lecture (partial implementations included below). Add the appropriate methods or fill in the method shells given to complete these classes. Note the classes are intentionally not the same as those we created in lecture. You may create additional methods, such as helper methods in a recursive solution if you find them necessary.

class Player implements Comparable, Comparator, Cloneable {
  private int score;
  private String name;

  public Object clone() {
  }
  public int compareTo(Object object) {
  }
  public int compare(Object object1, Object object2) {
  }
}
class LeadersBoard {
  protected Player players[];
  protected int nPlayers;

  public void add(Player player) {
    if (nPlayers >= players.length) {
      enlarge();
    }
    players[nPlayers] = player;
    nPlayers++;
    sortByScore();
  }

  // Enlarge by 50%
  public void enlargePlayersListSize() {
  }

  // Shrink the actual array size to fit 
  // the exact number of players stored
  public void shrinkPlayersListSize() {
  }
  public Player getPlayerAtRank(int rank) {
    return players[rank - 1];
  }
  public void sortByScore() {
    java.util.Arrays.sort(players);
  }
}

Problem #2: Create the class Arithmetic. Arithmetic will use the protected property of type double called result to represent the result of an arithmetic operation. Arithmetic will also use the protected property of type String called symbol to represent the symbolicnotation of the given arithmetic operation. Arithmetic will contain an abstract method called evaluate, which will perform the evaluation of the specific Arithmetic operation. Finally, Arithmetic will allow the user to compare arithmetic operations with respect to one another, based upon the value of result.

Problem #3: Create the class Addition, a subclass of Arithmetic. Addition will use two private properties of type double, called leftOperand and rightOperand, to represent the left and right operands on either side of plus sign operator. Implement the Comparable interface, allowing the user the ability to compare the relationships between the results of the addition operations.

Problem #4: Create the class Account. The class will contain the private properties balance type double, id type byte, and owner type Owner. The class will implement Comparable (comparisons based upon the id of the account), Comparator (comparisons based upon the balance of the account), and Cloneable. The class will contain methods modelling operations of an account, including withdraw(int amount) and deposit(int amount).

Problem #5: Create the class Owner. The class will contain the private properties name type String and address type String. The class will implement Comparable (comparisons based upon the name of the owner), Comparator (comparisons based upon the address of the owner), and Cloneable.