Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Design a C++ Program that reads characters from a file and counts and tracks the number of: Total Characters Read Letters Vowels Consonants Numbers Punctuation

Design a C++ Program that reads characters from a file and counts and tracks the number of:
Total Characters Read
Letters
Vowels
Consonants
Numbers
Punctuation
White Space (Space, Tab, or Newline Characters)
*Hint: You can determine some counts using some of the other counts listed above.
The program should prompt the user for the name of the file to open. You should display an error message if you cannot open the file.
* i.e. using input.inFile (outtest.txt); //to open and read the file
If the input file opens successfully, make sure to close the input file before displaying the count information to the user on the screen.
If the input file opens successfully, open an output file named charsCounts.txt and write the count information to the file. If the output file opens successfully, remember to close it. Otherwise, display an error message that the output file could not be opened.
The program should include a loop that allows the user to run the program until they want to exit.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database And Expert Systems Applications 33rd International Conference Dexa 2022 Vienna Austria August 22 24 2022 Proceedings Part 1 Lncs 13426

Authors: Christine Strauss ,Alfredo Cuzzocrea ,Gabriele Kotsis ,A Min Tjoa ,Ismail Khalil

1st Edition

3031124227, 978-3031124228

More Books

Students also viewed these Databases questions

Question

Define a relational DBMS and explain how it organizes data.

Answered: 1 week ago

Question

4. What action should Cherita Howard take and why?

Answered: 1 week ago