the randomset class works but i am having trouble trying to get the randomsetTest class. i have 2 errors in the randomSetTest. its complaining about my "Randomset" saying it does not recognise this. Another error is that its saying subtract smallest in RandomSet cannot be applied to an int. below is the code for the RandomSet and RandomSetTest programs

import java.util.Random;

public class RandomSet
{
private double[] my_array;

public RandomSet(int size, long seed)
{

my_array = new double[size];

Random r = new Random(seed);

for(int i = 0;i<size;i++)
{
my_array[i] = r.nextDouble();
}
}

public double get(int i)
{
if(i>=0 && i<my_array.length)
{
return my_array[i];
}
else
return -1.0f;
}

public double getSum() // this function returns the sum of all the numbers in the array
{
double sum = 0.0;
for(int i = 0;i<my_array.length;i++)
{
sum += my_array[i];
}
return sum;
}
public void addNumber(double x) // this function adds x to each element of the array
{
for(int i = 0;i<my_array.length;i++)
{
my_array[i] = my_array[i] + x;
}
}

public double getSmallest()
{
double smallest = 1.0;
// returns the smallest number in the array
for(int i = 0;i<my_array.length;i++)
{
if(my_array[i]<smallest)
{
smallest = my_array[i];
}
}
return smallest;
}


public void subtractSmallest() // subtracts the smallest number in the array from
{
double x = getSmallest();
for(int i = 0;i<my_array.length;i++)
{
my_array[i] = my_array[i] - x;
}
}



}




import java.util.Random;


public class RandomSetTest
{


/** Tests the methods of the RandomSet class */



public static void main(String[] args)
{
RandomSet arraySet = new RandomSet();
arraySet.addNumber(100);
arraySet.subtractSmallest(90);
System.out.println(arraySet.getSum());
}
}