HOMEWORK PROBLEM 2_5 INTRODUCTION TO Ada II 586.2 PURPOSE: To learn about records with discriminants and variants. The record type definition is relatively easy to master. The discriminant(s) are syntactically and semantically like the formal parameters of a procedure. The variant part is like a case statement where the executable statements are replaced by declarations. The complicated part of discriminants is the myriad of restrictions when creating and initializing objects of these record types. END RESULT: A package that allows the attached procedure to compile and execute correctly. PROBLEM: Consider a simplified problem of operating on geometric shapes for the purpose of producing drawings. Each shape has unique storage and processing requirements. Many operations on the shapes have common forms yet the detailed computations vary greatly. You are to provide a package to manipulate some simple geometries. The outline of several candidate packages is attached. You are to handle at least circles, triangles and rectangles. Your package must be able to draw the shapes at specified coordinates, expand the shapes and produce crude plotted output. In order to save typing, the full set of sample packages used in the lecture can be copied from PUSERS:[ADA.ADACLASS] These do not have to be used. You can solve the problem by any method you choose. TURN IN: Printout of compilation , the .LIS files ( with no errors!) in the order compiled. Printout of execution. OBSERVE: Aggregates used to initialize records with discriminants must contain the discriminant value(s). METHOD: Read either Barnes or the MIL-STD then build up the solution Incrementally. Just dumping in a bunch of code may cause so many diagnostics that the problem may never get solved. READING: BARNES 11.1 , 11.2 ANSI/MIL-STD-1815A 3.7