Program that count the number of unique words in a file

Assignment Help C/C++ Programming
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

Reference no: EM132248155

Questions Cloud

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.

Reviews

len2248155

3/5/2019 12:54:23 AM

Grading Criteria: The program compiles. If the program does not compile no further grading can be accomplished. Programs that do not compile will receive a zero. (25 Points) The program executes without exception and produces output. The grading of the output cannot be accomplished unless the program executes. (25 Points) The program produces the correct output. (25 Points) The program specifications are followed. 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”.

len2248155

3/5/2019 12:54:17 AM

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. (10 Points) The program is documented (commented) properly. (5 Points)Use constants when values are not to be changed (5 Points)Use proper indentation (5 Points)Use good naming standards.

Write a Review

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd