Question: Define a default constructor that initializes the fields number ( integer ) , greeting ( string ) , and areaCode ( integer ) with the
Define a default constructor that initializes the fields number integer greeting string and areaCode integer with the default values "Unknown", and respectively.
Ex: If the input is Bob then the output is:
Default values:
Number: Greeting: Please leave a message for Unknown, Area code:
After mutator methods:
Number: Greeting: Please leave a message for Bob, Area code:
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
