Question: string color string name integer age and define the following public methods: getColorO has no parameters and returns the color field. getName ( ) has

string color
string name
integer age
and define the following public methods:
getColorO has no parameters and returns the color field.
getName() has no parameters and returns the name field.
getAge() has no parameters and returns the age field.
Ex. If the input is brown Avi 12, then the output is:
Color: brown
Name: Avi
Age: 12
Note: If a field is not properly declared as private, an error message will be output.
public class Deer {
V** your code goes here */
public void setcolor (String newcolor){
}
color = newColor;
public void setName(string newName){
}
name = newName;
public void setage(int newage) i
}
age = newAge;
 string color string name integer age and define the following public

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!