Question: Java Programming Write another class named PairOfDie that has two instance data of type Die name it d1, d2. Write an empty constructor: public PairOfDie()
Write another class named PairOfDie that has two instance data of type Die name it d1, d2. Write an empty constructor: public PairOfDie() { d1 = new Die(): d2 = new Die(): } Provide setters and getters as you see proper (I want to know what method you think is Good to have in this class, think of what we do to dice and write, no worries any method Is good): also provide toString() method to display content of instance data d1 and 62. Write a driver to test your class
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
