1234567891011121314151617181920212223242526 |
- import java.util.ArrayList;
-
- public class MainApplication {
-
- public static void main(String[] args) {
- Product beets = new Product("Beets", 21, 145);
- Product asparagus = new Product("Asparagus", 12, 15);
- Product tomato = new Product("Tomato", 17, 14);
- Product leeks = new Product("Leeks", 34, 745);
- Product thyme = new Product("Thyme", 11, 276);
-
- Inventory myInventory = new Inventory();
- myInventory.setInventory(beets);
- myInventory.setInventory(asparagus);
- myInventory.setInventory(tomato);
- myInventory.setInventory(leeks);
- myInventory.setInventory(thyme);
-
- myInventory.printInventory();
-
- System.out.println("Total value of my inventory is: " +
- myInventory.getInventoryValue());
- }
-
- }
|