Question: s. [10] Classes and Objects. Create a class called Name that represents a person's name. The the following fields: - firstN . lastName representing the
![s. [10] Classes and Objects. Create a class called Name that](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f59c7f3270e_41466f59c7eb3c16.jpg)
s. [10] Classes and Objects. Create a class called Name that represents a person's name. The the following fields: - firstN . lastName representing the person's last name o middleInitial representing their middle initial which should be a singi ame representing the person's first name character. Add new object. a constructor with 3 arguments (one for each of the named fields) to initialize a Add the following two methods: e public String getNormalOrderO This returns the person's name in normal and last name. For order, with the first name followed by the middle initial example, if the first name is "John", the middle initial is O', and the last name is "Public", this method returns "John Q. Public" 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", this method returns "Public, John Q." . Public String getReverseOrderO - This returns the person's name in reverse
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
