Question: You have been given two classes. The first, Clothing, is complete and requires no edits. The second, Shirt, extends Clothing and requires that you add

You have been given two classes.
The first, Clothing, is complete and requires no edits.
The second, Shirt, extends Clothing and requires that you add a constructor to initialize the new attribute added in the Shirt class.
Once you have completed the Shirt class, create a new class called DressShirt. This new class should do the following:
extend Shirt
has two new attributes: hasButtonDownCollar (a boolean) and numButtons(an int)
Make sure your three classes work by creating an object of each type in the main method.
You have been given two classes. The first,

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!