package ca.ualberta.cs.oneclick_cookbook;


public class Ingredient {
	private int quantity;
	private String measurement;
	private String name;
	
	public Ingredient (String name, int quantity, String measurement) {
		this.name = name;
		this.quantity = quantity;
		this.measurement = measurement;
	}
	
	public void modifyQuantity (int quantity, String measurement) {
		this.quantity = quantity;
		this.measurement = measurement;
	}
	
	public String getName() {
		return name;
	}
	
	public void setName(String newName){
		this.name = newName;
	}

	public int getQuantity() {
		return quantity;
	}

    public void setQuantity(int quantity) {
	    this.quantity = quantity;
    }

	public String getMeasurement() {
		return measurement;
	}

    public void setMeasurement(String measurement) {
        this.measurement = measurement;
    }
	
	// Converts the ingredient to a nicely formatted string
	public String toString() {
		String ingredient = "" + quantity + " " + measurement + " of " + name + "";
		return ingredient;
	}

    public void toLower() {
        this.name = name.toLowerCase();
        this.measurement = measurement.toLowerCase();
    }

    // Checks to make sure the info is valid. Uses constants in this file
    public int isValidInfo() {
        if (name == null || measurement == null) {
            return Constants.NULL_VALUE;
        }
        else if (name.length() == 0 || quantity == 0 || measurement.length() == 0) {
            return Constants.ZERO_VALUE;
        }

        return Constants.GOOD;
    } 

}

@@ -1,8 +1,112 @@
+/**%0A * @author%09Chris Serafin, Peter Maidens, Ken %22Mike%22 Armstrong, Kimberly Kramer%0A * @version%091.0%0A */%0A%0A
 package 
@@ -243,16 +243,183 @@
 name;%0A%09%0A
+%09/**%0A%09 * Constructor%0A%09 * @param name Name of the ingredient%0A%09 * @param quantity Amount of ingredient%0A%09 * @param measurement The type of measurement that was used%0A%09 */%0A
 %09public 
@@ -1107,12 +1107,15 @@
  %7D%0A%09
-%0A%09//
+/**%0A%09 *
  Con
@@ -1164,16 +1164,21 @@
  string%0A
+%09 */%0A
 %09public 
@@ -1291,33 +1291,96 @@
  ingredient;%0A%09%7D%0A
+%09%0A%09/**%0A%09 * Converts the name and measurements to lowercase%0A%09 */
 %0A
-
     public void 
@@ -1497,17 +1497,25 @@
 %7D%0A%0A    /
-/
+**%0A     *
  Checks 
@@ -1574,16 +1574,98 @@
 is file%0A
+     * @return Constants.GOOD Returns this only if it has valid variables%0A     */%0A
     publ

Update Ingredient.java