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
Rashid [163]
4 years ago
5

Create a method called fixArray(int[][] array, int row, int col, int value) that sets the [row][column] to the correct value. Th

en, call the fixArray method three times - once for each value change that you are supposed to make.
Computers and Technology
1 answer:
Kobotan [32]4 years ago
8 0

Answer:

  1. public class Main {
  2.    public static void main (String [] args) {
  3.        int[][] myArray = {{1,5,6}, {7, 9, 2}};
  4.        fixArray(myArray, 1, 2, 12);
  5.        System.out.println(myArray[1][2]);
  6.    }
  7.    private static void fixArray(int[][] array, int row, int col, int value){
  8.        array[row][col] = value;
  9.    }
  10. }

Explanation:

The solution code is written in Java.

Firstly, create the method fixArray with that takes four inputs, array, row, col and value (Line 11). Within the method body, use row and col as index to address a particular element from array and set the input value to it (Line 12).

Next, we test the method in the main program using a sample array (Line 4) and we try to change the row-1 and col-2 element from 2 to 12 (Line 5).

The print statement in Line 7 will display 12 in console.

You might be interested in
Please help me for this question - Computer Science
gavmur [86]

Answer:

# F F F F 0 0

# F F 0 0 F F

# 0 0 F F F F

Explanation:

Hex values are your friend.

The first two digits represent red.

# F F 0 0 0 0 - Red

The second two digits represent green.

# 0 0 F F 0 0 - Green

The third two digits represent blue.

# 0 0 0 0 F F - Blue

If you know yellow is a combination of red and green, you express the corresponding digits.

# F F 0 0 0 0 - Red

# 0 0 F F 0 0 - Green

+

-------------------------------

# F F F F 0 0 - Yellow

Similarly,

If you know magenta is a combination of red and blue, you express the corresponding hex digits.

# F F 0 0 0 0 - Red

# 0 0 0 0 F F - Blue

+

-----------------------------

# F F 0 0 F F - Magenta

And finally,

If you know cyan is a combination of green and blue, you express the corresponding hex digits.

# 0 0 F F 0 0 - Green

# 0 0 0 0 F F - Blue

+

----------------------------

# 0 0 F F F F - Cyan

What does it mean to "express the digits"?

If you know anything about how color works on a computer, you'll know that you can express a certain amount of red, green and blue to get almost any color. These are known as "RGB" values. In RGB, the red, green or blue can individually go from 0 - 255. Think of it like a slider for how much you want of each color.

In RGB:

RGB (255, 255, 255) - White

Hex is just a really convenient and shorthand way to write the RGB color values.

In Hex:

#FFFFFF - White

6 0
3 years ago
Brianna is taking a backpacking trip in the wilderness and wants to back up the photos from her camera. Which type of storage de
Katen [24]

Answer:

<u><em>C</em></u>

Explanation:

Flash drives usually have an input (E.G. one of those android charger connectors), so just plug that into your camera, and load the flash drive with the photos. Then go home and plug the USB on the flash drive into your PC. If there isn't already, a folder will be made in your "Pictures" folder on your PC, to which you can open the folder, and then your photos should be there. From there you can open them, print them, etc.

Hope this helped, and sorry if I didn't answer in time.

6 0
3 years ago
What is the defining difference between computer security and information security?
Alekssandra [29.7K]
Computer security is protection from theft or damage to their hardware, software, or information, as well as disruption or misdriection of the services they provide. As information security is the practice of preventing unauthorized access, use, disclosure, disruption, modification, inspection, recording, or destruction of information.
4 0
3 years ago
Audio tools support reading fluency by
Artist 52 [7]

Answer:

The answer is "demonstrating how a text is read".

Explanation:

Audio tools like Text to Speech are commonplace in programs like Duolingo. They offer you a somewhat accurate example of how to properly pronounce a word or phrase.

4 0
4 years ago
Read 2 more answers
I CANT DO SKIN MODS ON BRAWLHALLA RIGHT!!!! IM SO MADDDDDDDDDDD
gogolik [260]

I'm better then u in brawhlla

5 0
3 years ago
Other questions:
  • An internet service provider has three different subscription packages for its customers.  Package A: For $9.95 per month 10 ho
    10·1 answer
  • After modifying the /etc/default/grub file, what command should be run to rebuild the grub config files?​
    6·1 answer
  • A machine that is used to print newspaper is a
    12·2 answers
  • A ______ workstation is a network terminal that supports a full-featured user interface, but limits the printing or copying of d
    5·1 answer
  • 1. Landscapes are the one type of photograph in which you should always use the traditional perspective.
    15·2 answers
  • Which method will return the first element in an ArrayList employees?
    5·1 answer
  • Consider a two-link network where Host A is connected to the router by a 1 Mbps link with 10 ms propagation delay and the router
    6·1 answer
  • Animation timing is does not affect the
    10·1 answer
  • Engineers perform a(n) blank to compare the possible negative effects of making a decision involving technology with the possibl
    9·2 answers
  • SummaryIn this lab, you complete a partially prewritten Java program that uses an array.The program prompts the user to interact
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!