Question: Use inheritance to use the array list class to generate the generics ArrayList Design Consider the original ArrayList class of Java versions earlier than J2SE

 Use inheritance to use the array list class to generate the
Use inheritance to use the array list class to generate the generics

ArrayList Design Consider the original ArrayList class of Java versions earlier than J2SE (i.e., before the introduction of Generics (ArrayList). a) Design and Implement the class using Array. Implement only the constructors: ArrayList() and ArrayList(int initialCapacity); and the add(int index, Object o). b) Design and implement four test cases to validate your program. c) Comment on the performance of the add method to the performance of insertion in an Array. d) Modify your design to include the concept of Generics

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!