package csci3366.hw3; /** * Class for simple RNG using LCG. */ public class SimpleLCG { /* maximum 48-bit unsigned integer */ public static final long RANDMAX = (1L << 48) - 1; // M = 2**48 */ /* other constants you need could go here */ private long nextVal; public SimpleLCG(long seed) { nextVal = seed; } /** * Next long. */ public long next() { long current = nextVal; nextVal = 0; /* FIXME your code goes here */ return current; } }