If I'm reading this correctly, then this is all you need to do.

import java.util.Random;

public class Dice {
int numOfSides;
Random rand;

public Dice(int numOfSides) {
...