The George Washington University
School of Engineering and Applied Science
Department of Electrical Engineering and Computer Science
CSci 51 -- Fall 1998
Project #5
Due Date: start of class, Tuesday, 13 October 1998

This project depends upon Chapters 1-5, and provides experience with writing loops, and with file redirection.

Part 1:

Write a Spider program Checker_Board, which causes the spider to draw a checkboard pattern on the screen, like

# # # #
 # # # #
# # # #
 # # # #
 

Use loops wherever appropriate. No case study is necessary for Part 1. Once the program is working correctly, make the output of the program a comment in the program and rerun again.

Part 2:

Revise Project 3 so that a series of 25 speeds is processed as follows.

Instead of reading the speeds from the keyboard, create a file of 25 speeds -- call it, say, speeds.dat -- with an editor, one speed per line in the file, and use input redirection to read and process the 25 speeds. In addition to classifying each speed and displaying its classification, find the minimum, maximum, and average speeds, and the number of speeds in each class.

If your program is called speeds.exe, using input redirection you can process the speeds by

gexecute speeds.exe <input_speeds.dat

This program will be much easier to do correctly if you design the algorithm carefully before starting to code! Remember, that a speed of zero is not in any of these classes. Program output should be formatted as follows:

SPEEDS STATITSTICS PROGRAM, NAMED speeds

Class Name   Average   Maximum   Minimum   Number of Speeds
==========   =======   =======   =======   ================
CLASS1           999       999       999                999
...
CLASS6           999       999       999                999

As usual, submit the Case Study document, a printout of the listing file, and a test run executed with turnin.