import java.util.Random;

public class Die {
    
    //3 fields (variables)
    Random myRandomGenerator;
    int sideCount;
    int number;
       
    //a constructor (method)
    Die(Random random) {
        myRandomGenerator = random;
        sideCount = 6;
        roll();
    }
    
    //constructor overloading (method overloading)
    Die(Random random, int sides) {
        myRandomGenerator = random;
        sideCount = sides;
        roll();
    }
    
    //3 methods
    void roll() {
        number = myRandomGenerator.nextInt(sideCount) + 1;
    }
    
    int getNumber() {
        return number;
    }
    
    int getSideCount() {
        return sideCount;
    }
    
    
    
    
}