MyList.java contains MyList interface. The implementations of the default methods addAll, removeAll, retainAll, toArray(), and toArray(T[]) are omitted in the MyList interface. Please implement these methods.

computer science

Description

MyList.java contains MyList interface. The implementations of the default methods addAll, removeAll, retainAll, toArray(), and toArray(T[]) are omitted in the MyList interface. Please implement these methods. MyArrayList class implements MyList interface and inherits those default methods even though you don’t implement them in MyArrayList.java file. 


Note that you can utilize other methods defined in the MyList interface to implement those methods. Since those methods should be implemented beforehand in MyList.java, the MyArrayList.java file should not be modified.


Notes 

• Test your program with Test.java and other different inputs you created by yourself. 

• Make a folder called Assignment3, put only your source codes in that folder, zip the folder and submit the zip file to the Moodle.


Related Questions in computer science category