Question
Write a program in java netbeans that will read numbers from the keyboard into a 2-dimensional table. Calculate totals for the rows, the columns, and
Write a program in java netbeans that will read numbers from the keyboard into a 2-dimensional table. Calculate totals for the rows, the columns, and a grand total. Then print the table and the totals on the screen.
The main method should do the following:
create the arrays for the table (3 x 5), the row totals (3 elements), the column totals (5 elements),
define other variables needed, such as the grand total,
Call a method that will fill the table.
This method will prompt the user with the row number and column number for the value to be entered. The value entered by the user will be stored in the table,
calculate values for the row totals and the column totals and store them in these 2 arrays,
calculate and return the grand total for the table,
call a method that will o Print the table and the row totals. Each line printed should have the numbers from a row of the table and the corresponding row total o Print a blank line. o Print the column totals and the grand total on a line.
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