Question
This question is for Object-Oriented Java, Objects First with Java 6th edition by David Barnes and Michael Kolling. Chapter 12, exercise 12.59 Write a class
This question is for Object-Oriented Java, Objects First with Java 6th edition by David Barnes and Michael Kolling. Chapter 12, exercise 12.59
Write a class that can make comparisons between the efficiency of the common methods from the List interface in the ArrayList and LinkedList classes such as add, get, and remove. Use the polymorphic-variable technique described above to write the class so that it only knows it is performing its tests on objects of the interface type List rather than on the concrete types ArrayList and LinkedList. Use large lists of objects for the tests, to make the results significant. You can use the currentTimeMillis methodof the System class for getting hold of the start and finish time of your test methods.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started