HOMEWORK PROBLEM 2_7 INTRODUCTION TO Ada II 586.2 PURPOSE: To learn more about access types, balanced binary trees, and reading disk files. END RESULT: A complete Ada program that is a main procedure that WITH's a package containing the binary tree manipulation routines INSERT,FIND,DELETE from HW2_6. PROBLEM: Write an Ada main procedure to read PUSERS:[ADA.ADACLASS]HW2_7.DAT . This file can be read by TEXT_IO using OPEN and GET_LINE. The name comes first with one blank, then the phone number. Put the information in your binary tree. Then run the program interactively, giving a name and getting a phone number back. With an auto dialer, you could type in a name and automatically phone the person or computer. TURN IN: Printout of compilation of main procedure and package ( with no errors!) Printout of execution for some built in test data. OBSERVE: These tree manipulation routines are messy if recursive procedures and functions are not used. These happen to be in the class of "simple" recursive routines that can be thoroughly tested to be sure they terminate. READING : MIL-STD-1815A 3.8 plus use the index for all references to "access" Barnes 11.3 EXTRA : For extra credit make the INSERT and DELETE work to maintain a balanced binary tree. This uses the balance factor BF. The INSERT is not too difficult but the DELETE is a bear! It turns out that just plain binary trees are very inefficient. But, balanced binary trees are very efficient. If the tree is maintained in balanced form at most log2 N searches are needed for an INSERT, FIND or DELETE. On a Baltimore phone book N is a large number! An unbalanced tree could be the worse possible structure if the names were entered alphabetically. Zzepth could be all day checking his phone number. FORTRAN routines ( for samples ) are on PUSERS:[ADA.ADACLASS]BTINSR.FOR BTDEL.FOR NOTE: The files TACCESS*.ADA on ECLUS::PUSERS:[ADA.ADACLASS] are a sequence of approaches for various styles of use of access types with tree structures.