Categories: Homework Aiders

CSE 174 Miami University working With 2D Arrays Java Program follow the document to finish the java program CSE 174 – Spring 2020 PROGRAM #12: 30 points –

CSE 174 Miami University working With 2D Arrays Java Program follow the document to finish the java program CSE 174 – Spring 2020
PROGRAM #12: 30 points – Due Apr 26, by 11:59 p.m.
Outcomes:
? Implement methods for working with 2D-arrays.
? Use loops and conditions to manipulate array values.
Scoring:
? If you do not submit your source code, your score will be zero.
? If you submit a source code that does not compile, your score will be zero.
? If you submit a source code without the correct class name (Program12) or the correct
method names (see below), you will receive at most half-credit for this assignment.
? Deductions will be made for not meeting the usual requirements: Source code that is
not formatted according to the usual guidelines, methods that are not commented, and
so on
Full credit
Partial credit
getInput method (3 points)
Method solves the problem
properly.
There are errors in the
solution.
rnd method (2 points)
Method solves the problem
properly.
There are errors in the
solution.
isDone method (5 points)
Method solves the problem
properly.
There are errors in the
solution.
acceptVal (15 points)
Method solves the problem
properly.
There are errors in the
solution.
Comments, file names, short
methods, etc.
(5 points)
your code has
comprehensive comments,
and proper indentation, and
correct file name
The program partially
follows the format and
specification.
Background & Requirements:
You are to complete the program that can play sudoku. This game has 3 rows and 3 columns,
and the user only is allowed to enter one of the numbers [1, 2, 3].
You start the game with partially random filled table as follows:
As you can see row 0 – column 1 is filled with the number 3, row 1 – column 2 is filled with 1,
and row 2 – column 2 is filled with 2.
Then the user has to enter the next move by entering the row, col, and a value all separated
with spaces as shown below:
The user can’t enter a value less than 1 or bigger than 3 and if they do, they will have to reenter the inputs.
Also, the user can’t enter a row or col value less than 0 or bigger than 2 and if they do, they will
have to re-enter the inputs as shown below:
The value that the user enters can’t be the same as numbers that already exist in the same row
and column. If they do, you will have to re-enter the input. Here are some invalid inputs:
Now, that you know all invalid inputs, you can play the game. The goal is to fill up all the spots
without having duplicates in the same row or column. Here is an example of how the game is
played:
**In this version of the game, you are allowed to go back and change the already entered
values as well**
Specifics:
1.
2.
Download Program12.java from canvas and study the code.
3.
Complete the method rnd that accepts an int value min and an int value max and returns a
random int number between min and max.
Complete the method getInput that accepts a string called str and returns an int array with
the length of three. This method prints the given str, then gets three int values from the
input, creates a new array initialized with 3 elements received from the user, and returns the
array. The first element of the array should be the row, the second element of the array
should be the column, and the third element is the value. The following is the output
generated by this method:
4.
Complete the method isDone that accepts a 2D int array. It goes through all values and
returns false if one of the values is zero. If there is no zero in the array, then it will return
true.
5.
Complete the method acceptVal that accepts a 2D int array. This method returns false if
there are duplicate values in one of the rows or columns and returns true otherwise. For
instance, having these arrays:
1
0
0
0
0
2
1
3
0
1
0
0
0
0
2
3
2
0
This method should return false for both arrays since there are duplicates in the first column
of the first array, and there are duplicates in the second array in the second row.
6.
7.
DO NOT CHANGE anything else in the file.
8.
Add comments for the methods, at the beginning with your name, and inside your code.
In this version of the game, you are allowed to go back and change the already entered
values as well.
Output:
Another sample run of playing the game:
Submission:
Add comments everywhere, then submit only the Program12.java file to the Canvas website. If you
submit your work and decide to modify your program, do not rename your source code. Canvas may
add a number to the name of your .java file which is fine. But you should keep the filename the same.

Purchase answer to see full
attachment

Don't use plagiarized sources. Get Your Custom Essay on
CSE 174 Miami University working With 2D Arrays Java Program follow the document to finish the java program CSE 174 – Spring 2020 PROGRAM #12: 30 points –
Get an essay WRITTEN FOR YOU, Plagiarism free, and by an EXPERT! Just from $10/Page
Order Essay
superadmin

Share
Published by
superadmin

Recent Posts

communication MA | Solution Aider

part one For this assignment you are to to watch: Shattered Glass Write a two…

3 years ago

Standard Project – WebServers | Solution Aider

Standard Project - WebServers. Instruction attached. Need all requirements, you do not have to make…

3 years ago

Discussion post 2 | Solution Aider

Read classmates post and respond with 100 words:The International Categorization of Diseases, Tenth Revision, Clinical…

3 years ago

case sttudy | Solution Aider

Most Americans have at least 1 issue that is most important to them. Economic issues…

3 years ago

Methodologies Report | Solution Aider

For this assignment, you are the court intake processor at a federal court where you…

3 years ago

outline about gender equality | Solution Aider

Use a standard outline format to lay out how you are going to write your…

3 years ago