Product.java - import java.text public abstract class...

This preview shows page 1 out of 1 page.

import java.text.*;public abstract class Product {protected String productID = "?";protected int quantity = 0;protected double unitPrice = 0.0;protected double totalCost = 0.0;DecimalFormat fmt = new DecimalFormat("$0.00");DecimalFormat fmt2 = new DecimalFormat("0.00%");//Constructor of Product it is going to be overriden in other subclassespublic Product(String ID, int numOfProduct, double priceOfProduct) {productID = ID;quantity = numOfProduct;

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture