Write a program that creates a two-dimensional array

Assignment Help JAVA Programming
Reference no: EM13711362

Program: Write a program that creates a two-dimensional (2D) array initialized with test data (for instance, use Random method to prepare an array of integers).

Write the given functions and demonstrate each of them by calling each of them from Main and showing results on the console:

- DisplayArray

This function accepts a 2D array as argument and prints out to console its contents (displayed as a 2D grid of numbers).

- GetTotal

This function accepts a 2D array as argument and returns the total sum of all values in the array.

- GetHighestInRow

This function accepts two arguments: the first one is a 2D array, and the second one is an integer that indicates the index (subscript) of a row in the array. The function then returns the highest value in the specified row of the array.

- GetColumnTotal

This function accepts two arguments: the first one is a 2D array, and the second one is an integer that indicates the index (subscript) of a column in the array.

- Thefunction then returns the total sum of the values in the specified column of the array.

You have to implement all these function in a program and provide the code.

Reference no: EM13711362

Questions Cloud

Design your app for every possible screen size and density : Design your app for every possible screen size and density - BroadcastReceiver to easily share data from your app with other apps on the device.
Use the branch-on-equal mips assembly instruction : Explain how to convert the address(hex) to words(bits) ? Is there any shortcut to do this type of conversion?
Compute a lp problem for an optimal solution : A company has three teachers. On a particular day, six classes are scheduled to be completed. A class does not need more than one teacher.
Describe hospital efficiency case study : Shouldice Hospital - Manufacturing, Service, and Health Care Processes. explain hospital efficiency case study and how well is the hospital currently utilizing its beds.
Write a program that creates a two-dimensional array : Write a program that creates a two-dimensional (2D) array initialized with test data (for instance, use Random method to prepare an array of integers).
Explain merchandising operation wilson company : Wilson Company makes all sales all sales of industrial bearings under terms of FOB shipping point. The company usually receives orders for sales approximately one week before shipping inventory to customers.
Determine the hybridization of the central atom : For the molecules: ozone, sulfur trioxide and nitromethane ( CH3NO2 ), determine the hybridization of the central atom
Determine whether the molecule is polar : Determine whether the molecules: ozone, sulfur trioxide and nitromethane (CH3NO2) contain polar bonds. In those molecules that contain polar bonds, determine whether the molecule is polar
Prepare a modification of the encryption program : Prepare a modification of the encryption program of 15.5 whose transform function uses an integer key to transform the character passed to it.

Reviews

Write a Review

JAVA Programming Questions & Answers

  Create a class that uses the genetricstack class

Create a new class named GenericStack that specifies a type variable that gives for generics - Use the peek method to return the first item and show that item, and use the size method to return the number of items again and show that value.

  Implement a shopping cart class with user interface

project will be to implement a shopping cart class with user interface (UI) that contains main() in Net Beans. The UI class will be used to perform user input/output and to invoke the appropriate methods of shopping cart class. When your program star..

  Class named stock to model a stock

Write a class named Stock to model a stock. The properties and methods of the class are shown in Figure 6.22. The metho changePercent computes the percentage of the change in the current vs. the previous closing price.

  Assume that you are developing a java program which uses

suppose that youre developing a java program that uses decimal numbers and youd like to control the formatting of your

  Create a third string consisting of the first half of string

Show the length of both strings - Create a third string consisting of the first half of string (1) and the second half of string.

  Write program to keep track of a hardware stores inventory

Write a program to keep track of a hardware store's inventory. The store sells various items. For each item in the store, the following information is kept: item ID, item name, number of pieces in stock, manufacturer's price of the item, and the s..

  Write a java program to register students for a college

Project is for designing and developing a College Registration program. Write a Java program to register students for a college

  Java test program

Write a Java test program, all your code should be in the main method, that determines what type of organization is indicated by a web address. Your program should allow the user to enter a web address

  Statements to print a label

Add the statements to print a label in the following format (the numbers in the example output are correct for input of $4.25 per pound and 41 ounces). Use the formatting object money to print the unit price and total price and the formatting object ..

  Return a reverse queue

represent my queue object as a parameter, what the program should be doing. It should return a reverse queue

  Write a java code that calculates the product

Write a java code that calculates the product of the subsequent sequence of numbers using for/loop and do/while/loop

  Prepare a java program to simulate a simple multiuser

prepare a java program to simulate a simple multiuser computer system as follows each user has a unique id and wishes

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