/** A musician in a band. */
public class Musician {
  
  /** The name of the musician. */
  private String name;
  
  /** The hourly salary of the musician. */
  private double salary;
  
  /**
   * Create a new musician with name n and
   * salary s.
   */
  public Musician(String n, double s) {
    this.name = n;
    this.salary = s;
  }
  
  /**
   * Get the hourly salary for this musician.
   */
  public double getSalary() {
    return this.salary;
  }  

  /**
   * Get the name of this musician.
   */
  public String getName() {
    return this.name;
  }  
  
  /**
   * Get the String representation of this musician.
   * Note: this does NOT print/display the string.
   *       it just *returns* the string.
   */
  
  public String toString() {
    return "Name: " + this.name + ", Salary: " + this.salary; 
   
  }
  
  /** 
   * returns true if m2 is equal to this musician where
   * by equal we mean having the same name.
   */  
  public boolean isEqual(Musician m2){
    //note: string equlity is done using .equals method
    return this.name.equals(m2.name);
  }
}