Derive a class named Dress Shoes from the base class created in number 9 above.

What will be an ideal response?

```
public class DressShoe extends Shoe
{
private String type; //valid types include pumps, heels and flats
public DressShoe()
{
super();
type = "";
}
public DressShoe(String c, String d, double s, String t)
{
super(c, d, s);
setType(t);
}
public void setType(String t)
{
type = t;
}
public String getType()
{
return type;
}
public String toString()
{
return "Dress shoe designed by " + this.getDesigner() +
"\nColor: " + this.getColor() + "\nSize: " +
getSize() + "\nType: " + getType();
}
public boolean equals(Object o)
{
if(o == null)
return false;
else if(getClass() != o.getClass())
return false;
else
{
DressShoe otherDressShoe = (DressShoe) o;
return (getDesigner().equals(otherDressShoe.getDesigner()) &&
getColor().equals(otherDressShoe.getColor()) &&
getSize() == otherDressShoe.getSize() &&
type.equals(otherDressShoe.type));
}
}
}

```

Computer Science & Information Technology

You might also like to view...

To debug a macro, use ________ to execute the macro one action at a time

Fill in the blank(s) with correct word

Computer Science & Information Technology

In July 1998 the __________ announced that it had broken a DES encryption using a special purpose “DES cracker” machine.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology