package edu.cmu.lti.bic.sbs.gson;

public class Prescription {
  private Drug drug;

  private Double dose;

  private String unit;

  // Default initializer that will ensure testing successfully using main method.
  public Prescription() {
    this(new Drug(), 0.0, "-");
  }

  public Prescription(Drug drug, double dose, String unit) {
    this.setDrug(drug);
    this.setDose(dose);
    this.setUnit(unit);
  }

  public String getUnit() {
    return unit;
  }

  public Prescription setUnit(String unit) {
    this.unit = unit;
    return this;
  }

  public Double getDose() {
    return dose;
  }

  public Prescription setDose(Double dose) {
    this.dose = dose;
    return this;
  }

  public Drug getDrug() {
    return drug;
  }

  public Prescription setDrug(Drug drug) {
    this.drug = drug;
    return this;
  }
  
  public String toString(){
    return drug.getName() + "\t\t" + dose + "\t\t" + unit;
  }
}

@@ -852,16 +852,63 @@
 ring()%7B%0A
+  %09if(dose == 0) %7B%0A  %09%09return %22- %5Ct%5Ct -%22;%0A  %09%7D%0A
     retu
@@ -942,25 +942,16 @@
 + dose +
- %22%5Ct%5Ct%22 +
  unit;%0A 

put dose and unit together