Question: Please do not use break, continue / exit , return Please use Documentation for the methods Write All member attributes must be defined as private.
Please do not use break, continueexit return
Please use Documentation for the methods
Write All member attributes must be defined as private.
All member methods must be defined as public. Assignment: Please make sure that you submit the correct assignment Write a program to practice with the use of inheritance in Java. Create Clothing parentsuper class namelastNameInitialSHWAjava
example if the last name is Smith then the class name will be SSHWAjava where S is for Super class.
You will have the following private attributes:
Size, color, material
Create a no args constructor that will initialize the attribute please see the sample run
Create a second constructor for the size only
Create a third constructor for all the attributes
Create a getter and setter methods
Create an override toString method to display the clothing details Create a Jacket subclasschild class named lastNameinitialCHwAjava
example if the last name is Smith then the class name will be SCHWAjava where C is for child class.
The class will have the following private attributes.
Insulation String data type
Water Resistance: Boolean data type
Create a no args constructor to initialize the variable and call the super no args constructor, please see the sample run
Create a second constructor with the child class attributes plus the size
Create a third constructor with five attributes child and parent class attributes
Create a getter and setter methods
Create an override toString method to display the Jacket details
Create a class with main method namedlastNameFirstNameCITHWAjava
Create an object for the child class the no args constructor
Create a second object for the childs class with all the attributes
In the same class and outside main method create methods
First method for entering jacket information: size, insulation type and water Resistance, make a user input for the number of Jackets. The method will use a second child class constructor
The method will return an array of Jackets.
Use Try and catch in case the user enters an invalid input for the number of jackets
Use try and catch in case the use enters an invalid input for Jacket water Resistance
Create a second method to display the array of Jackets that was results for the jacket information. The method will have no return value.
Please see Sample Run below
Sample Run:
Default Jacket: Clothing SizeM ColorBlack, MaterialCotton Jacket Insulation TypeFleece, Water Resistancetrue
Custom Jacket: Clothing SizeL ColorRed, MaterialWool Jacket Insulation
TypeDown, Water Resistancefalse
Enter quantity of jackets
x
Exception! enter correct format!
Enter Jacket size
Large
Enter Jacket insulation type
Leather
Is the Jacket water Resistance truefalse
Yes
Error! Enter correct format!
Is the Jacket water Resistance truefalse true
Enter Jacket size
Medium
Enter Jacket insulation type
No insulation
Is the Jacket water Resistance truefalse no Error! Enter correct format!
Is the Jacket water Resistance truefalse false
Displaying Jackets:
The Jacket has size Large With type of insulation Leather and for water resistance is true
The Jacket has size Medium With type of insulation No insulation and for water resistance is false
Press any key to continue Write All member attributes must be defined as private.
All member methods must be defined as public.
Assignment: Please make sure that you submit the correct assignment Write a program to practice with the use of inheritance in Java.
Create Clothing parentsuper class namelastNamelnitialSHWAjava
example if the last name is Smith then the class name will be SSHWAjava where S is for Super class.
You will have the following private attributes:
Size, color, material
Create a no args constructor that will initialize the attribute please see the sample run
Create a second constructor for the size only
Create a third constructor for all the attributes
Create a getter and setter methods
Create an override toString method to display the clothing details
Create a Jacket subclasschild class named lastNameinitialCHwAjava
example if the last name is Smith then the class name will be SCHWAjava
where C is for child class.
The class will have the following private attributes.
Insulation String data type
Water Resistance: Boolean data type
Create a no args constructor to initialize the variable and call the super no args
constructor, please see the sample run
Create a second constructor with the child class attributes plus the size
Create a third constructor with five attributes child and parent class attributes
Create a getter and setter methods
Create an override toString method to display the Jacket details
Create a class with main method namedlastNameFirstNameCITHWAjava
Create an object for the child class the no args constructor
Create a second object for the child's class with all the attributes
In the same
Create a secon
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
