The Clothing
class describes an article of clothing in terms of
A pair of clean jeans might be instantiated as:
Clothing jeans = new Clothing("blue jeans",3,0);
meaning that the "blue jeans" can be worn three times without washing before we'll consider them dirty, and are currently washed and unworn.
Write the Clothing
class, and include accessor and mutator methods that allow someone to wear
and wash
an article of clothing.
Write a ClothingTester
that creates a few pieces of clothing and demonstrates how they can be manipulated.
Write a Shirt
class that inherits from the Clothing
class. The Shirt
class has an additional boolean parameter, shortsleeves
. The Shirt
class also has a method, hasShortSleeves
.
Write an additional class of your own choosing that inherits from Clothing
, along with methods as appropriate.
Write a Wardrobe
class that maintains a list of Clothing
objects. Then write a WardrobeRunner
main program that demonstrates how the Wardrobe
class can be used to manipulate the clothing objects.