import java.util.HashMap;
import java.util.Map;

public class Employee implements Comparable<Employee> {
  private int hours;

  static Map<Class, Integer> ordering = new HashMap<Class, Integer>();

  static {
    ordering.put(Employee.class, 0);
  }

  public Employee(int hours) {
    this.hours = hours;
  }

  public int getHours() {
    return hours;
  }

  public double getPay() {
    return 12.0 * getHours();
  }

  public String toString() {
    return "Employee hoi polloi";
  }

  public int compareTo(Employee o) {
    int ord = ordering.get(this.getClass()) - ordering.get(o.getClass());
    if (ord == 0) {
      return this.hashCode() - o.hashCode();
    } else {
      return ord;
    }
  }
}
