Write a C++ Program String Processing: Use the string processing functions we covered in class (length(), size(), find(  ), substr(  ), at( ), erase( ), insert( ), replace( ) and append in the problems below. Remember if you need to reset a file to the beginning you can use infile.seekg(0, ios::beg); 1.0 Given the text file UAH_sample.txt(details below) write a program that performs the following tasks: Find and count all words that are from 1 to 10 letters long. Print the results to the screen as a table. Special circumstances: You should not count punctuation at the end of the sentence as part of the word. Just erase the punctuation or subtract 1 from the length. Do not count numbers as words. You do not need to remove apostrophes. Just count that as part of the length. Multiple words connected by dashes, like state-of-the-art, can be counted as one long word.                                        Count the number of times each letter (A_Z, a-z) appears in the file. Print (to the screen) a table of each letter and the number of times it appears. You do not need separate counts for upper and lowercase. Ignore all characters that are not letters.  Given an input letter find and print to the screen all words that begin with that letter. Check for both uppercase and lowercase letters beginning a word. Show results for letters a, r and u. Using the original UAH_sample.txt file replace each occurrence of UAHuntsville with UAH. Create a new file with the updated text. Upload the new file to canvas along with your other documents. UAH_sample.txt - Being a Charger is about more than just fitting in; it's about standing out and being a leader on campus and in the community. To help, we've created a strong leadership program to enable you to excel outside of the classroom and make a smooth transition from collegian to careerist skills you can also learn by joining one of UAHuntsville's many student-run organizations or holding a position in the Student Government Association. No matter what role you choose, at UAHuntsville your student experience is just as valuable as your education.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Write a C++ Program

String Processing: Use the string processing functions we covered in class (length(), size(), find(  ), substr(  ), at( ), erase( ), insert( ), replace( ) and append in the problems below. Remember if you need to reset a file to the beginning you can use infile.seekg(0, ios::beg);

1.0 Given the text file UAH_sample.txt(details below) write a program that performs the following tasks:

  • Find and count all words that are from 1 to 10 letters long. Print the results to the screen as a table.
    • Special circumstances:
      • You should not count punctuation at the end of the sentence as part of the word. Just erase the punctuation or subtract 1 from the length.
      • Do not count numbers as words.
      • You do not need to remove apostrophes. Just count that as part of the length.
      • Multiple words connected by dashes, like state-of-the-art, can be counted as one long word.                                       

Count the number of times each letter (A_Z, a-z) appears in the file. Print (to the screen) a table of each letter and the number of times it appears. You do not need separate counts for upper and lowercase. Ignore all characters that are not letters. 

  • Given an input letter find and print to the screen all words that begin with that letter. Check for both uppercase and lowercase letters beginning a word. Show results for letters a, r and u.
  • Using the original UAH_sample.txt file replace each occurrence of UAHuntsville with UAH. Create a new file with the updated text. Upload the new file to canvas along with your other documents.

UAH_sample.txt - Being a Charger is about more than just fitting in; it's about standing out and being a leader on campus and in the community. To help, we've created a strong leadership program to enable you to excel outside of the classroom and make a smooth transition from collegian to careerist skills you can also learn by joining one of UAHuntsville's many student-run organizations or holding a position in the Student Government Association. No matter what role you choose, at UAHuntsville your student experience is just as valuable as your education.

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Knowledge Booster
Algebraic Expressions
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
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education