cs1311 spring 2001 100.0 points due 09:00:00 AM Feb 16, 2001 Please make sure that ALL essays, short answers, definitions, and explanations are in your own words. NO credit will be given for answers taken directly from the book, lecture notes, etc... Turn in this assignment electronically using WebWork NOTE: You may use any module/data type declarations from a previous problem from the same assignment when answering questions. [p1] 15.0 points Node definesa record data isoftype Num next isoftype Ptr toa Node endrecord Create a recursive module that will accept a pointer to a linked list of numbers and return the mean of the numbers. Hint: if you defined a record containing a sum and count, could this be a function? [p2] 15.0 points Player definesa record name iot String age iot Num jersey iot Num endrecord P_Node definesa record data isoftype Player next isoftype Ptr toa P_Node endrecord Create a recursive module that will accept a pointer to a linked list of players and delete all of the players younger than 30 from that list. [p3] 20.0 points We need to print a player listing in order of jersey number, using the declarations from p2. a. Write a recursive module that will insert an already-filled player record into a linked list of players. Your module must insert the new record in order of jersey number. Assume the list is already sorted based on the jersey number. b. Write a module that prints a player record. c. Write a module which prints all of the players in a linked list. Assume the list has been filled with proper player records. [p4] 20.0 points Assume that you have the code which implements a Queue as given in [Lecture notes pp 59-63] of Student_Recs. The declarations will be the same as the notes except the Node used will contain Student_Recs. You may also assume that a module exists for printing one Student_Rec: procedure Print_Student( s iot in Student_Rec) Write a recursive module which, given a Queue of Student_Recs, will pop each record off that Queue and print the record content. [p5] 30.0 points Assume that you have the Queue code in p4, and a procedure for filling a Student_Rec: procedure Read_Student( s iot out Student_Rec ) a. Write a module which will recursively ask the user for an action that can be specified as "Enqueue", "Dequeue", or "End". - If the action is "End", print all of the students remaining in the queue and then terminate the program. [Hint: look at p4.] - If the action is "Enqueue", fill a new Student_Rec and enqueue it onto your Queue. - If the action is "Dequeue", dequeue a Student_Rec and print it out. b. Write an algorithm that will define a Queue of Student_Recs, initialize it to be empty, and then call the module from part a. to manipulate the Queue. c. Show the printout when the user enters the following sequence of commands: Enqueue Fred 12345 3.4 Enqueue Mary 23456 2.8 Dequeue Enqueue George 13579 2.4 Enqueue Annie 24680 3.6 Enqueue Margaret 12472 4.05 Enqueue Joe 21537 3.7 Dequeue Dequeue Enqueue John 31530 1.8 End