CSCE 2014 - Homework 6
Due Date - 04/29/2013 at 11:59 PM

1. Problem Statement:

The goal of this assignment is to give students experience with inserting data into binary search trees, and using these BSTs to print a subset of data in order. In particular, we will be reading the quarterback file from homework #2 QB.txt (or a version sorted by first name QB2.txt) and storing selected information about quarterbacks in our BST. Then we will be searching this BST to print out a subset of the quarterback objects based on a "range query". For example, to print all objects with (80.0 < Rating < 90.0). The detailed requirements are listed below.

Bonus [5 points]: If you have all of the above completed by the due date, you can add a command that allows the user to delete all objects that fall within a specified range [low .. high]. Show that your method works by printing out the BST before and after you have deleted several QB objects.

2. Design:

There are a number of design issues you must address to complete this project. For example, how to read the ascii file, what methods to implement for the QB class, how to modify the binary search tree class, and how to implement the user interface. As you make these decisions, try to keep your design as simple and clean as possible, and work incrementally. For example, your first version of the program may simply read the QB.txt file and print the 5 fields out. Your second version may read the file, store the data in QB objects, and use the QB.print method to print them out. The only design that will not work well is the "big bang" approach where you try to type the whole program in before you debug the components. This project is just too complex for this to be successful.

3. Implementation:

You can implement this program using either a bottom-up approach or a top-down approach. If you go for a bottom-up approach, start by creating basic methods and classes, and test theses methods using a simple main program that calls each method. When this is working, you can create the main program that uses these methods to solve the problem above.

If you go for a top-down approach, start by creating your main program that reads user input, and calls empty methods to pretend to solve the problem. Then add in the code for these methods one at a time. This way, you will get an idea of how the whole program will work before you dive into the details of implementing each method and class.

Regardless of which technique you choose to use, you should develop your code incrementally adding code, compiling, debugging, a little bit at a time. This way, you always have a program that "does something" even if it is not complete.

4. Testing:

Test your program to check that it operates correctly for all of the requirements listed above. Also check for the error handling capabilities of the code. Test your program and save your testing output in text files for submission on the program due date.

5. Documentation:

When you have completed your C++ program, write a short report (less than one page long) describing what the objectives were, what you did, and the status of the program. Does it work properly for all test cases? Are there any known problems? Save this report in a separate text file to be submitted electronically.

6. Project Submission:

In this class, we will be using electronic project submission to make sure that all students hand their programming projects and labs on time, and to perform automatic analysis of all programs that are submitted. When you have completed the tasks above go to the class web site to "submit" your documentation, C++ program, and testing files.

The dates on your electronic submission will be used to verify that you met the due date above. All late projects will receive reduced credit (50% off if less than 24 hours late, no credit if more than 24 hours late), so hand in your best effort on the due date.