Numeric Array - Insert and Delete elements from Array (2007)

A class Rearrange has been defined to insert an element and to delete an element from an array. Some of the members of the class are given below:-

Class name                : Rearrange

Data members                                 

       a[ ]                      : integer type array 

       n                         : size of array (integer)

       pos1                    : position of insertion (integer )

       pos2                    : position of deletion (integer)

       item                    : item to be inserted (integer)

Member Functions/methods:

       void enter( )        : to enter size, array elements and to display the entered elements.

       void insert( )       : to accept element (item) to be inserted, position of  insertion and

  insert the element (item) at the position of insertion.

       void disp1( )       : to display array after item is inserted.

       void disp2( )       : to display array after item is deleted.

       void remove( )   : to accept the position of deletion and delete element (item) at

   the position of deletion.

 

Specify the class Rearrange giving details of the functions void enter(), void insert(), void disp1(), void disp2( ) and void remove( ). The main function need not be written.