Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Language: C++ Design a class named Analyzer with features to analyze a text file. Your class should have the following member functions: Constructor: will receive

Language: C++

Design a class named Analyzer with features to analyze a text file. Your class should have the following member functions: Constructor: will receive a file name as a parameter and read its content. Set a status member variable to tell whether or not the file was uploaded successfully. isUploaded: returns true if the file was uploaded successfully. This status is saved in a member variable that you defined in your class. sentenceCounter: will return how many sentences there is in the text wordCounter: will return how many words there is in the text properNouns: will return how many potential proper nouns were found. Proper nouns start with a capital letter. digitsCounter: will return how many digits were found in the text Important: use the functions for character processing that you learned in Module 6. Your class will need at least the following member variables: - A string to hold the text. You can choose either a string or c-string type variable. Note that c-strings will need to be allocated dynamically and will require you to define a destructor to deallocate that memory space. - A status variable to flag whether or not a file was uploaded to the object. All counter functions should check this status variable before proceeding to counting. Note that trying to count on an empty text may make your program crash.

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

Learning MySQL Get A Handle On Your Data

Authors: Seyed M M Tahaghoghi

1st Edition

0596529465, 9780596529468

More Books

Students also viewed these Databases questions

Question

=+1 Why are local employment laws important to IHRM?

Answered: 1 week ago

Question

=+ Are some laws more important than others? If so, which ones?

Answered: 1 week ago