Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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 productlD, 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 (, productlD, productName,) of this constructor from the user. Compare the productlD values of product1 and product2, and if the productlD 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 productlDs Complete the EnterProduct class and copy your code below. As a backup, also submit your files 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 productlD, 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 (, productlD, productName,) of this constructor from the user. Compare the productlD values of product1 and product2, and if the productlD 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 productlDs Complete the EnterProduct class and copy your code below. As a backup, also submit your files

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

More Books

Students also viewed these Databases questions