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

  Plot the data as discrete points

Plot this curve on the same gure as the circles above and manually change the y-axis limits to [-50; 200].

  What type of encryption uses the same key to encrypt

What type of encryption uses the same key to encrypt and to decrypt information? Which of the following involves overwriting all of the information on a drive?

  When are two vertices connected with an edge

Describe how you would model this situation using a directed graph, where paths in your graph should represent possible sequences of candy purchases.

  Question1 use big-theta notation to classify traditional

question1. use big-theta notation to classify traditional grade school algorithms for addition and development. that is

  Create a program that imports an excel file and outputs

Create a program that imports an excel file and outputs a graph (for example you can use MatplotLib to create graphs) you'd be using the CSV file.

  Define how do cloud threats differ from traditional threats

How do cloud threats differ from traditional threats. Against which threats are cloud services typically more effective compared to local ones

  Discuss the companys continued reputation and revenue

During vulnerability assessment, you rank the public-facing website as an integral asset to the company's continued reputation and revenue

  Which methods are used to detect steganography

In steganalysis, which methods are used to detect steganography? Briefly describe how cryptography is applied in ATM, SSL, digital signatures.

  Create a cartoon panel class that takes an array of pictures

Create a Cartoon Panel class that takes an array of Pictures and displays the pictures from left to right.

  Define the necessary project management skills to accomplish

be sure that you briefly describe why each of the listed tasks is critical to the success of the project and how each of the listed skills helps the project manager.

  Explain risk that might result from implementing byod policy

Identify three risks that might result from implementing a BYOD policy. Suggest a method for mitigating each risk you have identified.

  How you need to change the interface and implementation file

Describe how you need to change the interface and implementation files shown in Displays 11.1 and 11.2. You need not write out the files in their entirety.

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