Display the array in table format

Assignment Help Computer Engineering
Reference no: EM132200849

Write a JAVA program which does the following:

Give the user a menu choice

Option 1: Randomly Generate a 2D array. This option will ask the user for the number of rows and columns in the array, as well as the range of numbers to generate, (i.e. The user can choose the min and max of the random number formula.) The random numbers should be integers.

Option 2: Populate an array using File I/O. This option will ask the user to enter the name of a file OR use JFileChooser to read data from an input file. The file will have the following format: The first two numbers will be the dimensions of the array (rows and columns). The rest of the numbers will be the data for the array.

Once the array has been created using one of the above two options. Display the following results:

Display the array in table format. (Print the 2D array)

Calculate and display the sum and average of the entire array.

Calculate and display the sum and average of each row.

Calculate and display the sum and average of each column.

Calculate and display the sum and average of the major and minor diagonals *see below.

Display the row and col with the highest average.

Display the row and col with the lowest average.

Be sure to use appropriate methods or the program will be worth no credit.

Major Diagonal: runs from upper                    Minor Diagonal: runs from upper right
left to lower right                                              to lower left

1 2 3       1 2 3        1 2                                  1 2 3       1 2 3        1 2
3 4 5       4 5 6      3 4                                  3 4 5       4 5 6         3 4
7 8 9                         5 6                                  7 8 9                         5 6

Reference no: EM132200849

Questions Cloud

A program to calculate rectangular and right triangles : Write a java program that calculates of rectangular and right triangles. The main function then only outputs the areas of the two calculated areas.
Demonstrate deadlock without synchronized keywoord : Write a Java program that demonstrates deadlock WITHOUT synchronized keywoord.
What are the lessons of enron that are relevant today : In what ways are the circumstances in this case no longer relevant to today's business environment? Are there political, legal, technical forces in place.
How much does our worker earn at each point : Now assume a worker earns $1,000 per-week if she works and can work up to 40 weeks a year. Plot a budget constraint for consumption (Y) on the Y-axis and hours.
Display the array in table format : Populate an array using File I/O. This option will ask the user to enter the name of a file OR use JFileChooser to read data from an input file.
Implement a grocery list manager where the user can add : Write a java program that implements a grocery list manager where the user can add/remove items, view their list.
Explain the connections between the cofficients : For the same two countries, collect the most recent data on HDI and GINI Coefficients and critically analyze if you see any connections between.
Generate a random point inside a circle with radius : Write a java program to generate a random point inside a circle with radius R=5. The coordinate of the center of the circle is (0,0).
Calculate and print the area and circumference of a circle : Write a java program that declares a radius value as an integer of your choice (between 25 and 80) and then calculates and prints.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Count the number of negative integers

Write an assembly procedure that reads a string of word size signed integers that ends with a "*".

  Write report using term switch assessment and requirement

The university presently uses an analog phone system and the administration is looking to deploy voice over IP solution. Before they move forward, they want to ensure that the environment can support the technology.

  Determine a symbolic equation that represents the amount

Suppose that water is being pumped into an initially empty tank. It is known that the rate of the flow of water into the tank at time t (in seconds) is 50-t liters/s.

  Calculate the total volume of the products

Calculate the total volume of the products. Calculate the total weight of the products. Calculate the total weight of the shipment (ignore the shelving).

  How can an attacker find the three keys with effort

How can an attacker find the three keys with effort in the order of 2112 instead of 2168? Describe the attack in detail.

  What is the framebuffer address of the pixel with screen

Suppose you have a system with an 8-inch by l0.inch video monitor. What is the framebuffer address of the pixel with screen coordinates (>, v)?

  Explain contents of an initially empty avl tree

Explain contents of an initially empty AVL tree

  Define rayleigh fading channel

Show that the (Ny, NR) = (2, 2) MIMO system that employs the Alamouti code in a Rayleigh fading channel achieves fourth-order diversity.

  Develop an aggregate vision of it compliance

Assess all key business processes and IT compliance factors and link to all business processes (financial and non-IT) to develop an aggregate vision.

  What infrastructural or cyber domain sector are protected

According to your answer above, what infrastructural or cyber domain sector or assets are being protected by such enforcement?

  How a technology like rfid could enhance the approach

Submit an executive summary on the specific industry and business problem that you are going to do your research paper on. The summary should contain enough.

  Using the division algorithm

Using the division algorithm where the 8 bit dividend is put into a 16 bit register R and the divisor is put into an 8 bit register D, and the result is that the quotient is in the lower half of R and the remainder is in the upper half of R, divid..

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd