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

  Discuss other professions aside from health care and

brain saving technologies inc. and the t-health institute medicine through videoconferencing.in a three- to five-page

  How does rsa algorithm differ from data encryption standard

How does the RSA algorithm differ from the Data Encryption Standard (DES)? A security engineer uses a digital certificate and Pretty Good Privacy (PGP) when sending an e-mail. What is the digital certificate used for?

  Identify three security threats to software applications

Identify at least 3 security threats to software applications. These threats could be directed at the software source code or the data handled by the software.

  List the control signals needed for the stack-based alu

A hardware stack is used to evaluate arithmetic expressions. The expressions can contain both REAL and INTEGER values. The data representation contains a TAG.

  How do the two concepts work together

Within the United States, the States and the Federal Government share soverign power. What does this mean Doesn't this idea conflict with the Supremacy Clause which is found under Article VI of the U.S. Constitution

  Integrate the research and analysis from the previous

one of the most common business tools during organizational assessment is the strengths weaknesses opportunities and

  Research the firm and its industry environment

Select a realfirm as the focus of your report. This can be a pure-play internet company, or a traditional firm that is engaged in eBusiness activities.

  Question1 information representation-while dealing with

question1. information representation-while dealing with binary numbers many it professionals favour to use hexadecimal

  Consider any of the supercomputing examples

Consider any of the supercomputing examples we discussed in class, and find a scientific paper describing it. Although you can use Wikipedia and similar sites as a starting point, you must find an article in a valid IEEE or ACM publication (journa..

  Improve the transient response

What difference on the s-plane is noted between using a PD controller or using a lead network to improve the transient response?

  What are the most common applications of javascript

What are the most common applications of JavaScript? Where is JavaScript most often interpreted, on the server or on the browser?

  Discuss the strengths and weaknesses of the design produced

Discuss the strengths and weaknesses of the design produced and make suggestions as to how weaknesses might be addressed

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