Question: CMPSCI 2 2 6 1 Homework 6 Total Points - 1 0 Task: In Homework 5 , You wrote a program on the inventory management

CMPSCI 2261 Homework 6
Total Points -10
Task:
In Homework 5, You wrote a program on the inventory management system for a retail store
with 2 classes Product as the superclass and ElectronicsProduct as the subclass.
Modify the same program for exception handling. Please make sure to take all the values from the
user using scanner.
1.If the value entered from user is string or character in pricerange, it should show input mismatch
exception
(2 points)
If warrantyperiod is 0 or >5, then output meaningful error message(s) if an exception occurs.
(2 points)
3.If power consumption is 2 digits, show exception error message, please enter correct number for
power consumption.
(4 points)
4.Create a variable 'status' in ElectronicsProduct class to store whether the product is available or not.
This variable stores yes or no values from the user. If the user enters any word (example "null") other
than yes or no, show exception message.
(2 points)
Deliverables:
Attach your .java files on canvas and screenshots of all outputs.
CMPSCI 2 2 6 1 Homework 6 Total Points - 1 0

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Accounting Questions!