Add two new methods to the Name class: public String getNormalOrder() Returns the persons name in normal
Question:
Add two new methods to the Name class:
public String getNormalOrder()
Returns the person’s name in normal order, with the first name followed by the middle initial and last name. For example, if the first name is "John", the middle initial is "Q", and the last name is "Public", returns "John Q. Public".
public String getReverseOrder()
Returns the person’s name in reverse order, with the last name preceding the first name and middle initial. For example, if the first name is "John", the middle initial is "Q", and the last name is "Public", returns "Public, John Q.".
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 Answer:
Building Java Programs A Back To Basics Approach
ISBN: 9780135471944
5th Edition
Authors: Stuart Reges, Marty Stepp