Write a java program that has a class called Inventory, define the following for the class

Attributes :

  1. productName

  2. Price

  3. A Constructor used to set values

  4. Set, Get for each attributes

  5. Display message print values

Define another class named Test, in the main method use:

  1. Scanner to input values

  2. Create an object using constructor

  3. Use set and get methods

  4. Call display message method

You mention you have a question? I see you’ve posted your homework assignment, but what is your question about it?

We won’t just do your assignments for you. Please post the code you have so far along with where you’re stuck, and we’ll help you to learn.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.