I have a class assignment that I am having a hard time to complete. I have started it but at ths point I am lost. Can someone help? This is what I should accomplish:
- Create a new class called Cat that extends the PetRecord class
- The new class has the additional attributes of:
breed - type String
declawed - type boolean - true for has no claws, false for has claws - Be sure your classes have a reasonable complement of constructors and accessor methods.
This is what I have:
public class cat extends PetRecord
{
String breed;
boolean declawed;
public void setBreed(String newBreed)
{
breed = newBreed; //age and weight are unchanged.
}
public String getBreed( )
{
return breed;
}
}
Any help would be greatly appreciated.;)