Answered step by step
Verified Expert Solution
Link Copied!

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.

image text in transcribed

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 Object

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Icdt 88 2nd International Conference On Database Theory Bruges Belgium August 31 September 2 1988 Proceedings Lncs 326

Authors: Marc Gyssens ,Jan Paredaens ,Dirk Van Gucht

1st Edition

3540501711, 978-3540501718

More Books

Students also viewed these Databases questions

Question

What is Accounting?

Answered: 1 week ago