Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
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 company's inventory database The Product has the following properties: productlD, 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 product 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) Category which is an integer and this Also have a 2-argument constructor that takes in values for setting the productlD 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 productTax takes 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) 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 company's inventory database The Product has the following properties: productlD, 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 product 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) Category which is an integer and this Also have a 2-argument constructor that takes in values for setting the productlD 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 productTax takes 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)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started