Suppose you have a text file called notes.txt. You are provided with this notes.txt file on the blackboard. Write a C++

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Suppose you have a text file called notes.txt. You are provided with this notes.txt file on the blackboard. Write a C++

Post by answerhappygod »

Suppose you have a text file called notes.txt. You are provided
with this notes.txt file on the blackboard. Write a C++ code to
display the word that appears most in the notes.txt file and how
many times the word appears. This is called word frequency. Your
code should automatically find this word that appears most in the
text file and also should automatically calculate how many times
this word appears. Your code should be such that when I use it to
count words from a file with million words, it should tell me which
word appears most, this means I do not need to look at the file to
know the word first. Your code should also count the number of
characters in the word you found and also convert the word to all
CAPS. Your code should also count the total number of words in the
file.
For example, suppose a text file has the following text:
Apple
Mango
Apple
Apple
• Your code will be recompiled during marking to see if it gives
the output you found.
• You are to complete this assignment individually.
• It is reasonable to discuss with others possible general
approaches to the given problem
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply