Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

JAVA QUESTION CAN YOU PLEASE RE-CODE THIS IN SOME OTHER STYLE? I WANT A CODE THAT DO THE SAME THING AS THIS ONE BUT IN

JAVA QUESTION

CAN YOU PLEASE RE-CODE THIS IN SOME OTHER STYLE? I WANT A CODE THAT DO THE SAME THING AS THIS ONE BUT IN A DIFFERENT WAY (LIKE WHILE LOOP IS USED INSTEAD OF FOR LOOP) PLEASE HELP ASAP :)

UnOrderedArray dataset50_copy1 = new UnOrderedArray(50); UnOrderedArray dataset50_copy2 = new UnOrderedArray(50); UnOrderedArray dataset50_copy3 = new UnOrderedArray(50); UnOrderedArray dataset50_copy4 = new UnOrderedArray(50); UnOrderedArray dataset1K_copy1 = new UnOrderedArray(1000); UnOrderedArray dataset1K_copy2 = new UnOrderedArray(1000); UnOrderedArray dataset1K_copy3 = new UnOrderedArray(1000); UnOrderedArray dataset1K_copy4 = new UnOrderedArray(1000);

UnOrderedArray dataset10K_copy1 = new UnOrderedArray(10000); UnOrderedArray dataset10K_copy2 = new UnOrderedArray(10000); UnOrderedArray dataset10K_copy3 = new UnOrderedArray(10000); UnOrderedArray dataset10K_copy4 = new UnOrderedArray(10000);

UnOrderedArray dataset100K_copy1 = new UnOrderedArray(100000); UnOrderedArray dataset100K_copy2 = new UnOrderedArray(100000); UnOrderedArray dataset100K_copy3 = new UnOrderedArray(100000); UnOrderedArray dataset100K_copy4 = new UnOrderedArray(100000); UnOrderedArray dataset1M_copy1 = new UnOrderedArray(1000000); UnOrderedArray dataset1M_copy2 = new UnOrderedArray(1000000); UnOrderedArray dataset1M_copy3 = new UnOrderedArray(1000000); UnOrderedArray dataset1M_copy4 = new UnOrderedArray(1000000); for(int x = 0; x < 50; x++){ dataset50_copy1.addLast(coreData.getItem(x)); dataset50_copy2.addLast(coreData.getItem(x)); dataset50_copy3.addLast(coreData.getItem(x)); dataset50_copy4.addLast(coreData.getItem(x)); } for(int x = 0; x < 1000; x++){ dataset1K_copy1.addLast(coreData.getItem(x)); dataset1K_copy2.addLast(coreData.getItem(x)); dataset1K_copy3.addLast(coreData.getItem(x)); dataset1K_copy4.addLast(coreData.getItem(x)); } for(int x = 0; x < 10000; x++){ dataset10K_copy1.addLast(coreData.getItem(x)); dataset10K_copy2.addLast(coreData.getItem(x)); dataset10K_copy3.addLast(coreData.getItem(x)); dataset10K_copy4.addLast(coreData.getItem(x)); } for(int x = 0; x < 100000; x++){ dataset100K_copy1.addLast(coreData.getItem(x)); dataset100K_copy2.addLast(coreData.getItem(x)); dataset100K_copy3.addLast(coreData.getItem(x)); dataset100K_copy4.addLast(coreData.getItem(x)); } for(int x = 0; x < 1000000; x++){ dataset1M_copy1.addLast(coreData.getItem(x)); dataset1M_copy2.addLast(coreData.getItem(x)); dataset1M_copy3.addLast(coreData.getItem(x)); dataset1M_copy4.addLast(coreData.getItem(x)); }

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design Using Entity Relationship Diagrams

Authors: Sikha Saha Bagui, Richard Walsh Earp

3rd Edition

103201718X, 978-1032017181

More Books

Students also viewed these Databases questions

Question

=+What is the most that you should pay to complete development?

Answered: 1 week ago

Question

=+development and make the product, should you go ahead and do so?

Answered: 1 week ago