[HOME] Math 127 (Policies) [Prev][Up][Skip][Next]

Programming Policy:

You are expected to have some experience with programming prior to this course, as most of the problem sets will include implementing an algorithm. The programs you write will not be fancy, but they will require that you be comfortable writing and debugging programs of perhaps two to three pages in length. The types of programming features you should know are:

The programs we write will not require complicated programming statements; the sophistication comes from the algorithms that we will implement, not the language features you will be using.

You are allowed to use whatever language you like, with the following caveats:

I like the first two because I can run them without compiling them, so we don't run into any compiler incompatibilities. If you are going to use a compiled language, I would prefer that you keep the code generic. In particular, I don't want it to have any IBM/PC graphics calls or mouse I/O dependencies.

Some of you may wish to use Mathematica to write your code. I would prefer you didn't since I'm boycotting it, but if you must, please be sure that your code works with version 4.0 as I do have access to this if I really need it. I do not have ready access to Maple or MATLAB, so I would prefer you not use these as your programming language.

When you turn in a programming assignment, you should include the following:

It is a good idea for your program to print out the values that were input (in which case, you can give me just the output). For example, if your program prompts for the coefficients of a polynomial and a value for a tolerance variable called "epsilon", and uses these to find an x-value where the polynomial is within epsilon of zero, your output might look like:

     Polynomial:  1 x^2 + -2 x + -5
     Root:  x = 3.449 (for an epsilon of .005)

If you are running on a Unix machine, you can capture the output of your program into a file using "redirection". For example, if your program is called hw1, then the command

    hw1 > hw1.out

will capture the output of your program into a file called hw1.out. (You can also store the input in a file and not have to retype it every time you run your program. For example

    hw1 < hw1.in > hw1.out

read the input from hw1.in and stores the results in hw1.out.)

You may be able to get a file that includes both the input and the output by using the script or enscript commands (see the man pages for more details).

[HOME] Math 127 (Winter 2002) web pages
Created: 06 Jan 2002
Last modified: Feb 17, 2002 5:05:58 PM
Comments to: dpvc@union.edu
[Next] Homework Policy
[Skip] Course Outline
[Up] Course Policies
[Prev] Office Hours