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

What will be an ideal response?


```
public class Boot extends Shoe
{
private String heelType; //valid types include pumps, heels and flats

public Boot()
{
super();
heelType = "";
}

public Boot(String c, String d, double s, String ht)
{
super(c, d, s);
setHeelType(ht);
}

public void setHeelType(String ht)
{
heelType = ht;
}

public String getHeelType()
{
return heelType;
}

public String toString()
{
return "Boot designed by " + this.getDesigner() +
"\nColor: " + this.getColor() + "\nSize: " +
getSize() + "\nType: " + getHeelType();
}

public boolean equals(Object o)
{
if(o == null)
return false;
else if(getClass() != o.getClass())
return false;
else
{
Boot otherBoot = (Boot) o;
return (getDesigner().equals(otherBoot.getDesigner()) &&
getColor().equals(otherBoot.getColor()) &&
getSize() == otherBoot.getSize() &&
heelType.equals(otherBoot.heelType));
}
}
}

```

Computer Science & Information Technology

You might also like to view...

A data-flow diagram provides a visual representation of an algorithm

Indicate whether the statement is true or false

Computer Science & Information Technology

To create a combo chart, select the data you want to plot, and click the Combo chart button in the Charts group on the _____ tab.?

A. ?Format B. ?Insert C. ?Chart Tools Design D. ?Format

Computer Science & Information Technology

All ISDN connections were based on what two different types of channels?

What will be an ideal response?

Computer Science & Information Technology

A tool that copies all formatting from one area to another.

What will be an ideal response?

Computer Science & Information Technology