Question: Java program. 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
Java program.
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.
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.
11-Screen-capture your testing and save images in project folder.
12-Compress project folder to a zip file.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
