Question: JAVA: Build a persons name class and write a client program to do the following: - (2 points) Create a class that represent a person's

JAVA: Build a persons name class and write a client program to do the following:

JAVA: Build a persons name class and write a client program to

- (2 points) Create a class that represent a person's name with the first, middle initial, and last name (eg John K. Henry'). The first and last names are string type and the middle initial is a character type (single initial character) (2 points) Keep all the attributes private (encapsulated). (2 points) Create a method to get the name in the normal order of (First, Middle, Last), (2 points) Create another method to get the name in a reverse order (Last, Middle, First) - (2 points) Create a constructor that accepts First name, Middle Initial, and Last name as parameters and initialize the object's state according to the parameters. - (2 points) Add a toString() method to the person class to display the attributes. - (6points) Write a client program that: 0 Reads inputs (first name, middle name initial, and last name) from the keyboard o Displays the person's name in the normal order O Displays the person's name in the reverse order o Use the toString() method to display a person's name

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!