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
Ivenika [448]
3 years ago
9

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:
PolarNik [594]3 years ago
7 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
List of most popular entertainment and culture websites
vichka [17]
Reddit 
Buzzfeed
Ohmygossip
Unitedbypop
(YOU KNOW YOU COULD JUST TYPE THAT IN GOOGLE)
5 0
3 years ago
Set of general format used to write program in any programming language?​
Novosadov [1.4K]

Answer:

hope you find it right

Explanation:

The process of writing computer instructions in a programming language is known as Coding.

A computer program is usually written by a computer programmer in a programming language. From the program in its human-readable form of source code, a compiler can derive machine code—a form consisting of instructions that the computer can directly execute.

That line of code is written in the Python programming language. Put simply, a programming (or coding) language is a set of syntax rules that define how code should be written and formatted. Thousands of different programming languages make it possible for us to create computer software, apps and websites.

In programming, code (noun) is a term used for both the statements written in a particular programming language - the source code , and a term for the source code after it has been processed by a compiler and made ready to run in the computer - the object code .

5 0
2 years ago
On what dates did the 2016 Olympics take place( list all)
kow [346]
Hi!

The 2016 Olympics took place from August 5th, 2016 - August 21st, 2016.
3 0
3 years ago
Read 2 more answers
Do you think the current system of punishment in the United States works? Why? What would you change?
Simora [160]

Well the fact that jails are overcrowded is one factor that shows it's not working. Some people need help from past traumas, abuse, etc. Not everyone that acts out needs to be incarcerated, they need rehabilitation or counseling. Definitely depends on the crime committed. Therefore substance abuse users would be in rehabilitation. Even Juveniles in detention centers don't benefit from incarceration for certain offenses. There is no rehabilitation in incarceration. There are more criminals in jail and incarceration in my opinion, only for some offenders, is the last option. Now for Sex Offenders, Murderers and Criminals with violent crimes my opinion is completely opposite. Some of those offenders should be dealt with according to their crime. Also, all of the people that have been pardoned and them lessening time for drug traffickers and actual drug dealers (not necessarily users) is just a bad thing to pardon them or let them out because they don't have any violent crimes. Isn't dealing drugs, that are killing people every single day just as bad as a violent crime. In my opinion they can sit and rot for the longevity of their sentence. Some need help and I would fully support that only under some circumstances. Others I would rather not have to live amongst them.

8 0
3 years ago
Candy Kane Cosmetics (CKC) produces Leslie Perfume, which requires chemicals and labor. Two production processes are available:
Vilka [71]

Answer:

  1. Divide the resources into three parts using the corresponding process 1, process 1, and process 2 formats to maximize the use of the resources.
  2. Get the expected revenue by calculating the product of the total perfume in ounce and the price of an ounce of perfume.
  3. Increase the advertisement hours of the product.
  4. subtract the advert fee from the generated revenue to get the actual revenue.
  5. subtract the cost of production from the actual revenue to get the actual profit.

Explanation:

The get maximum profit, all the resources must be exhausted in production. The labor is divided into a ratio of 1:1:2 ( which is 5000, 5000, 1000), while the chemical units are in the ratio of 2:2:3 (10000,10000,15000). This would produce in each individual processes; 15000, 15000 and 25000 oz, which is a total of 55000 oz of perfume.

The expected revenue is $275000. If 1000oz from the 55000oz of perfume is sold without advertisement, model Jenny's awareness of the perfume increases the demand by 200oz per hour, therefore, 24hours would field 4800oz demanded, which would only take 270 hours to distribute all remaining perfumes.

The cost of production would be $130000 for labor and chemical resources plus the advert cost of $27000 ( 270 hours by 100) which is a total cost of $157000. The actual profit is $118000 ( $275000 - $157000).

3 0
2 years ago
Other questions:
  • Categories of general purpose application software and examples each​
    13·1 answer
  • A typical serial cable has
    13·1 answer
  • Which of the following is not considered as part of technology literacy?
    8·1 answer
  • Describe how antipoverty programs can discourage the poor from working. How might you reduce this disincentive? What are the dis
    11·1 answer
  • What are the features of Cobol language that make it suitable for programming business applications.
    6·1 answer
  • 8.13 LAB: Elements in a range Write a program that first gets a list of integers from input. That list is followed by two more i
    8·1 answer
  • Write a program that first reads in the name of an input file, followed by two strings representing the lower and upper bounds o
    8·1 answer
  • Dr. Kim divides a programming class into groups. Each group will create a large program as their
    15·2 answers
  • What happens on your screen when you click on the eyedropper tool in Scratch? The background of your scene will become transpare
    7·1 answer
  • write a recursive bool valued function containsvowel that accepts a string and returns true if the string contains a vowel
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!