package Q4; import java.util.*; public class RandomSumGame { private boolean start; private int d1; private int d2; private int sum; private int valuePoint; private String status; public void play(int d1, int d2) {} public void play() { this.rollDice(); this.play(this.d1, this.d2); } public void rollDice() { this.d1 = this.roll(); this.d2 = this.roll(); } private int roll() { return new Random().nextInt(5) + 1; } }