CSCE 2004 - Homework 4
Due Date - 11/05/2013 at 11:59 PM

1. Problem Statement:

The primary goal of this programming assignment is to give students experience working with arrays and using functions. You will start with hw4.cpp which is a simple menu-based program for processing an array of integers. As you can see, the main function contains a loop and a switch statement that process user commands. This program has one function to print the command menu and read the user's input. Two array processing functions have also been implemented for you:

Your task is to complete this program by adding TEN new functions to perform the following operations:

The main program must also be extended to include calls to each of the ten functions you have created. Once you are finished you will have a menu-based program to do some interesting array operations.

2. Design:

For this assignment, your first design decision is to figure out what parameters and return types to use for each of the functions above. There are lots of options here. Your goal should be to make your code easy to read, understand, and use.

Your second design decision is to figure out the algorithms necessary to implement each of the operations above. Some are fairly trivial and have been discussed in class or the lab. Others will require some reading in the book or some digging through the CSCE 2004 sample source code on the class website. Remember, you ARE allowed to use any code we have posted on the CSCE 2004 website, but you are NOT allowed to copy code from the web or other outside sources.

3. Implementation:

Since you are starting with our sample program, you already have something that compiles and runs. Since you must add several features to this program, it is important to make these changes incrementally one feature at a time, writing comments, adding code, compiling, and debugging. 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. Try your program with several input values, and save your testing output in text files for inclusion in your project report.

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 "upload" your documentation (a single pdf or txt file), and your C++ program (a single cpp or txt file). Do NOT upload an executable version of your program.

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:

You will receive partial credit for all programs that compile even if they do not meet all program requirements, so handing projects in on time is highly recommended.