Reference no: EM132248155
Programming Assignment -
Description: This assignment is an exercise in using a moderately complex class (provided for you) and using those classes and objects to count the number of words in a file, count the number of unique words in a file, and alphabetize those words and print a report.
Programming Specifications:
Task: Two files have been provided (wordcounter.h and wordcount.cpp). You must open a text file, read in each word until end of file, add each word to the WordCount library and print the report.
- You will have a driver program that is named using your JSUID as part of the file name. (Example cco10lab5.cpp)
- Your driver program will include "wordcounter.h"
- Your program must request a filename of a text file that contains words to count. You must check to see if it is a valid file and issue an error message if not and request a new file name until a valid one is entered.
- You must have at least one function that either passes in a parameter and at least one function that returns a value. You can have a single routine that does both.
- You must declare the class object properly, use AddWord() to add the word to the catalog and use PrintSummary() to produce the output.
Design Considerations:
1. The file will contain only words (no punctuation or special characters) less than or equal to 13 letters. There will be no limit to the number of words.
2. You must open the file and read each individual word using standard input (cin) until the end-of- file is detected calling AddWord() class member function to add the word to the class library.
3. The file must be closed properly.
4. You must use three separate files in your design (1) Your driver program, "wordcounter.h", and "wordcounter.cpp".
General Requirements:
1. No global variables, other than constants!
2. Use the const qualifier on member functions wherever it is appropriate.
3. You will need to use the <iostream> library for output
4. You must include the wordcounter.h file in your program and compile the wordcount.cpp file along with your driver file.
Attachment:- Assignment Files.rar
Identify strengths and weaknesses in your thought process
: Identify the strengths and weaknesses in your thought process with this project. What did you learn from doing this project? Where there bias' in your thinking?
|
Discuss the impact on medication preparation
: In this written assignment, select one cultural factor such as health beliefs, language, perception of time, environment control, etc. (see textbook reading).
|
Does doctor have the right to refuse elective abortion
: Does a doctor have the right to refuse an elective abortion? What about an emergency abortion?
|
Describing a code out of the section
: What advice would you give to someone who is struggling with coding for the Obstetrics section? What are some of the things he/she should be mindful of?
|
Program that count the number of unique words in a file
: CS231 Programming Assignment - Count the number of unique words in a file, and alphabetize those words and print a report
|
How is leadership effective in organization
: How is leadership effective in an organization? What are some mistakes a leader can make in an organization?
|
Did corzine act appropriately
: Did Corzine act appropriately? How would you characterize his behavior legally, ethically, and managerially? What other choices did he have?
|
What is the equilibrium price and quantity in market
: What is the equilibrium price and quantity in this market? What is producer surplus?
|
How is the article related to the field of management
: Pick an article from the Savannah Morning News, Wall Street Journal, Atlanta Journal-Constitution or any other business publication.
|