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. The first step in Project 3 is to write and test a function to classify a speed into one of the following classifications. Do this first before you write the rest of your code.You should include a separate test plan, test code, and turnin file for this function.
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:
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.
You main executable program will be a data entry program. Users will enter speeds. When the user has finished entering speeds, your program will produce a well formatted read-out of how many speeds were entered for each class.
As usual, submit the Case Study document, a printout of the listing file, and a test run executed with turnin.