// Hunter Schafer, CSE 143 // This class represents a TA for this class public class TA implements Comparable { private String name; private int quarters; // Constructs a TA with the given name and number of quarters public TA(String name, int quarters) { this.name = name; this.quarters = quarters; } // Returns an int < 0 if this TA has less quarters than other, // 0 if the are equal, an int > 0 if this has more quarters. public int compareTo(TA other) { return this.quarters - other.quarters; } // Returns this TA's name public String getName() { return name; } // Returns the number of quarters this TA has worked public int quarters() { return quarters; } // Returns a String representation of the TA // Example: "Hunter: 11" public String toString() { return name + ": " + quarters; } }