Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

( JAVA )Create a class called Product that models a product information to be entered in a java application that will ultimately send that information

(JAVA)Create a class called Product that models a product information to be entered in a java application that will ultimately send that information into the companys inventory database .

The Product has the following properties: productID, productName both are Strings and productPrice and productTax that are a double. Lets ignore rest of the attributes for now.

In addition, the product has other properties such as productCategory which is an integer and this instance variable categorizes the applicant based on various types of product categories produced by the company. (5 pts)

In your class, have a default constructor with default values of your choice. (5 pts)

Also have a 2 argument constructor that takes in values for setting the productID and productName. The productCategory is set to a default code of 1, which stands for unassigned category. Set productPrice and productTax to default values. (5 pts)

Have getters and setters for all instance variables. The setter for the instance variable productTaxtakes in as argument, an integer variable that contains the percentage of state tax , which is a double type. (5 pts) The productTax value is set as follows :

  • If productCategory is equal to 3 or 4, then these are considered to be luxury goods and the productTax = state tax + 3.5. The productTax, stateTax and 3.5 are all percentage values.
  • If productCategory is equal to 1 or 2 , then these products have tax subsidies and the productTax = state tax 1.5. The productTax, stateTax and 1.5 are all percentage values.
  • For all other product categories, productTax = sales tax. (5 pts)

Copy/Paste your class code below. The code should be logically and syntactically correct.

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

Pro SQL Server Wait Statistics

Authors: Enrico Van De Laar

1st Edition

1484211391, 9781484211397

More Books

Students also viewed these Databases questions