Question: CSCI 120 -Introduction to Computer Science II (C++) Fall 2018 Programming Component Using Visual Studio, type your solution to the following pro- gramming question. Be

 CSCI 120 -Introduction to Computer Science II (C++) Fall 2018 Programming

CSCI 120 -Introduction to Computer Science II (C++) Fall 2018 Programming Component Using Visual Studio, type your solution to the following pro- gramming question. Be sure to include your name as a comment at the top of the program. Once complete, print your solution (Ictrl + P]). Your program will be graded using the following rubric: . (10 pts): Correctly implements the functions countVovels and countConsonants. . (5 pts): The demonstration correctly performs items 1 through 6 . (5 pts): Code readability (e.g. appropriate variable names, comments, and indentation) (Vowels and Consonants) Implement the following functions: . int countVowels(const char). Accepts a constant pointer to a C-string as its only argument and returns the number of vowels appearing in the string. int countConsonants(conet char). Accepts a constant pointer to a C-string as its only argument and returns the number of consonants appearing in the string Demonstrate these two functions by counting the number of vowels and consonants that appear in text file input.txt. In addition to defining the functions above, your program should: 1. Open a file named input.txt in read-only mode only 2. Ensure if the file does not exist, then the file is not created. 3. Validate the file has been opened correctly 4. Output the text "The file has (x] vowels and [Y] consonants" to cout. 5. Close the file Hint: Test your program using some sample text to ensure it works correctly before submission

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!