Question: use java code 1) Create a new java project with a Main class. 2) Create an interface Randomizable with one abstract method rand which should

use java code
use java code 1) Create a new java project with a Main

1) Create a new java project with a Main class. 2) Create an interface "Randomizable" with one abstract method "rand" which should generate a random instant of an object. 3) Create a generic class GList that contains an array to store a group of objects. GList accepts only generic types that are Randomizable. 4) Design GList in terms of states and methods to fit your needs in this HW. 5) Create a class "Thing" that is Randomizable and has an int value as a state. 6) In the class Main, create four different methods that scans the a GList with four different O(n) times: a. Constant b. Linear c. Quadratic d. Logarithmic 7) Justify analytically the times of your four methods in (6) 8) Use System.nanoTime() to measure CPU times for all four methods in (6). Here, you should run at least 10 experiments per each method. 9) For step (8) you need to gradually increase the size of the list from small to very large: 10 to 1000000 doubling the size each step. This will produce 20 steps. 10) Plot your results in (9) and compare them to the expected theoretical ones

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!