// define the Employee class
public class Employee
{
   protected String name;
   protected double salary;

   public Employee(String s, double d)
   {
      name = s;
      salary = d;
   }

   // other methods

   public String getName()    { return name;   }
   public double getSalary()  { return salary; }
   public String toString()   { return name + ", $" + salary; }

   // set a new salary
   public void setSalary(double newSalary)
   {
      salary = newSalary;
   }

   // determine if 'this' employee is higher paid than 'e'
   public boolean isHigherPaidThan(Employee e)
   {
      return this.salary > e.salary;
   }

   // self-test method
   public static void main(String[] args)
   {
      if (args.length != 2)
      {
         System.out.println("Usage: java Employee name salary");
         return;
      }
      String testName = args[0];
      double testSalary = Double.parseDouble(args[1]);
      Employee test = new Employee(testName, testSalary);
      System.out.println(test);
   }
}

