CS 328 Programming Assignments


Objective of Programming Assignments

The objective of the programming assignments is to reinforce the understanding of the algorithms and analysis of the algorithms studied in class.

Format for Programming Assignments/Standards

Each programming assignment must consist of header comments. Header comments are comments that appear at the beginning of the source code, before anything else.

The header includes the following information:

Input: When accepting input from the keyboard, you must prompt the user before each value desired.

You must echo the input in the output. Thus, if you read in the number of feet (27.6), you must output something like You entered 27.6 feet

Common OutputAt the start of every program, your program must output the following information:

Each item listed above must be output on a separate line.

Turning in your programs

Your programs will be submitted electronically using turnin.

On the command line type turnin

Select cs328 , then the appropriate assignment. The turnin program will automatically compile your program and run it with the input that has been pre-specified. A copy of your source program and the output produced by executing your program will be recorded by turnin.

Reports associated with programs will be submitted via D2L.


Unless otherwise specified, assignments are due before the beginning of class on the day specified. No assignments will be accepted that are time/date stamped later than the specified time.

The programming assignments that include an analysis portion must be prepared using a word processor and submitted at the beginning of class on the specified due date.

Assignment Grading You must turn in whatever you have done by the specified submission time, whether or not the assignment is complete.

Turnin will only make a copy of your source code if it compiles . Therefore, it is strongly recommended that you do not add a lot of code without compiling and testing. Add a little code, then compile and test it. That way if you do not complete the assignment, your partial grade will be higher because I can see how much work you have completed. If the source does not compile, I have no way of knowing and can only grade it as a zero.

Testing

In industry, a program that does not produce its specified output is not worth anything. Now is the time to learn to test your program. Just because your program turns in does not mean that it is correct. You must test your program. Partial credit for programs that do not perform correctly will be given sparingly. It doesn't matter how minor the error is, an error is an error.



C++ 2-Dimentional Array Example

Assignment Schedule

Assignment Topic Assignment Due Date
Find key in n x m array O(lgn+lgm) time Divide and Conquer February 14
Shortest Path Dynamic and Greedy March 13
Sum-of-Subsets Backtracking March 27
Comparison of Mergesort, Heapsort, and QuickSort Sorting Analysis April 22
Maximum Difference Maximize difference in subarrays of an array May 1 at 11:00 a.m.

This page is maintained by Barbara Bracken Last Modified 8:00 PM 04/21/2024