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

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

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