Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Lab 14 Vowel Program (cont.) CSCI 111 Programming and Algorithms I Due Friday February 26, 11:59pm on turnin 10 Points NEW CONCEPTS: This lab extends
Lab 14
Vowel Program (cont.)
CSCI 111 Programming and Algorithms I
Due Friday February 26, 11:59pm on turnin 10 Points
NEW CONCEPTS: This lab extends Lab 13.
Task list:
1. Create a source code file named lab14.cpp.
2. The goal of this program is to prompt the user for 3 sentences. For each sentence, calculate the frequency of each vowel as done in Lab 13. Store variable counters for each sentence. Store both the letter and its frequency.
3. After performing step 2 for all 3 sentences, determine which sentence has the most occurrences of a vowel and display the complete results as shown below.
4. It is OK to assume that there is never a tie of the most popular letter for each sentence. This will save much time. Hint: So, ensure your test data follows this rule.
5. Refer to the expected output listing below.
6. Submit your lab14.cpp file on https://turnin.ecst.csuchico.edu/ and get a successful message.
GRADING
To achieve a maximum score, students will need to clearly prove that they completed the goal.
Points lost for incompleteness, sloppiness, lateness, or failure to follow instructions.
Refer to syllabus for late policy.
SAMPLE OUTPUT
/user/faculty/jraigoza/csci111/Labs/lab14 $ ./lab14
Enter sentence 0.
I just wAnt to BANG on the drum all day LONG.
Vowel statistics
a: 4
e: 1
i: 1
o: 3
u: 2
unknown: 34
The most popular letter for sentence 0 is >a< having 4 occurrences. Enter sentence 1.
The teacher told ME to stay after school.
Vowel statistics
a: 3
e: 5
i: 0
o: 4
u: 0
unknown: 29
The most popular letter for sentence 1 is >e< having 5 occurrences. Enter sentence 2.
The BOSS is a jerk.
Vowel statistics
a: 1
e: 2
i: 1
o: 1
u: 0
unknown: 14
The most popular letter for sentence 2 is >e< having 2 occurrences.
The sentence with the most popular vowel is sentence 1 having 5 occurrences of letter >>e<<.
/user/faculty/jraigoza/csci111/Labs/lab14 $ ./lab14
Enter sentence 0.
I know it always sounds ABSURD.
Vowel statistics
a: 3
e: 0
i: 2
o: 2
u: 2
unknown: 22
The most popular letter for sentence 0 is >a< having 3 occurrences. Enter sentence 1.
I TELL you once more before I get up and go.
Vowel statistics
a: 1
e: 6
i: 2
o: 5
u: 2
unknown: 28
The most popular letter for sentence 1 is >e< having 6 occurrences. Enter sentence 2.
One OF these days you WILL get it right.
Vowel statistics
a: 1
e: 4
i: 3
o: 3
u: 1
unknown: 28
The most popular letter for sentence 2 is >e< having 4 occurrences.
The sentence with the most popular vowel is sentence 1 having 6 occurrences of letter >>e<<.
/user/faculty/jraigoza/csci111/Labs/lab14 $
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started