Question
public class PracticeExam { public static void main(String[] args) { int[][] data = { { 0, 1, 2, 3, 4, 5, 6 }, { 0,
public class PracticeExam {
public static void main(String[] args) {
int[][] data = {
{ 0, 1, 2, 3, 4, 5, 6 },
{ 0, 1, 2, 3, 4, 5, 6 },
{ 0, 1, 2, 3, 4, 5, 6 },
{ 0, 1, 2, 3, 4, 5, 6 },
{ 0, 1, 2, 3, 4, 5, 6 },
{ 0, 1, 2, 3, 4, 5, 6 },
{ 0, 1, 2, 3, 4, 5, 6 },
{ 0, 1, 2, 3, 4, 5, 6 } };
// input: TODO prompt the user for
// 1) a row number
// 2) a column number
// processing: TODO implment the methods below
int rowSum = sumRow(rowNum, data);
int colSum = sumColumn(colNum, data);
double all = overallAverage(data);
// output: TODO display the three answers
// using a method named displayResults
}
}
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