Question
not use built-in sort and methods/functions not covered in class Problem 3 : [ 10 marks] Classname : Problem 3 _studentid Write a java program
not use built-in sort and methods/functions not covered in class
Problem 3: [10 marks]
Classname: Problem3_studentid
Write a java program that prompts the user to enter the length of a square matrix, randomly fills in As and Zs into the matrix, prints the matrix, and finds the rows, columns, and diagonals with all As or Zs.
You must implement 1 method for each of the following tasks:
Note:
Enter the size for the matrix: 4 AZZZ AAAA AZAA ZZZZ All As on row 2 All Zs on row 4 No same letters on a column No same letters on a diagonal
|
Able to get user input of type int : 1 mark
Able to fill As and Zs correctly: 2 marks
Finding As and Zs on rows w/ output : 2 marks
Finding As and Zs on columns w/ output: 2 marks
Finding As and Zs on diagonal w/ output: 3 marks
*output means display an appropriate message (See sample display above when As and Zs are found or not found)
Do not use methods/functions not covered in our class
Thinking of 2-dimensional array? Dont use it. You dont need it. not use built-in sort and methods/functions not covered in class
Problem 3: [10 marks]
Classname: Problem3_studentid
Write a program that prompts the user to enter the length of a square matrix, randomly fills in As and Zs into the matrix, prints the matrix, and finds the rows, columns, and diagonals with all As or Zs.
You must implement 1 method for each of the following tasks:
Note:
Enter the size for the matrix: 4 AZZZ AAAA AZAA ZZZZ All As on row 2 All Zs on row 4 No same letters on a column No same letters on a diagonal
|
Able to get user input of type int : 1 mark
Able to fill As and Zs correctly: 2 marks
Finding As and Zs on rows w/ output : 2 marks
Finding As and Zs on columns w/ output: 2 marks
Finding As and Zs on diagonal w/ output: 3 marks
*output means display an appropriate message (See sample display above when As and Zs are found or not found)
Do not use methods/functions not covered in our class
Thinking of 2-dimensional array? Dont use it. You dont need it.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started