## Compare the performance of ArrayList, Vector and ordinary arrays. You should do a series of experiments where you do each of the following tests with the three types of collection, timing the execution of each run. You should run each case several times on the same computer to obtain stable average timings.

Compare the performance of ArrayList, Vector and ordinary arrays. You should do a series of experiments where you do each of the following tests with the three types of collection, timing the execution of each run. You should run each case several times on the same computer to obtain stable average timings.

(a) Construct very large collections by putting random integers into each collection one at a time. The random integers should range in value from zero to nine. You should make each collection large enough so that the run takes at least 10 seconds to add the integers in the case of an ArrayList. You will have to do some initial experiments to find out what is a good size. You would use the same size of collection for ArrayList, Vector and the array. The ArrayList and Vector can be created by successively adding items and allowing them to grow, while the array has to be created at its full size and then populated with its contents. You could also try to experiment with the case where you do create the ArrayList and Vector initially with their full size.

(b) Construct very large collections as in (i). Then use iterators to sum the elements. Subtract the construction time to get a measure of how much time the iteration takes. Use a for loop for the array, and an Iterator for the Vector and ArrayList.

(c) Again, construct collections as in (i). Then iterate through the collections removing all the even numbers. Subtract the construction time to get a measure of how much time deletion takes. You can only easily do this for Vector and ArrayList.

(d) Once again, construct collections. Then iterate though them adding an extra element after every number 9 encountered. Subtract the original construction time to get an idea of how long adding elements randomly into collections takes. You can only easily do this for Vector and ArrayList.

Write up the results of your experiments as a formal laboratory report. Present your data in suitable tables, and draw conclusions from an analysis of the data. From your conclusions, develop recommendations to designers.

### It was one of the most emotional legal meetings I have ever had with a client.

It was one of the most emotional legal meetings I have ever had with a client. Under the pressure of a major lawsuit, a husband and wife were desperate to….

### Assignment reusable straws – Marketing Management In the past couple of years, the global shift toward selling and buying more eco-friendly products seems to have accelerated.

Assignment reusable straws – Marketing Management In the past couple of years, the global shift toward selling and buying more eco-friendly products seems to have accelerated. In virtually any industry,….

### What is the primary difference between Backup Speed and Restore Speed?

What is the primary difference between Backup Speed and Restore Speed? Q20:  Design and performance of a Call Center. In a call center there are M customer service representatives. Arriving calls are sent to….