Question: A Cat has a string color and a string name. Complete the class below by adding 1) attributes and 2) a constructor with parameters to

A Cat has a string color and a string name. Complete the class below by adding 1) attributes and 2) a constructor with parameters to initialize the attributes. Also 3) write a method that produces a string from a cat, for printing the attributes. { //constructor //for easy printing public static void main(String[] args) { //Create a cat //Print the cat = new HashSet (): //Make cat collection //put in the cat you made //print the entire } }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
