// LANDSCAPE GARDENING TYPE 2 QUOTE // Frans Coenen // University of Liverpool // 18 April 2013 public class QuoteItemType2 extends QuoteItem { // ------------------- FIELDS ------------------------ /** The quantity of the type 2 landscape items. */ private int quantity = 0; // ---------------- CONSTRUCTORS --------------------- /** Four argument constructor. @param nm the name for this landscape gardening item. @param qu the quantity of the type 2 landscape gardening item. @param unitMC the unit material cost for the type 1 landscape gardening item. @param unitIT the unit installation time for the type 1 landscape gardening item. */ public QuoteItemType2(String name, int qu, double unitMC, double unitIT) { super(name,unitMC,unitIT); quantity = qu; } // ---------------- OUTPUT METHODS --------------------- /** To string method. */ public String toString() { String s = "Quantity of " + itemName + "(s) = " + quantity + "\nUnit cost of the " + itemName + " = £" + unitMaterialCost + " (per item)\nUnit installation time for " + itemName + " + " + unitInstallationTime + " (minutes)\n"; return(s); } }