CSCI P545 Computer Science Department Indiana University Wed Feb 20 14:54:31 EST 2008 © [SDJ]

§P415 Homework Assignment

Part A

Write a program to reverse the contents of an array. Use whatever programming language you want. In addition to working data, your subdirectory must include these two files at top level:

  1. A self-contained, executable object named dut.

  2. (Optional for P415) A document named report.pdf

Program Requirements (dut)


 
test-in   test-out
1
2
3
4
5
 –dut–> 
5
4
3
2
1

 
For example, I might write a C program file called dut.c and compile with

% gcc -o dut dut.c
to obtain executable object, dut. To test this program, I'll create an ASCII file test-in.txt containing the characters: "1•2•3•4•5•" (`' stands for the Unix new-line character, so this file would display as depicted to the right). If I invoke dut with the command:
% dut < test-in.txt > test-out.txt
The result should be a text file test-out.txt containing "5•4•3•2•1•" It is important to implement this program exactly as specified because, in the second part of this assignment, other students will be "black-box testing" your dut using their own input and output files.

Instructions for Part A:

  1. In your working directory, design, implement and test your program. Name the resulting executable file dut.

  2. (Optional for P415) Keep a written journal of your design activities, paying particular attention to your thinking, "design process", including a systematic testing procedure.

  3. Include all testing files, scripts, etc., used during development.

  4. (Optional for P415) Include at the top level of your directory a document named report.pdf, summarizing your journal.

Part B

In the second part of this assignment, you will be given some number of executables to test. You will not be provided source code or documentation. The designs under test (duts) are a "black boxes" to be verified by execution on the your test-input files and observing the results.

In testing, your primary focus is correct execution of the dut. So at a minimum you must document the results of your functional testing.

However, you should also pay attention to performance questions, (size, speed, etc.). In particular, try to estimate time-of-execution as a function of input-file size.

Instructions for Part B:

All testing, results and documentation are to be included in your working directory. More details will be provided later.

Grading

Notes and Hints:


rev. Mon Jan 23 2006–SDJ