Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(JAVA) Create a class called EnterProduct that will contain the program whereby a company employee can enter product information into the system. You begin to

(JAVA)

Create a class called EnterProduct that will contain the program whereby a company employee can enter product information into the system. You begin to develop this system by writing a small portion of EnterProduct, as a test program that will capture the product information from the user and store as objects.

Within the main method of your EnterProduct class, create an object called product1 using the default constructor, as defined in the Product class ( from the previous problem) Then ask the user/employee for values of productID, productType , productPrice , productCategory and stateTax and then use these values to set all the instance variables. (5 pts)

Now we will test the 2-arg constructor - Create another product object called product2 , this time using the 2-arg constructor defined in the Product class from the previous problem. Once again, obtain the parameter values ( , productID , productName,) of this constructor from the user.

Compare the productID values of product1 and product2, and if the productID values of product1 and peroduct2 are equal, then display to the user that the ID provided for product2 is already taken. Display the productNames of the two product, as well.

We will stop our application at this point will not go further into validation of productIDs.

Complete the EnterProduct class and copy your code below.

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

Learn To Program Databases With Visual Basic 6

Authors: John Smiley

1st Edition

1902745035, 978-1902745039

More Books

Students also viewed these Databases questions

Question

What is management growth? What are its factors

Answered: 1 week ago

Question

Why We Form Relationships Managing Relationship Dynamics?

Answered: 1 week ago