Question: **Must be in Java** In the previous exercise, you created a Clothing object with attributes for the color, display name, and price. For this exercise,
**Must be in Java**
In the previous exercise, you created a Clothing object with attributes for the color, display name, and price. For this exercise, you'll be adding a toString method and an equals method. Have your toString method return a receipt/purchase order style string of the Clothing object. Here are some examples to give some inspiration or you can simply pick one of these (i.e., it doesn't need to do all of these). The examples assume a Clothing object with color = orange, displayName = T-shirt and price = 19.87: T-shirt: orange, 19.87 Orange T-Shirt $19.87 T-shirt, orange $19.87 Clothing objects are the same if they have the same color, display name, and price. Write an equals method to represent this.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
