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:

  1. Create a new class called Cat that extends the PetRecord class
  2. The new class has the additional attributes of:
    breed - type String
    declawed - type boolean - true for has no claws, false for has claws
  3. 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.;)

and? Where are you stuck?
You look to be on the right track (except for the incorrect name for your class).

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.