CSCI201 CSCI/201 CSCI 201 Project 7 Text Analyzer
    CSCI201 CSCI/201 CSCI 201 Project 7 Text Analyzer CSCI201 CSCI/201 CSCI 201 Project 7 Text Analyzer

CSCI201 CSCI/201 CSCI 201 Project 7 Text Analyzer

$25.99

Project 7 Text Analyzer

Due Date: November 13, Tuesday

Objectives

  • To practice using strings and text files.

Problem

Write a text analyzer program that will read any text file. The program is to print a menu that gives the user the options of counting lines, words, characters, sentences (one or more words ending in a period, question mark or exclamation mark), and an option to search for a word in the file. At the end of the analysis, write an appropriate report according to user’s option.

Requirements

  • Use a separate function for each option.
  • The function that searches for a specified word (a string) should search the file for every occurrence of the word. The function counts the number of times the word appeared in the file and records each line number the word appeared in the file. To record the line numbers, you may use an integer array.

Input

  • File name
  • An option of the menu
  • A word to search for

 

Output

  • An analysis report for the user’s option

An Example of Test Run

The output of your program might look like this:

csci>a.out

Welcome to the system of “Text Analyzer”.

Enter the file name to analyze: project7.dat

*****************************************

1. count the number of words

2. count the number of lines

3. count the number of characters

4. count the number of sentences

5. search for a word

*****************************************

Enter your option: 5 CSCI 201 Computer Science I 2

Enter the word to search for: the

Word "the" appeared 2 times in the file.

It appeared on line 1, 3

Do you want to continue? (Y/N) y

*****************************************

1. count the number of words

2. count the number of lines

3. count the number of characters

4. count the number of sentences

5. search for a word

*****************************************

Enter your option: 1

There are 54 words in the file.

Do you want to continue? (Y/N) n

Thanks for using this system!

What to turn in

  • A typed or word-processed description of your algorithm.
  • A nicely drawn structure chart.
  • The source file of the program. 

 

My tutorial contains C++ Program - Detailed comments

If you have more questions, please contact me via email support@extutorials.com

I will help you any time

Thank you !

Attached Files

Move over [ preview ] file name to preview content in it!

  • CSCI 201 PROJECT 7.zip [89.7KB]
    • Text Analyzer.doc [82.9KB] [ preview ]
    • TextAnalyzer.cpp [6.8KB] [ preview ]

Write a review

Your Name:


Your Review: Note: HTML is not translated!

Rating: Bad           Good

Enter the code in the box below:



PURCHASE SAVE
2 Tutorials 10%
3 Tutorials 13%
4 Tutorials 16%
5 Tutorials 19%
6 Tutorials 22%
7 Tutorials 25%
8 Tutorials 28%
9 Tutorials 31%
10 Tutorials 34%
add url more

9MZQASHWN73B