HOMEWORK PROBLEM 6 INTRODUCTION TO Ada 95 PURPOSE: To learn about generic packages Writing generic packages allows future users of the package to choose their own types. This is a great benefit to users applying strong typing. END RESULT: A complete Ada program that is a main procedure that WITH's and instantiates a generic package you write. The generic package must sort many types of arrays ( but may not be very robust and uses the slowest known method of sorting. PROBLEM: Using the attached example GENSUMPKG that contains a dumb generic package to add up the elements of an array, and using the attached example of a non generic sort , NON_GENERIC_SORT_PACKAGE , modify NON_GENERIC_SORT_PACKAGE.ADA to be a generic package and modify the main procedure NON_GENERIC_SORT_DEMO to make use of the generic version of NON_GENERIC_SORT_PACKAGE. TURN IN: Printout of source code for main procedure and package Printout of execution for built in test data. OBSERVE: There are relatively few changes. But, be careful the changes are very subtle. ECLUS::DISK2:[ADA.ADA95] and ftp://sigpro.md.essd.northgrum.com/pub/ada95 contains the examples if you wish to use them. READING : ISO 8652:1995 all of chapter 12. Don't worry if you do not understand everything. There may be a dozen people in the world that understand the complete chapter. Reread 12.1, 12.1.2 and 12.2 after you complete the homework. BARNES : read all of chapter 17 on generics. EXTRA : For extra credit generalize the generic package to work when the range of INT_ARRAY can be anything allowed, including an enumeration type. The color types make a good test case for extra credit.