Question: Three classes have to do the following : - product : store info about the items, can only have the name price and product id.


StoreManager.java Product.java Inventory.java public class Product { private String name; private int id; private double price; I public void ProductItem(){ id=0; name="Name not available."; price=0.0; 1 2 public void ProductItem(int productId, String productName, int productPrice) { this.id=productId; this.name=productName; this.price=productPrice; 13 14 15 16 19 22 25 26 D epublic void setProductId(int itemid) { id=itemId;} epublic void setProductName(String itemName) { name=itemName; } epublic void setProductPrice(int itemPrice) { price=itemPrice; } public void setPrice (double itemPrice) { (itemPrice > 0.00) { price = itemPrice; } else { price = 0.00; } } public String getName() { return name;) 27 28 e 29 30 31 34 35 38 41 public double getPrice() { return price; } public int getId() { return id;) } Product.java Inventory.java Store Manager.java import java.util.ArrayList; public class Inventorysiten> { int quantity =0; 5 private ArrayList
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
