Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Having difficulty with a java assignment. The book for the class is Introduction

ID: 3853063 • Letter: H

Question

Having difficulty with a java assignment. The book for the class is Introduction to Java Programming, Comprehensive Version Y. Daniel Liang & Prentice Hall 11th Edition / 2018. We are currently working in Chapter 8, Multidimensional Arrays. Below are the questions to the problems. I’m lost in the sauce I need help.

Declare an array variable (not a populated array, numbers only) for each of the following situations.

Below is the array string for question 2, and 3. I got these wrong. In bold you will see my instructors comments. Can someone help me to fix these two. I think I'm no the right track, it just needs to be tweaked a little.

The second one, you have allocated 5 students with 5 names each. We only need first and last name. The 3rd one, you have allocated 5 student's last names but only 9 assignments. Hint, the first column holds the student's last name. Resubmit for number 2 and 3

2)  5 Student’s first and last names

String firstAndLastNames[][] = new String[5][5];   ? How do I fix this one.

3)  5 Student’s last names and 10 assignment names that can be either essays or labs, not both.

String lastNameAndAssignment[][] = new String[5][10]; ? How do I fix this one.

Explanation / Answer

2) String firstAndLastNames[][] = new String[5][2];

   Explanation:- The above array contains 5 rows and 2 columns. one column corresponds to firstName and other column corresponds to lastname. 5 rows correspond to the 5 students.

3) String lastNameAndAssignment[][] = new String[5][11];

Explanation:- The above array contains 11 columns. first column corresponds to last name and other 10 columns correspond to the assignment names.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote