/** SAMPLE SOLUTION
 *  Diver: A SCUBA diver may be "wet", "dry", or "bent", has a lung
 *  capacity, a tank capacity, a depth, and a name.
 */
public class Diver {

  /** The depth of the diver, in meters
   */
  private int depth;

  /** Is this diver "wet", "dry", or "bent"?  If "dry" then
   *  depth is 0 and tankCapacity may be ignored.  If "bent" then
   *  tankCapacity may be ignored, and depth is recorded to
   *  aid in medical treatment.
   */
  private String status = "dry";

  /** How big (in liters) is this divers vital lung capacity?
   */
  private int lungCapacity;

  /** How big (in liters) is this diver's tank?
   */
  private int tankCapacity;


  /** Set this diver's name to n
   */
  public void setName(String n){
    name = n;
  }

  //-----------------------------------------------------------------
  // Fill in the missing pieces between the dotted lines

  /** Declare a variable for this diver's name. */
  private String name;

  /** Make this diver "wet", put them at depth d. */
  public void wet(int d) {
    depth= d;
    status= "wet";
  }

  /** Make this diver have lung capacity lc */
  public void setLungCapacity(int lc) {
    lungCapacity= lc;
  }

  /** Make this diver have tank capacity tc */
  public void setTankCapacity(int tc) {
    tankCapacity= tc;
  }

  /** Change the depth of this diver by amount a. */
  public void changeDepth(int a) {
    depth += a;
  }

  /** Make this diver "dry", and their depth 0. */
  public void dry() {
    status= "dry";
    depth= 0;
  }

  /** Make this diver "bent". */
  public void bent() {
    status = "bent";
  }

  /** Return the depth of this diver */
  public int getDepth() {
    return depth;
  }

  /** Return the tank capacity of this diver */
  public int getTankCapacity() {
    return tankCapacity;
  }

  /** Return the lung capacity of this diver */
  public int getLungCapacity() {
    return lungCapacity;
  }

  //-----------------------------------------------------------------
  // Don't change code below this line!

  /** Return a String representation of this Diver.
   *  108 Students: Do not change this method!
   */
  public String toString() {
    String result = "Diver " + name;
    result += "\nstatus: " + status;
    result += "\nlung capacity: " + lungCapacity;
    result += "\ndepth: " + depth;
    
    if (status.equals("wet")) {
      result += "\ntank capacity: " + tankCapacity;
    }
    else if (status.equals("bent")) {
      result += "\nEMERGENCY: get to a hyperbaric chamber!";
    }

    return result;
  }
}

  



