CMSC 104, Fall 2010

Homework 4

Arrays Lab

Out: Tuesday December 7, 2010
Due: Before 11:59 PM on Monday, December 13, 2010
Note that late homeworks will NOT be accepted.

Objectives:

To become familiar with

Assignment:

  1. Copy the Template File

    Change into your pub/www/cs104/hw4 directory. Execute the following command to copy the template file from my directory to yours

    		cp  /afs/umbc.edu/users/d/b/dblock/pub/CS104/hw4.html  .
    	      

    Note that the CS in CS104 is capitalized. Also, do not forget the '.' at the end of the command.

  2. Write the Program

    Open the file and follow the directions given in the comments throughout the script. Add code below each of the comments one step at a time. Check your work incrementally as you go. You should add any additional variable declarations or statements you find necessary. Make sure you add a file header comment per the class standards.

  3. Test the Program

    Make sure to test your program with multiple sets of numbers. Try 5 positive numbers, 5 negative numbers and then a mix of positive and negative.

  4. Try Changing the Array Size

    When you are finished testing your program, try changing the size of the array and see if the program still works correctly. You should only have to change the size in one place.

  5. Sample Output

    Your output need not look the same as the sample but should include the same information.