Question: CHALLENGE ACTIVITY 7 . 3 . 3 : Defining a class. 5 3 9 6 0 2 . 3 5 4 0 5 4 2

CHALLENGE
ACTIVITY
7.3.3: Defining a class.
539602.3540542.qx3zay?
Jump to level 1
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.
 CHALLENGE ACTIVITY 7.3.3: Defining a class. 539602.3540542.qx3zay? Jump to level 1

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!