Write DiceLab with the methods rollDie(Random random) (returns 1–6), and bar(int count) (returns that many *). main reads a seed and a number of rolls, creates new Random(seed), and rolls two dice that many times (first die, then second die, with rollDie). Print the number of rolls, the average total, how many totals were 7 and how many rolls were doubles — each with a bar of count × 40 / rolls stars — the highest total, and the share of sevens.
For the input
2026 600
the program prints
Rolls: 600
Average total: 6.97
Sevens: 97 ******
Doubles: 103 ******
Highest total: 12
Share of sevens: 16.2% (theory: 16.7%)
With the same seed, Random always produces the same sequence: that is what makes a simulation testable.