CSE 250 - Fall 2008 - Banner
UB -
University at Buffalo, The State University of New York Computer Science and Engineering
  • CSE 250 - Fall 2008
CSE 250 - Fall 2008 - Navigation

Project 2
Last modified: October 27 2008 11:06:50 AM

CSE 250 - Fall 2008 - Announcements

For this project, you are allowed to work with a partner. You can choose to work with at most one person for the entirety of the project. If you work with another person, both names should appear in the solution, however, EACH OF YOU NEED TO SUBMIT the assignment.

Description

Your job for the assignment is to create the file that you were given as input to the last project and use a hash table and the standard map to do it to compare results.

Your first task once again is the ability to read in a file specified by the user. You will extract the words from a file and begin to build a frequency table using both a hash table and an STL map. You should not attempt to code the hash table yourself, but rather, find an implementation of a hash table to use - the implementation from the book is perfectly acceptable.

Your program will then compare the time it takes to insert the file into the hash table and the map in system time and you will discuss the results of this in a discussion paper.

More Details

The file you will produce should be formatted in the way described in the previous project. Each line will contain a word/frequency pair. The word will be first on the line followed by a space, followed by the frequency count of the word.

Example file:

for 12
not 150
cat 45
raccoon 567

Words are sequences of characters without white space. Treat other characters as you see appropriate. You can safely ignore punctuation within sentences. However, the words it's and its should probably not be different things. Please note that this is not an exercise in parsing. If you think about parsing carefully, there are many issues involved in trying to read in a file. Assume that your files are the text of a book (like those available online from the Guttenberg project), so you won't have a lot of strange characters in the text, but there are some that may appear.

User Interface

The user interface to your program must provide the following functionality:

  • Load a file to be parsed into a hash table to create frequency counts, after complete time is listed
  • Load a file to be parsed into an STL map to create frequency counts, after complete time is listed
  • Write the words and frequency counts to a file

Testing

You should test your program with various inputs. You can create the test files yourself.

You should create a test plan for this program. It is perhaps highly advisable to create a base test plan before you begin coding so that you can use it to form a strategy for implementation.

You should write up your test plan and your test cases in a file named testing.txt that you will submit with your project. You should make note in this file if there are any bugs found in your testing that you were not able to fix for the final submission.

Disscussion

After you have completed the program and tested it, you should create a file called discussion.txt in which you will write a response to the project. Did one structure function faster than the other? Were there specific types of files that performed better on one structure than the other? Which solution was easier to implement?

This document should include enough information to prove that you completed the project


What to submit

You should put all of your files in a directory named project2 and zip them creating a project2.zip file. You should submit this file using the electronic submission command.

Your zip should contain all of your .cpp and .h files, a description of the testing of your program in a file named testing.txt, a discussion file named discussion.txt, as well as a makefile. You should also include a file named README that gives the name of the executable that is created when make is run as well as any pertinent user interface issues that the grader should be aware of when grading your submission. Failure for the grader to be able to use and grade your program will result in an automatic grade of 0 on this assignment.

Note also that your program MUST compile and run on our systems using your makefile or your grade on the project will be an automatic 0.


Due Date

All files for this assignment need to be submitted by 11:59:59pm on Sunday, November 9, 2008.

CSE 250 - Fall 2008 - Footer

Page maintained by Adrienne Decker

Contact: adrienne@cse.buffalo.edu | 130 Bell Hall | (716)645-3180 x 161