Question: CHALLENGE ACTIVITY 7 . 3 . 3 : Defining a class. 5 3 9 6 0 2 . 3 5 4 0 5 4 2
CHALLENGE
ACTIVITY
: Defining a class.
qxzay?
Jump to level
In the Bison class, declare the following private fields:
string name
string color
and define the following public methods:
getName has no parameters and returns the name field.
getColor has no parameters and returns the color field.
Ex: If the input is Avi black, then the output is:
Name: Avi
Color: black
Note: If a field is not properly declared as private, an error message will be 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
