Write a Java program to do the following: 1) Create 2D array of size 4 rows...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Write a Java program to do the following: 1) Create 2D array of size 4 rows by 3 columns of type integer. 2) Prompt the user to enter integer values and store them in the array. 3) For each row, find if most elements are positive, or negative. Sample Input/output: Enter values for row 0:2 8 2 Enter values for row 1: -3-5-4 Enter values for row 2:9-5-3 Enter values for row 3:3 2 -6 Most values in row 0 are positive Most values in row 1 are negative Most values in row 2 are negative Most values in row 3 are positive Write a Java program to do the following: 1) Create 2D array of size 4 rows by 3 columns of type integer. 2) Prompt the user to enter integer values and store them in the array. 3) For each row, find if most elements are positive, or negative. Sample Input/output: Enter values for row 0:2 8 2 Enter values for row 1: -3-5-4 Enter values for row 2:9-5-3 Enter values for row 3:3 2 -6 Most values in row 0 are positive Most values in row 1 are negative Most values in row 2 are negative Most values in row 3 are positive
Expert Answer:
Answer rating: 100% (QA)
The question asks for a Java program that will 1 Create a 2D array of size 4 rows by 3 columns of type integer 2 Prompt the user to enter integer valu... View the full answer
Related Book For
Introduction To Statistics And Data Analysis
ISBN: 9780495118732
3rd Edition
Authors: Roxy Peck, Chris Olsen, Jay L. Devore
Posted Date:
Students also viewed these programming questions
-
Consider the data on a response variable and two predictor variables. (a) Fit a multiple regression model with response variable y. (b) Verify your answer using software. R: summary(lm( y ,.., xl +...
-
The Li Group had 290,000 shares of common stock outstanding at January 1, 2024. The following activities affected common shares during the year. There are no potential common shares outstanding. 2024...
-
Determine all the FIR filters which are specified by the lattice parameters K1 = , K2 = 0.6, K3 = -0.7, and K4 = 1/3
-
For the third quarter of the year, Barney Construction, 715 Red Rock Boulevard, San Francisco, California 94121, received Form 941 from the District Office of the Internal Revenue Service. The...
-
Suppose that you need to prepare the data in Table 6.10 for a neural network algorithm. Define the indicator variables for the occupation attribute. TABLE 6.10 ANOVA results for Ho: HD = HE=HF Source...
-
With reference to the aluminum alloy strength data on page 29 , obtain two-sided \(95 \%\) tolerance limits on the proportion \(P=0.90\) of the population of strengths. Data From Page 29 EXAMPLE 7 A...
-
On January 2, 2017, Criswell Acres purchased from Mifflinburg Farm Supply a new tractor that had a cash selling price of $109,837. As payment, Criswell gave Mifflinburg Farm Supply $25,000 in cash...
-
Appendix V Current Job Information Smoke Damage Comm. Water Damage Other Total Total Res. Comm. Res. Comm. Res. Comm. Res. 2,542.00 120,000.00 394.00 270,000.00 Revenue Overhead cost allocated Direct...
-
Ralph usually buys one pizza and two colas from the local pizzeria. The pizzeria announces a special: All pizzas after the first one is half-price. Show the original and new budget lines. What can...
-
Use the graph to answer the following questions. Select any black point (plus symbol) on the graph to get its exact coordinates. What happened to the inflation rate between the year when the...
-
You will read an article about an organization and use at least two concepts from class to explain two strengths and/or weaknesses of the organization's policies. Do you think it would be a good idea...
-
Can you give an examples, analyse and report of 3 companies that use different emerging technology in their supply chain? 1. Drone 2. RFID Technology 3. The internet of things What are the impact of...
-
Find the domain and range of the function. f(x)=19-x The domain of the function is (Type your answer in interval notation.)
-
When does self control begin, and how does it change as children's develop?
-
You are given incomplete beginning and ending balance sheets, an incomplete income statement and an incomplete statement of cash flows. Required: 1.1 30 points Balance Sheets (Years 1 and 2) Cash...
-
Instructions: Think of this assignment like a review of a book (or even restaurant). First, watch The Corportation (here's the link: https://www.youtube.com/watch?v=KMNZXV7ZJOGO). Then, while...
-
Fred Farmer needs to prepare a balance sheet for his bank. He spent the day getting the following information. Fred needs your help to build a balance sheet and evaluate it. The information was...
-
Does the color of a food or beverage affect the way people perceive its taste? In this activity you will conduct an experiment to investigate this question and analyze the resulting data using a...
-
The article Characterization of Highway Runoff in Austin, Texas, Area (Journal of Environmental Engineering [1998]: 131137) gave a scatterplot, along with the least-squares line for x = rainfall...
-
The following normal probability plot was constructed using part of the data appearing in the paper Trace Metals in Sea Scallops (Environmental Concentration and Toxicology 19: 13261334). The...
-
1. Describe the bases of power held by Dr. Jamie Thompson. Describe the bases of power held by Dr. Elizabeth Clarke. 2. What activities and people have contributed to Jaime Thompsons power? What...
-
What is the current in the wire in Figure Q22.1? 1.0 VR + 1.0-1.0V + FIGURE Q22.1
-
Electroplating uses electrolysis to coat one metal with another. In a copper-plating bath, copper ions with a charge of +2e move through the electrolyte from the copper anode to the cathode the metal...
Study smarter with the SolutionInn App