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

The purpose of this project is to help you become more familiar with the basics of Ada and especially the IF statement. You should be reading Chapter 4 by now; everything you need to do this project will be in chapters 1-4.

Many states have recently raised the speed limits on some of their highways. The state police would like to collect statistical data on the actual speeds of cars under the new laws, and have hired us to develop a computer program to help them. In the next few projects, we will design and build such a program. The first step, Project 3, is to write and test a function to classify a speed into one of the following classifications:

For this project, declare the function inside a main program, by analogy with Program 4.6. The main program's declaration part should contain these declarations:

and the main program should test the function according to a test plan you design. For each test, input a speed from the user, call the function to classify it, and display the classification using an instantiation of Ada.Text_IO.Enumeration_IO.

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