Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

java Write a program that will read numbers from the keyboard into a 2-dimensional table. Calculate totals for the rows, the columns, and a grand

java

Write a program 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

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

Print a blank line.

Print the column totals and the grand total on a line

Print the line that says the grand total, column and row totals

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Conceptual Database Design An Entity Relationship Approach

Authors: Carol Batini, Stefano Ceri, Shamkant B. Navathe

1st Edition

0805302441, 978-0805302448

More Books

Students also viewed these Databases questions

Question

9. Understand the phenomenon of code switching and interlanguage.

Answered: 1 week ago