Code: public class RURottenTomatoes { public static void main (String[] args) { int r = Integer.parseInt(args[0]); int c = Integer.parseInt(args[1]); for ( int i = 0; i < args.length; i++ ) { int[][] array = new int[r][c]; } String input = args[0]; int n = input.length(); String temp; int arrayR = r; int arrayC = c; for ( int i = 0; i < r; i++ ) { temp = input.substring( i, i + 1 ); arrayR = arrayR + Integer.parseInt(temp); for ( i = 0; i < c; c++ ) { temp = input.substring( i + 1, i + 2 ); arrayC = arrayC + Integer.parseInt(temp); } } } } I did all this, but then stuck. I have no idea what to do next, and I think my code is wrong. Can you help me out doing this assignment? Please explain everything that you do

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Code: public class RURottenTomatoes { public static void main

(String[] args) { int r = Integer.parseInt(args[0]); int c = Integer.parseInt(args[1]); for ( int i = 0; i &lt; args.length; i++ ) { int[][] array = new int[r][c]; } String input = args[0]; int n = input.length(); String temp; int arrayR = r; int arrayC = c; for ( int i = 0; i &lt; r; i++ ) { temp = input.substring( i, i + 1 ); arrayR = arrayR + Integer.parseInt(temp); for ( i = 0; i &lt; c; c++ ) { temp = input.substring( i + 1, i + 2 ); arrayC = arrayC + Integer.parseInt(temp); } } } } I did all this, but then stuck. I have no idea what to do next, and I think my code is wrong. Can you help me out doing this assignment? Please explain everything that you do clearly! The instructions are below: RU Rotten Tomatoes. Write program RURottenTomatoes.java that creates a 2 dimensional integer array of movie ratings from the command line arguments and displays the index of the movie that has the highest sum of ratings. Ratings range from 1 to 5 (inclusive). The rows of the 2D array correspond to movie reviewers and the columns of the 2D array correspond to movies. The reviewer at index 2 gave movie at index 0 a rating of 4. Take a look at the following example for an explanation on the command line arguments sequence. Note 1: assume that the order of the first two input arguments are the number of rows and the number of columns. Note 2: assume that there are enough arguments to completely fill the 2D array. Note 3: if multiple movies have the same highest sum of ratings, display the movie with the lowest index. DO NOT use System.exit() DO NOT add any import statements DO NOT add the project or package statements DO NOT change the class name DO NOT change the headers of ANY of the given methods DO NOT add any new class fields ONLY print the result as specified by the example for each problem. DO NOT print other messages, follow the examples for each problem.

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY