I Need someone to do simple C++ Homework.

Design and develop an Object-Oriented C++ program that prepares a concordance of all the words in

any user-selected text file. A concordance is defined as “an alphabetical index of the principal words of a

book or document, with a reference to the passage in which each occurs.” To do this, your program will

need to read the contents of a text file, keeping track of line numbers. Then record each word with its

current line number. Your finished result will be a file containing an alphabetical listing of all the words,

and with each word, the number of times that word appeared in the document, and a list of the line

numbers on which that word was found. You must allow the user to select a file from a menu of

available files and save the results in a file named “[originalname][url removed, login to view]” where

[originalname] is the name of the input file without its extension. Here are the specific coding


 Create a UniqueWord class with the following attributes and methods:

o One string variable to contain the word being cataloged

o One vector of whole numbers containing the line numbers where this word was found

in the file

o One constructor that accepts a string and a line number, saves it in the string variable

and initializes the vector with the line number

o One method to add a line number (argument) to the current word’s vector of line


o One method to compare the current UniqueWord’s text to another UniqueWord’s text.

The function must return an integer value of +1 if the first argument sorts alphabetically

before the second, 0 if both strings are equal, and -1 if the second string sorts

alphabetically before the first. Use this function when searching the concordance vector

for new words.

o One toString method to format the word, its occurrence count, and its line numbers into

a single string for output in this format: word(occurrences): line, line, line, line, line

o Other variables and methods as necessary

 Create a Concordance class with the following attributes and methods:

o One vector of pointers to UniqueWord objects. The UniqueWord objects in this list must

be kept in ascending alphabetical order.

o One default constructor that initializes the vector list to be empty

o One method to reset the concordance to an empty list

o One method to add a word and line number to the concordance. This method must

determine whether the word already exists in the concordance. If it does, the word’s

line number must be added to the existing word’s list of line numbers. If the word does

not already exist in the concordance, a new UniqueWord object must be created and

initialized with the new word and its line number. Then the new UniqueWord must be

inserted into the concordance in its proper alphabetical location.

o One method to save the contents of the concordance to a user-specified file.

o Other variables and methods as necessary

 Create a menu-driven program that offers the user a list of available text files. The user will

select a file by name or by its number in the menu.

 The program must have a single Concordance object created from the Concordance class

described above. This object must be created or reset each time an input data file is opened.

 Open the user-selected file and read it line-by-line. For each line, parse the line to identify each

individual word, convert each word to lowercase, and remove all leading and trailing

punctuation. Do not remove embedded periods, hyphens, or apostrophes.

 For each word, use the Condordance object’s method to add the word to the concordance.  When the end of the file has been reached and all words have been cataloged, write the

contents of the concordance object to a new file, named “[originalfilename][url removed, login to view]”

where [originalfilename] is the name of the input file without its filename extension.

 Allow the user to repeat this process for as many input files as they want


 Each object must be defined within its own set of .h and .cpp files.

 Validate all inputs and do not proceed until valid values are entered.

 Format your source code according to the style guide presented in class.


 In the Concordance class, implement a binary search of the concordance vector to find a word in

the vector.

Data files (these were downloaded from [url removed, login to view])

[url removed, login to view] – A Modest Proposal by Jonathan Swift

[url removed, login to view] – Apology by Plato

[url removed, login to view] – The Wonderful Wizard of Oz by Frank Baum

[url removed, login to view] – The Adventures of Sherlock Holmes by Sir Arthur Conan Doyle

Turn in a single zip file containing your source code in one or more “.h” and “.cpp” files. Name the zip

file “First Last HW7”, where “First Last” is replaced with your First and Last names.

Habilidades: Programação C++

Veja mais: write the book you want to read, write a program for binary search, wizard of oz programming, want someone to write a book, vector vector string, vector strings, vector string, vector remove, vector of strings, vector in cpp, vector cpp, vector cplusplus, vector binary search, text to string, string vector, strings in c programming, string searching in c, string searching, string in cpp, string find c, string cpp, string cplusplus, source code for binary search in c, simple binary code, simple binary

Acerca do Empregador:
( 1 comentário ) fayetteville, United States

ID do Projeto: #6840010

Concedido a:


Hi,hope you are fine and doing great.i have seen detail and don't wanna waste your time to introduce [url removed, login to view] Expert and can do it [url removed, login to view] ready for this job right [url removed, login to view] give me this [url removed, login to view] you Rega Mais

$35 USD em 2 dias
(7 Comentários)

7 freelancers are bidding on average $34 for this job


Hi there- My name is imran.I am highly Expert in this field. I'll provide you satisfaction. So your time and money will be safe when you will award me project. take a look at my Freelancer Portfolio

$105 USD em 1 dia
(37 Comentários)

HI Contact me for an efficient, perfect, well documented development of your project according to 100% accuracy and requirements, with dedicated support. Thanks Farah Saif

$40 USD in 0 dias
(42 Comentários)

Dear sir, I have done many projects in C++ programming for student around the world and got some positive feedback from clients. You can check my profile for more information. Let me help you. I'm ready to get start Mais

$25 USD em 1 dia
(31 Comentários)

hello..........message me.i have very good experience....i can get this done on time..........waiting for your response........thanks & regards

$25 USD em 1 dia
(32 Comentários)

Hi , I can easily done your project with accuracy. I have four years of experience in C/C++. I have already done such types of projects both in C/C++.You consider it done from my side. Thanks. For further you may see Mais

$25 USD em 1 dia
(3 Comentários)

I am a C/C++ programmer. I can do this in 1 day. If you have any question don't hesitate to contact me.

$35 USD in 2 dias
(1 Comentário)

I have recently completed many projects like this. so I can help you also completing this one.

$56 USD in 5 dias
(0 Comentários)

A proposal has not yet been provided

$25 USD em 1 dia
(0 Comentários)