Question: The following question refers to the following three classes: Animal.java ScoobyDoo.java Shaggy.java WhereAreYou.java public class Animal { public String getColor ( ) { return yellow;
The following question refers to the following three classes:
Animal.java ScoobyDoo.java Shaggy.java WhereAreYou.java
public class Animal
public String getColor
return "yellow";
public String getSize
return "microscopic";
public class ScoobyDoo extends Animal
public String getColor
return "purple";
public String getSize
return lbs;
public class Shaggy extends Animal
public String getColor
return "grey";
public String getSize
return lbs;
public class WhereAreYou
public static void mainString args
ScoobyDoo anew ScoobyDoo;
Shaggy bnew Shaggy;
Animal cnew Animal;
Animal dc;
System.out.printlnagetColor;
System.out.printlnbgetColor;
System.out.printlncgetColor;
System.out.printlndgetColor;
When running WhereAreYou, the output is four lines. In each of the four lines blanks below, provide the output.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
