Question: / / You will need to write a static method named scoreWithNumbers. import java.util.Random; public class ScoreDice { public ScoreDice ( long seed ) {

// You will need to write a static method named scoreWithNumbers. import java.util.Random;
public class ScoreDice {public ScoreDice(long seed){} return r.nextInt(6)+1;public int score(){ int roll2= rollD6();}// scoreWithNumbers returns a score based on the values//// the returned score is 10// the returned score is 8// smaller value is (e.g., if given 3 and 4, it returns 3).// TODO - write your code below this comment. Scanner input = new Scanner(System.in); long seed = input.nextLong(); System.out.println("Score: "+ scoreDice.score());}
// scoreWithNumbers returns a score based on the values
// of its inputs, as such:
//
//- If both inputs are 1 or if both inputs are 6, then
// the returned score is 10
//- If both inputs are the same (but not 1 or 6), then
// the returned score is 8
//- If the inputs are different, the score is whatever the
// smaller value is (e.g., if given 3 and 4, it returns 3).
//
/ / You will need to write a static method named

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!