/**
 * A proper way to create a class (without the main method)
 *
 * Create a random number generator class
 * This class only has static fields and static method
 * 
 */

public class Randm 
{
    static int    minimum;                          //static fields
    static int    maximum;                  
    static double randGenerated;                        
    static int    rand;                     


    static int generate(int min, int max)           //static method that takes min, max     
    {
        minimum = min;
        maximum = max;

        rand = compute();
        
        return(rand);
    }

    static int compute()                            //static method to compute random number     
    {
        randGenerated = Math.random();
    
        rand = (int) (randGenerated * (maximum-minimum+1) );    //random distribution over max-min
        rand = rand + minimum;                                  //add the minimum value

        return(rand);
    }

    static String dump()                            //static method that returns everything     
    {
        String s = "Random number from: "  +  minimum  + " to: " + maximum + "\n" + 
                   "raw: " + randGenerated + " is--> " + rand;            
        return(s);
    }
}