Question
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
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