Question
I have the code for my Inventory Manager class and my Product class. Based off this code, I need someone to help me write my
I have the code for my Inventory Manager class and my Product class. Based off this code, I need someone to help me write my InventoryApp Class which is a simple application which uses a menu , a Scanner object, and an InventoryManager object to let users view, add, update, and remove product data. Be sure to use a loop so that the user can perform as many menu choices as they like before they choose to quit. ALL HELP is greatly appreciated! Thanks in advance
InventoryManager.java
import java.io.IOException; import java.util.ArrayList; import java.util.List;
public class InventoryManager {
public List
}
public Product getProduct(String upc) { List
}
public void addProduct(Product p) { List
public void updateProduct(Product p) { List
public void removeProduct(String upc) { List
Product.java
import java.io.Serializable; import java.math.BigDecimal;
public class Product implements Comparable
private String upc; private String shortDetails; private String longDetails;private BigDecimal price; private int stock; public String getUpc() { return upc; } public void setUpc(String upc) { this.upc = upc; } public String getShortDetails() { return shortDetails; } public void setShortDetails(String shortDetails) { this.shortDetails = shortDetails; } public String getLongDetails() { return longDetails; } public void setLongDetails(String longDetails) { this.longDetails = longDetails; } public BigDecimal getPrice() { return price; } public void setPrice(BigDecimal price) { this.price = price; } public int getStock() { return stock; } public void setStock(int stock) { this.stock = stock; } public int compareTo(Product p) { if(this.getUpc().equals(p.getUpc())) { return 1; } return 0; }
}
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started