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, continue/exit, 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 parent/super class name(lastNameInitialSHW9A.java)
[example if the last name is Smith then the class name will be SSHW9A.java 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 subclass/child class named (lastNameinitialCHw9A.java)
[example if the last name is Smith then the class name will be SCHW9A.java 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 named(lastNameFirstNameCIT130HW9A.java)
Create an object for the child class the no args constructor
Create a second object for the childs class with all the 5 attributes
In the same class and outside main method create 2 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 [Size=M, Color=Black, Material=Cotton], Jacket [Insulation Type=Fleece, Water Resistance=true]
Custom Jacket: Clothing [Size=L, Color=Red, Material=Wool], Jacket [Insulation
Type=Down, Water Resistance=false]
Enter quantity of jackets
x
Exception! enter correct format!
2
Enter Jacket size
Large
Enter Jacket insulation type
Leather
Is the Jacket water Resistance true/false
Yes
Error! Enter correct format!
Is the Jacket water Resistance true/false true
Enter Jacket size
Medium
Enter Jacket insulation type
No insulation
Is the Jacket water Resistance true/false no Error! Enter correct format!
Is the Jacket water Resistance true/false 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 parent/super class name(lastNamelnitialSHW9A.java)
[example if the last name is Smith then the class name will be SSHW9A.java 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 subclass/child class named (lastNameinitialCHw9A.java)
[example if the last name is Smith then the class name will be SCHW9A.java
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 named(lastNameFirstNameCIT130HW9A.java)
Create an object for the child class the no args constructor
Create a second object for the child's class with all the 5 attributes
In the same
Create a secon
Please do not use break, continue / exit , return

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 Programming Questions!