implemented setSize and copy assignment operator in array