Write a program that takes a string of someone's full name (first and last at the same
Fantastic news! We've Found the answer you've been seeking!
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 capitalizing the first letter of each name. You may use the available string manipulation methods. Example:
Enter your full name: george washington Washington, George
- 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.
- 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.
Related Book For
Java An Introduction To Problem Solving And Programming
ISBN: 9780134462035
8th Edition
Authors: Walter Savitch
Posted Date: