// LANDSCAPE GARDENING QUOTE ITEM // Frans Coenen // University of Liverpool // 18 April 2013 public class QuoteItem { // ------------------- FIELDS ------------------------ /** Name of quote item (e.g. "lawn", "patio", "water feature", etc.). */ protected String itemName = null; /** The unit material cost for this landscape gardening item. */ protected double unitMaterialCost = 0.0; /** The unit installation time for this landscape gardening item. */ protected double unitInstallationTime = 0.0; /** The total material cost for this landscape gardening item. */ protected double totalMaterialCost = 0.0; /** The total installation time for this landscape gardening item. */ protected double totalInstallationTime = 0.0; // ---------------- CONSTRUCTORS --------------------- /** Three argument constructor. @param nm the name for this landscape gardening item. @param ct the unit material cost for this landscape gardening item. @param tm the total labour time to install this landscape gardening item. */ public QuoteItem(String nm, double ct, double tm) { itemName = nm; unitMaterialCost = ct; unitInstallationTime = tm; } // ---------------- OUTPUT METHODS --------------------- /** To string method. */ public String toString() { String s = itemName + ": Unit material cost = £" + unitMaterialCost + ", Unit installation time = " + unitInstallationTime + " (minutes)\n"; return(s); } }