1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Artist 52 [7]
3 years ago
9

Find the maximum value and minimum value in milesTracker. Assign the maximum value to maxMiles, and the minimum value to minMile

s. Sample output for the given program:
Min miles: -10
Max miles: 40
Here's what I have so far:
import java.util.Scanner;
public class ArraysKeyValue {
public static void main (String [] args) {
final int NUM_ROWS = 2;
final int NUM_COLS = 2;
int [][] milesTracker = new int[NUM_ROWS][NUM_COLS];
int i = 0;
int j = 0;
int maxMiles = 0; // Assign with first element in milesTracker before loop
int minMiles = 0; // Assign with first element in milesTracker before loop
milesTracker[0][0] = -10;
milesTracker[0][1] = 20;
milesTracker[1][0] = 30;
milesTracker[1][1] = 40;
//edit from here
for(i = 0; i < NUM_ROWS; ++i){
for(j = 0; j < NUM_COLS; ++j){
if(milesTracker[i][j] > maxMiles){
maxMiles = milesTracker[i][j];
}
}
}
for(i = 0; i < NUM_ROWS; ++i){
for(j = 0; j < NUM_COLS; ++j){
if(milesTracker[i][j] < minMiles){
minMiles = milesTracker[i][j];
}
}
}
//edit to here
System.out.println("Min miles: " + minMiles);
System.out.println("Max miles: " + maxMiles);
}
Computers and Technology
1 answer:
lina2011 [118]3 years ago
8 0

Answer: 40, 4

Explanation:

You might be interested in
Distinguish the functional requirements an engineer would have to specify for a taxi dispatch system.
AveGali [126]
The requirements are mainly written in a feature style notation, using some state charts, context diagrams and other techniques to describe certain parts of the system. See, for example, Software Requirements - Styles and Techniques [Lauesen00].
The functional requirements are divided into four sections. The three modules in figure 1 are developed by separate groups, each responsible for unit testing. All requirements for the taxi, central and communication link component are written in a feature style notation. In addition, a special part of the taxi component is the positioning system. This is dealt with separately since there are special requirements present on this component. The functional requirements consist of four sections: Taxi (3.1), Central (3.2), Communication link (3.3) and Positioning system (3.4). 
6 0
3 years ago
To give your app users the ability to open your app directly from other apps by clicking a link, you should use:.
pickupchik [31]
<span>To give your app users the ability to open your app directly from other apps by clicking a link, you should use:  deep link. With the deep link and its URL functionality, existing app users are driven directly inside the mobile app itself. 
</span>Deep links are usually made up of two parts: a scheme (part of the link that identifies which app to open).<span>and a </span>host and path (<span>the unique location in the app where your content exists).</span>

7 0
2 years ago
An important piece of a project is past due date.
bixtya [17]
Budget and time is the answer
4 0
3 years ago
Read 2 more answers
Custodial workers that access the terminal area must have a fingerprint background check done and training unless they are escor
tensa zangetsu [6.8K]

Answer:

True they do. mark brainliest.!!!!! please

Explanation:

6 0
2 years ago
You have heard that the Linux distribution your are going to install to run a new application runs best on a RISC architecture.
Artyom0805 [142]

Answer:

SPARC .

Explanation:

When the user has understood they're required to install the linux distribution to set up a specific program works better on such a RISC architecture. SPARC must therefore find the device from which it would work that following distribution for the Linux. It is a RISC and ISA that was previously designed through both Fujitsu and Sun.

6 0
3 years ago
Other questions:
  • Please help will mark brainiest
    8·1 answer
  • Write an expression that will print "in high school" if the value of user_grade is between 9 and 12 (inclusive). Sample output w
    12·1 answer
  • How does this app work?
    11·2 answers
  • 1.6 code practice: question 1 edhesive
    12·2 answers
  • Which is not one of the four criteria for proving the correctness of a logical pretest loop construct of the form: while B do S
    14·1 answer
  • Why are object-oriented languages very popular?
    11·2 answers
  • Choose all that apply.
    11·1 answer
  • 31
    10·1 answer
  • How do you remove management from your chrome book [administrator]
    12·1 answer
  • Software piracy is acceptable as it helps us obtain software cheaper or sometimes even for free.
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!