December
    1999 QUESTION 5 Total Marks: 15 Marks  | 
    Click here to access other
    questions
          
     Click to access  | 
  
|  
           Consider the following abstract data type declaration for an IntegerList type: 
 
  | 
      |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| (a) | 
           Explain the difference between deep and shallow (or member-wise) copying of objects. 
  | 
         
           [3]  
         | 
      |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| (b) | 
           Write a constructor function for the IntegerList class which performs a deep copy of the object.You may not use any library functions. 
  | 
         
           [6]  
         | 
      |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| (c) | Write 
          a function Reverse ,the signature of which is given below,which takes 
          an IntegerList object and returns a new IntegerList which is the reverse 
          of the original IntegerList .You may not use any library functions. IntegerList Reverse(IntegerList s);  | 
         
           [6]  
         | 
      |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||