- Write the class definition source code for a class named
Snake
that contains three member variables:
- a member variable named length of type
int
- a member variable named aggression of type
int
- a member variable named poisonous of type
boolean
- Write the source code for a method named
isPoisonous()
that is part of the Snake
class.
The isPoisonous()
method should return a type boolean
, accept no parameters, and use the poisonous member variable as its return argument.
After completing the exercise, click the
Submit button and the system will award you full credit.