Please help me complete this Java class and keep the code simple. You will complete the class called NameWork. The input() method has already been started for you. Finish it following the directions contained in the comments. In addition, the class will have the following methods: monogram( ) : this method will return a String containing the full set of initials for the person's name. DO NOT OBTAIN THE PERSON'S NAME AGAIN. Use the existing variable name. You do not need to redeclare the variable, as it is already declared in your class. The full set of initials means you build the String by obtaining the first letter of each name. The person may have entered only their first and last name, their last name may consist of two names, or they may have entered a middle name. Think about what separates the first, last, and middle names for someone -- that will help you find the first letter of each name. salute( ) : this method will return a String with the person's first initial (first letter of their first name), followed by a space, followed by their last name engraveLength( ) : this method will return an integer which is the total number of characters (including spaces) of their name, something an engraver would need to know
Please help me complete this Java class and keep the code simple.
You will complete the class called NameWork. The input() method has already been started for
you. Finish it following the directions contained in the comments.
In addition, the class will have the following methods:
monogram( ) : this method will return a String containing the full set of initials for the
person's name. DO NOT OBTAIN THE PERSON'S NAME AGAIN. Use the existing
variable name. You do not need to redeclare the variable, as it is already declared in
your class.
The full set of initials means you build the String by obtaining the first letter of each
name. The person may have entered only their first and last name, their last name may
consist of two names, or they may have entered a middle name. Think about what
separates the first, last, and middle names for someone -- that will help you find the first
letter of each name.
salute( ) : this method will return a String with the person's first initial (first letter of
their first name), followed by a space, followed by their last name
engraveLength( ) : this method will return an integer which is the total number of
characters (including spaces) of their name, something an engraver would need to know
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images