Write a java program that has a class called Inventory, define the following for the class
Attributes :
-
productName
-
Price
-
A Constructor used to set values
-
Set, Get for each attributes
-
Display message print values
Define another class named Test, in the main method use:
-
Scanner to input values
-
Create an object using constructor
-
Use set and get methods
-
Call display message method