Cat.java Class File
Create a new class called Cat that includes the functionality below
The new class has the attributes of:name � type Stringage � type integerweight � type doublebreed - type Stringdeclawed - type boolean - true for has no claws, false for has claws
Be sure your classes have a reasonable complement of constructor, accessor and mutator methods. Every member variable must have at least one independent accessor and one independent mutator.
Example:public void set Name(String name) mutator used to set namepublic void set Breed(String breed) mutator used to set the breedpublic void set(Boolean declawed) used to set claws or not(You must overload the set method to set de Clawed value)public String get Name() accessor used to get namepublic String get Breed() accessor used to get breedpublic boolean get Boolean() access used to get the value of declawed
Ensure you use the �this� reference from within this class when referring to every instance variable or instance method of the current object.
LastNameFirstNameWeek6Prog.java Class File (Driver Program)
Write a driver program that reads in 3 pets of type Cat and prints out the name and age of all cats with claws and over 3 years old.
The following information should be read in:Name (as String)Age (as int)Weight (as double)Breed (as String)DeClawed (as boolean)
Ensure you use the accessor methods to check the age and claws.
Upload your page to the Dropbox.
NOTE: Complete your activity and submit it to the Dropbox by clicking on the Dropbox tab at the top of the course frame and choosing the correct Weekly Activity.
If needed, click on the Help button above for more information on Course Tools/Using theDropbox.
Total Possible Points
Example output of your program
Example Run:Enter the name of Cat 1: SamEnter the age of Cat 1: 1Enter the weight of Cat 1: 5Enter the breed of Cat 1: fluffy1Does the cat have claws? True or False?: True
Enter the name of Cat 2: TomEnter the age of Cat 2: 4Enter the weight of Cat 2: 5Enter the breed of Cat 2: fluffy2Does the cat have claws? True or False?: True
Enter the name of Cat 3: BobEnter the age of Cat 3: 5Enter the weight of Cat 3: 5Enter the breed of Cat 3: fluffy3Does the cat have claws? True or False?: False
The Cats over 3 with claws are:
Name: TomAge: 4 Years Old
Please do not use any type of array listing when counting the cats
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here