Add methods called setFirstName, setMiddleInitial, and setLastName to your Name class. Give the parameters the same names
Question:
Add methods called setFirstName, setMiddleInitial, and setLastName to your Name class. Give the parameters the same names as your fields, and use the this keyword in your solution.
Data from Problem 26
(You must complete Self-Check Problem 7 before answering this 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 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.)
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Related Book For
Building Java Programs A Back To Basics Approach
ISBN: 9780135471944
5th Edition
Authors: Stuart Reges, Marty Stepp
Question Posted: