Here is my current assignment i got the cat file to work im


Here is my current assignment I got the cat file to work I'm just having trouble with the driver file. You must create two Java files called LastNameFirstNameUnit6Prog.java, and Cat.java. Ensure you include ALL files required to make your program compile and run. I would like to see your .java files only. 5% Cat.java Class File Create a new class called Cat that includes the functionality below The new class has the attributes of: name - type String age - type integer weight - type double breed - type String declawed - 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 setName(String name) mutator used to set name public void setBreed(String breed) mutator used to set the breed public void set(Boolean declawed) used to set claws or not (You must overload the set method to set deClawed value) public String getName() accessor used to get name public String getBreed() accessor used to get breed public boolean getBoolean() 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. 45% LastNameFirstNameUnit6Prog.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. 45% NOTE: Complete your activity and submit it by clicking on "Submit Assignment". 5% Total Possible Points 100 Example output of your program Example Run: Enter the name of Cat 1: Sam Enter the age of Cat 1: 1 Enter the weight of Cat 1: 5 Enter the breed of Cat 1: fluffy1 Does the cat have claws? True or False?: True Enter the name of Cat 2: Tom Enter the age of Cat 2: 4 Enter the weight of Cat 2: 5 Enter the breed of Cat 2: fluffy2 Does the cat have claws? True or False?: True Enter the name of Cat 3: Bob Enter the age of Cat 3: 5 Enter the weight of Cat 3: 5 Enter the breed of Cat 3: fluffy3 Does the cat have claws? True or False?: False The Cats over 3 with claws are: Name: Tom Age: 4 Years Old public static void main(String[] args) { Scanner input = new Scanner(System.in); //Input Cats name System.out.println("Enter cats name:"); String name = input.next(); //Input Cats age System.out.println("Enter cats age :"); int age = input.nextInt(); //Input Cats weight System.out.println("Enter cats weight :"); double weight = input.nextDouble(); //Input Cats breed System.out.println("Enter cats breed :"); String breed = input.next(); //Input value true or false for Cats claw status System.out.println("Is your cat declawed? (True or False) :"); boolean is_declawed = input.nextBoolean(); //method used to set variables name, age, weight, breed, and claw status for each of 3 Cats Cat myCat1 = new Cat(); myCat1.setName(name); myCat1.setBreed(breed); myCat1.setAge(age); myCat1.setWeight(weight); myCat1.setDeclawed(is_declawed); System.out.println("The Cats over 3 years old with claws are: "); if(myCat1.getAge() >= 3 && myCat1.getIs_declawed()== false) System.out.println("Name: " + myCat1.getName()); System.out.println("Age: " + myCat1.getAge() + " Years Old:"); System.out.println("Enter cats name:"); name = input.next(); //Input Cats age System.out.println("Enter cats age :"); age = input.nextInt(); //Input Cats weight System.out.println("Enter cats weight :"); weight = input.nextDouble(); //Input Cats breed System.out.println("Enter cats breed :"); breed = input.next(); //Input value true or false for Cats claw status System.out.println("Is your cat declawed? (True or False) :"); is_declawed = input.nextBoolean(); //method used to set variables name, age, weight, breed, and claw status for each of 3 Cats Cat myCat2 = new Cat(); myCat2.setName(name); myCat2.setBreed(breed); myCat2.setAge(age); myCat2.setWeight(weight); myCat2.setDeclawed(is_declawed); System.out.println("The Cats over 3 years old with claws are: "); if(myCat2.getAge() >= 3 && myCat2.getIs_declawed()== false) System.out.println("Name: " + myCat2.getName()); System.out.println("Age: " + myCat2.getAge() + "Years Old:"); System.out.println("Enter cats name:"); name = input.next(); //Input Cats age System.out.println("Enter cats age :"); age = input.nextInt(); //Input Cats weight System.out.println("Enter cats weight :"); weight = input.nextDouble(); //Input Cats breed System.out.println("Enter cats breed :"); breed = input.next(); //Input value true or false for Cats claw status System.out.println("Is your cat declawed? (True or False) :"); is_declawed = input.nextBoolean(); //method used to set variables name, age, weight, breed, and claw status for each of 3 Cats Cat myCat3 = new Cat(); myCat3.setName(name); myCat3.setBreed(breed); myCat3.setAge(age); myCat3.setWeight(weight); myCat3.setDeclawed(is_declawed); //provides desired output System.out.println("The Cats over 3 years old with claws are: "); if(myCat3.getAge() >= 3 && myCat3.getIs_declawed()== false) System.out.println("Name: " + myCat3.getName()); System.out.println("Age: " + myCat3.getAge() + "Years Old:"); } } 

Request for Solution File

Ask an Expert for Answer!!
JAVA Programming: Here is my current assignment i got the cat file to work im
Reference No:- TGS01128001

Expected delivery within 24 Hours