Answered step by step
Verified Expert Solution
Question
1 Approved Answer
You are welcome to add methods to any class that you may find useful. You must add comments to all your classes, using the javadoc
You are welcome to add methods to any class that you may find useful. You must add comments to all your classes, using the javadoc style commenting. You may add other classes if you consider them necessary. The first class, Product, models a basic Product object for record keeping of the product's data on a daily basis.
Product.java details: One Constructor Constructor #1. It will take all the parameters as listed: int dNum String name double price int quantity Instance variables for the Product class int idNum String name double price int quantity Methods that must be part of the Product class (you may and probably will add other methods): Method public int getID() public void setlD(int sID) public String getName) public void setName(String sName) public double getPrice() public void setPrice(double newPrice) public int getQuantitx) public void setQuantity(int newQuantitv) Updates the quantity in inventory public String toStrina() Functionality Returns the Product's ID number. Updates the Product's ID number. Returns the Product's name. Updates the Product's name. Returns the Product's price. Updates the Product's price. Returns the quantity in inventory Returns a printable version of the Product ObjectStep 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