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.
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.
- Special circumstances:
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.
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 2 images