Question: Choose an animal. Create a class that will represent this animal. Rename file1.java to whatever your class name is. It should have two instance variables,
Han javd Monkay jova Instructions from your teacher 1- klass Main 2public static void nain(Stringti args) Choose an animal. Create a class that will represent this animal. Rename file1 java to whatever your class name is It should have two instance variables, color, and sound, both Strings //create an object using the default constructor //create an object using the standand constructor //create an object using the copy constructor //print the default object //print the standard object //print the copy object //call the speak nethod on the standard object Write a standard, default, and copy constnactor Write a method speak which displays (prints) the sound to the console Write a toString method Complete Main java by replacing each comment with its appropriate code 10 Each student should have a unique animal. You may not copy another student's work
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
