Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Your first step is to define the classes to represent the clothing items you wil

ID: 666594 • Letter: Y

Question

Your first step is to define the classes to represent the clothing items you will need along with constructors, attributes, and getters/setters as appropriate. You will need base classes for at

least the following:

Shirts (t-shirts, sweaters, button-up shirts, turtlenecks, etc.)

For each of these base classes you will be expected to implement a number of sub classes that
inherit from these base classes. For example, you may make a Shirt class that has Tshirt,
Sweater, ButtonUpShirt, etc as sub-classes. Make sure you represent enough clothing items
that your outfit planner can actually suggest a reasonable number of different combinations
of outfits. If you get to the end of the program and find you need more, just come back and
add new items.

In each of your clothing/accessory classes, write methods that have no parameters and return
boolean values. These methods will ask various questions about the clothing/ accessory item,
like whether it is plain or colourful, fancy or casual, good with earrings, good with dress
shoes, etc. (add your own characteristics, too!). These will be used to determine
what combinations of clothing do not make a good outfit. It is important that the base
class(es) for each category of clothing/accessory have these methods as well, perhaps as
abstract methods, so that you can store lists using the base class types and call the methods
without casting.

next, you will create a class (or classes) that will take care of generating good outfit suggestions. Inside, store lists for the following clothing/accessory types

The lists will store a base class type, but you will be able to add that type of object and any
subclasses of the base class to the list. As long as the base class has the necessary methods
defined (i.e., the characteristic methods from the previous step), polymorphism will allow
you to use the objects correctly without casting back to their original types. You are expected to have a relatively large number of objects stored in this outfit generating class.

Add a method (or methods) that will take one item from each of the five above types stored
in the lists and decide whether it makes a good outfit . Use the characteristic
methods you defined earlier to check whether the given combination is good. Here are some
ideas for rules you could apply (as usual, add your own as well):
The shirt, pants, and shoes should not all be plain
A shirt that is not good with dress shoes shouldnt be worn with dress shoes
A winter jacket shouldnt be worn with shorts
A tie shouldnt be worn with jeans
Blue and green together should be avoided

Add a method (or methods) that generate outfit possibilities by randomly choosing an item
from each of the five categories, testing the combination with the rules you created above,
and repeating until a good combination is found .
Add a testing class and test all of your methods, including printing out several of the combinations your outfit generator comes up with.

Explanation / Answer

try like this

}

Dr Jack
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Chat Now And Get Quote