Question: Encapsulate the Name class. Make its fields private and add appropriate accessor methods to the class. Data from Problem 7 Create a class called Name
Encapsulate the Name class. Make its fields private and add appropriate accessor methods to the class.
Data from Problem 7
Create a class called Name that represents a person’s name. The class should have fields representing the person’s first name, last name, and middle initial. (Your class should contain only fields for now.)
Step by Step Solution
3.44 Rating (151 Votes )
There are 3 Steps involved in it
Encapsulated version of Name class A Name object represents a name such as John Q Publi... View full answer
Get step-by-step solutions from verified subject matter experts
