Lab #6 will require you to write a trivial class representing a dice. Your TA wi
ID: 3654582 • Letter: L
Question
Lab #6 will require you to write a trivial class representing a dice. Your TA will assist you with each step of development. You will be give a starter file that is mostly written. You will just add a couple lines of code to complete the Die class. Here are the files you are to work with. The main program tester file. Use as is. Do not modify The Die.java class definition file. You must fill in the missing pieces: Die.java (die is the singular form for dice) Start by downloading both Die.java and DieTester.java in to same dir. Compile DieTester.java ( C:> javac DieTester.java) Notice that it implicitly compiles the Die.java for you (Die.class file will appear in the directory). Run itExplanation / Answer
package Cramster; import java.util.*; import java.io.*; public class DieTester { public static void main( String args[] ) { int seed1 = Integer.parseInt( args[0] ); int seed2 = Integer.parseInt( args[1] ); Die d1 = new Die( seed1 ); // cmd line should pass in diff vals so the dice do not produce identical pairs Die d2 = new Die( seed2 ); for (int i=0; iRelated Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.