Your task for this problem is to create a full Java class, starting with a blank file.
The class you create must be named
Chicken and must be
Chicken class should have two instance variables.
wingCountis an integer that holds the number of wings that this Chicken has
coloris a String that contains the color of the chicken
You are going to create two constructors
The default constructor should set the
wingCount instance variable to
2 and the
color instance variable to
The second constructor should take an
int parameter and a
String parameter, in that order. The
int value needs to be stored in the
wingCount instance variable. The
String parameter needs to be stored in the
color instance variable.
Modifiers / Accessors
You are also going to create modifier / accessor methods for each of the instance variables.
getWingCountreturns the number of wings
wingCountto a new value. You're probably going to need to pass a parameter to this method.
getColorreturns the color of the Chicken
setColorallows you to change
color. You're probably going to need to pass a parameter to this one as well.
Note on Testing
Because you are building an entire class, it's possible that you may see build errors when you test. This is most likely caused either by your class not having the right name - it should be
Chicken - or not having both constructors.