The George Washington University
School of Engineering and Applied Science
Department of Electrical Engineering and Computer Science
CSci 51 -- Fall 1998
Project #1
Due Date: start of class, Thursday, 10 September 1998

The purpose of this project is to help you become familiar with the GNAT compilation system and the editor on felix (the Sun/Solaris server in the SEAS Computing Facility).

The first part will help you to become familiar with the compilation system.

Part 1:

Compile, link, and execute the programs from Chapter 2. Note that all the programs in the book are available to you in the programs51 subdirectory. Each program's file name is the same as its program name, except that the file name is in lower case. (Example: the program Distance, Program 2.5, is in the file distance.adb.) Choose one of the last few programs to compile, link, and execute with "turnin" running.

You will find that all the programs compile without errors except Program 2.10. Print out and turn in the listing file from Program 2.10, showing the error messages given by the compiler. Second, correct the compilation errors in Program 2.10; then, print out and turn in the corrected listing file from Program 2.10

The second part will help you learn to use the software development method as discussed in Chapter 2.

Part 2:

Problem: You are taking a vacation in the beautiful country of LaLa Land. You rent a car there, and you're driving on the highway. Then you notice that the distances are measured in furlongs. Each furlong is 1/8 mile (really!).

Not only that, but speeds are measured in furlongs per fortnight (fpf). Each fortnight is two weeks or 14 days (really). The highway speed limits are, of course, given in these units.

Worse still, the speedometers on the cars show miles per hour (mph) as is used here in the United States. So how do you know if you are exceeding the speed limit?

What you need is a quick calculator program, so that if your speedometer reads, for example, 65 mph, you can input this number and the calculator will tell you immediately what your speed is in fpf, so you can compare it with the speed limit signs.

Your job is to design and code such a program, testing it with some typical highway speeds. For details on what to turn in, please read the handout Preparation and Grading of Programming Projects: the Importance of Professionalism.