Assignment 15
Due Thursday, November 17 at 3:20pm on Catalyst

Assignment 15.1: Calculating My Grade (10 pts)
  • Make a copy of this Google worksheet
    • Note that you can simply go to File->Make a Copy
    • Or download the document as an Excel spreadsheet
  • Add up the number of points you have received in each category of this class
  • What is your current percentage in the course?
  • Now fill in the second half of the grade worksheet with your current point totals and enter an estimated grade for midterm 2.
  • What score do you need on midterm 2 to have (or keep) an A, B, and C in the class?
    • Enter various scores in the midterm 2 cell to see how these scores would affect your grade.
  • When you are finished, save the completed worksheet as either a pdf or an xls document
  • Upload it to Catalyst

Assignment 15.2: Vowels (10 pts)
  • Write a program that takes in a sentence from the user and then counts the number of vowels in the sentence.
  • You will need to use getline(), the string.length() function, and a for loop to correctly solve this problem in C++.
  • Open up a new C++ file called vowels.cpp.
  • First, welcome the user to the program and explain its purpose:
Welcome! Give me a sentence and I will count its vowels.
  • Then prompt the user to enter a sentence.
Please enter a sentence: _
  • Store the user input as a string variable.
  • Now, using a for loop and the string.length() function, count how many vowels (a, e, i, o, u) there are in the sentence.
  • Note that the program should also count capital vowels (A, E, I, O, U).
  • Finally, output the number of vowels like so:
There are 5 vowels in your sentence.
  • Make sure that your sample output matches mine.
  • Then, submit your program to Catalyst.

The output of your program should look identical to the sample output below.


It should also count capital letter vowels like this: