The purpose of this project is to help you become more familiar with the basics of Ada and especially the IF statement. Also, up till now you have been using packages; in this project you will write one of your own. 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 4, is to write and test a package, Speeds, that provides a function to classify a speed into one of the following classifications:
For this project, declare a package specification by analogy with Screen, Spider, and Min_Max. The specification (speeds.ads) file will contain these declarations:
The package body (speeds.adb) will contain:
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.