Home /
Expert Answers /
Computer Science /
integers-seedval-and-limitvalue-are-read-from-input-randgen-setseed-is-called-with-seedval-as-th-pa435
(Solved): Integers seedVal and limitValue are read from input. randGen.setSeed() is called with seedVal as th ...
Integers seedVal and limitValue are read from input. randGen.setSeed() is called with seedVal as the seed. Assign variables dataPoint1, dataPoint2, dataPoint3, dataPoint4, and dataPoint5 each with a random number between 0 and limitValue -1 , both inclusive. Click here for example Ex: If limitvalue is 18 , then one possible output is: 9 17 13 15 7 Sum: 61 14 int dataPoint4; int dataPoint5; seedVal = scnr.nextInt (); limitValue = scnr . nextInt () ; randGen.setSeed(seedVal); value1 = randGen.nextInt (uppLimit); value2 = randGen. nextInt (uppLimit); value3 = randGen. nextInt (uppLimit); value4 = randGen. nextInt(uppLimit); sum = dataPoint1 + dataPoint 2 + dataPoint 3 + dataPoint4 + dataPoint5; System.out.println(dataPoint1); System.out.println(dataPoint2); System.out.println(dataPoint3);