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 0, "Unknown", and 1, respectively.
Ex: If the input is 9226765 Bob 953, then the output is:
Default values:
Number: 0, Greeting: Please leave a message for Unknown, Area code: 1
After mutator methods:
Number: 9226765, Greeting: Please leave a message for Bob, Area code: 953

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!