Please make program output AND text output the exact same as the one in the picture using the Input file! Input File: Today we live in an era where information is processed, almost, with the speed of light. Through computers, the technological revolution is drastically changing the way we live and communicate with each other. Terms such as Internet, which was unfamiliar even a few years ago, are very common today. With the help of computers you can send letters to and receive letters from loved ones within seconds. You no longer need to send an application by mail to apply for a job; in many cases you can simply submit your job application via the Internet. You can watch how stocks are performing in real time, and instantly buy and sell. Kids in elementary school regularly surf the Internet and use computers to design their classroom projects. Students no longer type their papers on typewriters or write them by hand. Instead, they use powerful word processing software to complete term papers. Many people maintain and balance their checkbooks on computers. These are some of the ways computers have greatly impacted our daily lives. However, all this is made possible because of the availability of different software, which are computer programs. For example, word processing software are programs that enable you to create term papers, create impressive looking resumes, and even write a book. Even this book was created with the help of a powerful word processor. Without software a computer is of no use. However, software are developed with the help of some programming languages. Moreover, the programming language C++, especially, is very well suited for developing software to accomplish a specific task. Until the early 1990s, before beginning to teach a programming language course, instructors used to spend the first few weeks just to teach their students how to use computers. Today, by the time students' graduate from high school, they know very well how to work with a computer. This book is not concerned with explaining how to use computers. Rather, the main objective is to teach how to write programs in a language called C++. It is useful, however, to at least understand some of the basic terminology and different components of a computer before you begin programming. This chapter briefly describes the main components of a computer system, the history of computer languages, and some fundamental ideas about how to solve problems with computer programming.

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

Please make program output AND text output the exact same as the one in the picture using the Input file!

Input File:

Today we live in an era where information is processed, almost, with the speed of light.
Through computers, the technological revolution is drastically changing the way we live
and communicate with each other. Terms such as Internet, which was unfamiliar even a few
years ago, are very common today. With the help of computers you can send letters to and
receive letters from loved ones within seconds. You no longer need to send an application
by mail to apply for a job; in many cases you can simply submit your job application via
the Internet. You can watch how stocks are performing in real time, and instantly buy
and sell. Kids in elementary school regularly surf the Internet and use computers to design
their classroom projects. Students no longer type their papers on typewriters or write
them by hand. Instead, they use powerful word processing software to complete term papers.
Many people maintain and balance their checkbooks on computers. These are some of the ways
computers have greatly impacted our daily lives. However, all this is made possible because
of the availability of different software, which are computer programs. For example, word
processing software are programs that enable you to create term papers, create impressive
looking resumes, and even write a book. Even this book was created with the help of a
powerful word processor. Without software a computer is of no use. However, software are
developed with the help of some programming languages. Moreover, the programming language
C++, especially, is very well suited for developing software to accomplish a specific task.
Until the early 1990s, before beginning to teach a programming language course,
instructors used to spend the first few weeks just to teach their students how to use
computers. Today, by the time students' graduate from high school, they know very well
how to work with a computer. This book is not concerned with explaining how to use
computers. Rather, the main objective is to teach how to write programs in a language
called C++. It is useful, however, to at least understand some of the basic terminology
and different components of a computer before you begin programming. This chapter
briefly describes the main components of a computer system, the history of computer
languages, and some fundamental ideas about how to solve problems with computer programming.

Write a program whose main function is merely a collection of variable
declarations and function calls. This program reads a text and outputs the letters, together with their counts, as
explained below in the function printResult. (there can be no global variables! All information must be passed in and
out of the functions. Use a structure to store the information.) Your program must consist of at least the following
functions:
Function openFile: Opens the input and output files. You must pass the file streams as parameters (by
reference, of course). If the file does not exist, the program should print an appropriate message and exit. The
program must ask the user for the names of the input and output files.
Function count: Counts every occurrence of the capital letters A-Z and small letters a-z in the text file opened
in the function openFile. This information must go into an array of structures. The array must be passed as a
parameter, and the file identifier must also be passed as a parameter.
Function printResult: Prints the number of capital letters and small letters, as well as the percentage of
capital letters for every letter A-Z and the percentage of small letters for every letter a-z. The percentages
should look like this "25%". This information must come from an array of structures, and this array must be
passed as a parameter.
Sample output (See the sample application L3-6.exe in the project folder)
C:
Enter the name of the input file: L3-6Data.txt
Enter the name of the output file: L3-60utData.txt
Total number of letters input
Press any key to Exit..
-->: 1933
Transcribed Image Text:Write a program whose main function is merely a collection of variable declarations and function calls. This program reads a text and outputs the letters, together with their counts, as explained below in the function printResult. (there can be no global variables! All information must be passed in and out of the functions. Use a structure to store the information.) Your program must consist of at least the following functions: Function openFile: Opens the input and output files. You must pass the file streams as parameters (by reference, of course). If the file does not exist, the program should print an appropriate message and exit. The program must ask the user for the names of the input and output files. Function count: Counts every occurrence of the capital letters A-Z and small letters a-z in the text file opened in the function openFile. This information must go into an array of structures. The array must be passed as a parameter, and the file identifier must also be passed as a parameter. Function printResult: Prints the number of capital letters and small letters, as well as the percentage of capital letters for every letter A-Z and the percentage of small letters for every letter a-z. The percentages should look like this "25%". This information must come from an array of structures, and this array must be passed as a parameter. Sample output (See the sample application L3-6.exe in the project folder) C: Enter the name of the input file: L3-6Data.txt Enter the name of the output file: L3-60utData.txt Total number of letters input Press any key to Exit.. -->: 1933
*L3-60utData.bxt - Notepad
O X
File Edit Format View Help
Pecentage of Occurrence
0.00%
Letter
Count
0.00%
2
0.10%
0.00%
1
0.05%
0.05%
0.00%
2
0.10%
5
0.26%
0.00%
0.05%
0.00%
2
0.10%
0.00%
0.00%
0.00%
0.00%
0.05%
0.05%
0.36%
7
1
0.05%
V
0.00%
2
0.10%
X
0.00%
Y
0.10%
0.00%
a
140
7.24%
26
1.35%
71
3.67%
50
2.59%
e
241
12.47%
2.12%
2.38%
41
46
79
4.09%
i
110
5.69%
0.26%
j
k
5
11
75
0.57%
1
3.88%
m
69
3.57%
108
5.59%
171
8.85%
3.47%
0.00%
67
135
6.98%
6.62%
128
t
158
8.17%
u
60
3.10%
V
24
1.24%
49
2.53%
2
0.10%
y
39
2.02%
0.00%4
Ln 53, C 100%
Windows (CRLF)
UTF-8
ABC DEFG HIn KLM NOP ORS
Transcribed Image Text:*L3-60utData.bxt - Notepad O X File Edit Format View Help Pecentage of Occurrence 0.00% Letter Count 0.00% 2 0.10% 0.00% 1 0.05% 0.05% 0.00% 2 0.10% 5 0.26% 0.00% 0.05% 0.00% 2 0.10% 0.00% 0.00% 0.00% 0.00% 0.05% 0.05% 0.36% 7 1 0.05% V 0.00% 2 0.10% X 0.00% Y 0.10% 0.00% a 140 7.24% 26 1.35% 71 3.67% 50 2.59% e 241 12.47% 2.12% 2.38% 41 46 79 4.09% i 110 5.69% 0.26% j k 5 11 75 0.57% 1 3.88% m 69 3.57% 108 5.59% 171 8.85% 3.47% 0.00% 67 135 6.98% 6.62% 128 t 158 8.17% u 60 3.10% V 24 1.24% 49 2.53% 2 0.10% y 39 2.02% 0.00%4 Ln 53, C 100% Windows (CRLF) UTF-8 ABC DEFG HIn KLM NOP ORS
Expert Solution
steps

Step by step

Solved in 5 steps with 8 images

Blurred answer
Knowledge Booster
ASCII Codes
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
  • SEE MORE 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