1. Code a program ScanSent to input any sentence. 1.1. Count and display the number of words in the sentence. 1.2. Extend the program so that it determines and displays the number of 3-letter words in th sentence.

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter8: Arrays And Strings
Section: Chapter Questions
Problem 20PE
icon
Related questions
Question

java code

Code a program ScanSent to input any sentence.
1.1. Count and display the number of words in the sentence.
1.2.
Extend the program so that it determines and displays the number of 3-letter words in the
sentence.
2.
Load the program ExtractInitials that inputs a person's full name and changes it so that it
becomes their initials and surname in capitals. For example, Fred John Samuel Smith
becomes FJS SMITH. Use the Scanner class to isolate each name.
3.
Code a program TelNums to change telephone numbers that start with 45- or 47- to start with
the new prefixes 876- or 877-. Use the Scanner class to search for the "-" character.
1.
Transcribed Image Text:Code a program ScanSent to input any sentence. 1.1. Count and display the number of words in the sentence. 1.2. Extend the program so that it determines and displays the number of 3-letter words in the sentence. 2. Load the program ExtractInitials that inputs a person's full name and changes it so that it becomes their initials and surname in capitals. For example, Fred John Samuel Smith becomes FJS SMITH. Use the Scanner class to isolate each name. 3. Code a program TelNums to change telephone numbers that start with 45- or 47- to start with the new prefixes 876- or 877-. Use the Scanner class to search for the "-" character. 1.
Expert Solution
steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Knowledge Booster
Program on Numbers
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning