Question: Write a program that takes a string of someone's full name (first and last at the same time) and prints it out last name first


  1. Write a program that takes a string of someone's full name (first and last at the same time) and prints it out last name first capitalizing the first letter of each name. You may use the available string manipulation methods. Example:

Enter your full name: george washington Washington, George


  1. Write a program that will take in a phrase/sentence and store it in a String. Your program should count how many words are in the sentence and display the output (hint: split()). Example:

Enter phrase: Why don't get a Spring Break during the fall semester? There are 10 words in that sentence.

  1. Write a program that has the user enter two Strings. Display whether the first String is less than (comes first alphabetically), equal to, or greater than (comes after alphabetically) the first.

Example:

Enter the first string: dog Enter the next string: cat

cat comes before dog alphabetically.



What to Turn In

For each exercise, submit the source code and the screen output.

Learning Objectives

This exercise contributes to the development of problem solving and debugging skills. After completing this exercise, students should understand how to manipulate character strings in a programming language.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Sure Here are the solutions to the three exercises Exercise 1 Last Name First java import javautilSc... View full answer

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 Programming Questions!