Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

IN C++ CODING 1. Read the contents of a data file (mytext.dat); 2. Process the frequency of characters (a-z) that appear in the data file

IN C++ CODING

image text in transcribed

1. Read the contents of a data file (mytext.dat); 2. Process the frequency of characters (a-z) that appear in the data file 3. Print the frequency of characters in the file to the screen; 4. Be able to use an ifstream object; called "charword freq.cpp In this assignment you will implement a program to determine the number of words and the number of occurrences of each letter in a block of text stored in a data file called "mytext.daf". Define a word to be any string of letters that is delimited at each end by either whitespace, a period, a comma, or the beginning or end of a line. You can assume that the input consists entirely of letters, whitespace, commas and periods. When outputting the number of words and letters that occur in a line, be sure to count upper- and lowercase versions of a letter as the same letter. Output the letters in alphabetical order and list only those letters that do occur in the input data file Consider the following example Block of text in the data file hello world ALL is great. HELLO WORLD ALL IS GREAT. hello worlD alL iS great. Output of your program to the screen: 15 words 3 d 3 h 15 1 Your program should be modular, meaning that you should break it up into smaller function(s). Your main program should be as small as possible and well documented

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_2

Step: 3

blur-text-image_3

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 Systems Introduction To Databases And Data Warehouses

Authors: Nenad Jukic, Susan Vrbsky, Svetlozar Nestorov

1st Edition

1943153191, 978-1943153190

More Books

Students also viewed these Databases questions

Question

=+ d. a professor deciding how much to prepare for class

Answered: 1 week ago

Question

=+ a. a family deciding whether to buy a new car

Answered: 1 week ago