Question: Program Debugging. Consider and understand the scenario that follows. Debug the program in order for it to run as stated in its specification, place appropriate

 Program Debugging. Consider and understand the scenario that follows. Debug the

program in order for it to run as stated in its specification,

Program Debugging. Consider and understand the scenario that follows. Debug the program in order for it to run as stated in its specification, place appropriate comment/s (what the code does) for each major method (17 pts). Underline/Highlight the changes you have made using a word processing software. Include 3 screenshots of the input/output of the program using these values: 3, 8 and 12. Upload the file as well as the.java file. The program that follows, when run, will let the user 'roll a pair of dice' n-times (i.e. generate a number between 1 and 6), where n is a positive integer entered by a user. The program then outputs the pair of numbers ('rolled dice'), as well as the sum of the numbers (each pair of dice). The pairs of numbers are stored in a 2-dimensional array, and the sum of each pair are stored in a single-dimensional array. import java.util.Scanner; import java.util.Random; public class FinalExamPart2_FamilyName_GivenName{ public static void main (String() args) { Scanner input = Scanner(System.in); System.out.print("Enter the amount of times a pair of dice will roll: "); int times = keyboard.nextInt(); int[] dicePairs = rolldicePairs(times); System.out.println("The rolled pairs of numbers are:"); printDicePairs(dicePairs); System.out.println("The sum of each pairs of numbers are:"); int[][] dicePairsSums = addDicePairs(dicePairs); printDicePairsSums (dicePairsSums); } public static double[][] rollDicepairs(int times) { int[][] dice = new int[times] [2]; Random die = new Random(); for(int x=0; x

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 Databases Questions!