Question: must be done in java Question#1 In the GoF book, List interface is defined as follows interface List int countO; //return the current number of

must be done in java
Question#1 In the GoF book, List interface is defined as follows interface List int countO; //return the current number of elements in the list Object get(int index); /return the object at the index in the list Object first0; /return the first object in the list Object lastO; /return the last object in the list boolean include(Object obj); /return true is the object in the list void append(Object obj); //append the object to the end of the list void prepend(Object obj); //insert the object to the front of the list void delete(Object obj); /remove the object from the list void deleteLast); /remove the last element of the list void deleteFirst); //remove the first element of the list void deleteAllO; /remove all elements of the list (a) Write a class adapter to adapt Java ArrayList to GoF List interface (b) Write a main program to test your adapters through List interface (c) Same requirement as (a) and (b), but write an object adapter to adapt Java ArrayList to GoF List interface
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
