------------------------------------------------------------------------------ -- -- -- GraphADT simulation program -- -- -- -- AUTHOR: Robert Walsh -- -- DATE: November 14, 1995 -- -- CLASS: CSCI 375 - Fall - SCSU -- -- -- ------------------------------------------------------------------------------ with TEXT_IO; package INTEGER_IO is new TEXT_IO.INTEGER_IO(INTEGER); with TEXT_IO, INTEGER_IO; use TEXT_IO, INTEGER_IO; with Graph; procedure Prog4 is --WHAT: Allows user to perform operations on a graph. The program --provides a menu in which the user may select these operations from. --IN: None --OUT: None type EdgeData is record From, To, Weight : INTEGER; end record; subtype NodeData is CHARACTER; function Less(X1, X2 : EdgeData) return BOOLEAN; function Equal(X1, X2 : EdgeData) return BOOLEAN; procedure PEdge(X : EdgeData); procedure Extract(Data : in EdgeData; From, To, Weight : out INTEGER); procedure Insert(Data : out EdgeData; To, Weight : in INTEGER); procedure Print(Data : in NodeData); package NewGraph is new Graph(EdgeData, NodeData, Less, Equal, PEdge, Extract, Insert, Print); use NewGraph; Graph : GraphADT; Quit : BOOLEAN := FALSE; Item : INTEGER; function Less(X1, X2 : EdgeData) return BOOLEAN is --WHAT: Determines if the first number [X1] is less than the second [X2]. --IN: X1 [INTEGER] : The first number to be compared with X2. -- X2 [INTEGER] : The second number to be compared with X1. --OUT: [BOOLEAN] : TRUE if X1