I am now taking time to go over ArrayList and LinkedList to check for errors and improve the methods and clarity. I have added a toString method to help with testing and corrected the constructor which incorrectly had void as output data type
correct size() method so isEmpty() now seems to work
added toString method to ReturnObjectImpl so can test whether correct error messages are being obtained for different inputs. Added a few more tests on empty array, all seems to be working so far
changed size() method as realised only want size to increase if an element in the array is not equal to an empty string
made another minor change to size method as previous change made method enter an infinite loop.
previous commit change didn't fix infinite loop. infinite loop is now fixed
changed while loop into a for loop in size() method so can get rid of unnescesary position variable