MainApplication.java 465B

12345678910111213141516171819202122
  1. /**
  2. * Created by leon on 1/10/18.
  3. */
  4. public class MainApplication {
  5. public static void main(String[]args){
  6. Inventory inventory = new Inventory();
  7. Product tea = new Product(1, 1.99, 10);
  8. Product coffee = new Product(9, 3.99, 5);
  9. inventory.add(tea);
  10. inventory.add(coffee);
  11. int quantity = inventory.getTotalQuantity();
  12. System.out.println("Total quantity is " + quantity);
  13. }
  14. }