Question: Fall 2016 Lab Exercise 6.1 COMP 248-PJ-PK-QK Due date: Today, at the end of the lab period Login to the PC2 Lab System. Refer to

Fall 2016 Lab Exercise 6.1 COMP 248-PJ-PK-QK Due date: Today, at the end of the lab period Login to the PC2 Lab System. Refer to the C248LablnstructionForStudents document for instructions. If you did not bring your copy of the instructions, download the version available on the H: drive and save it on your computers desktop Lab Question: Mathieu is a computer science student at Concordia. He wants to create an NxN matrix with the values from 1 to N2, stored in the following manner: the first values will be stored consecutively left to right in the top right triangle of the matrix (hence the value 1 will be stored at the top left corner of the matrix, then the next consecutive values will be stored left to right in the bottom triangle of the matrix (hence the value N2 will be stored at the bottom row at the penultimate column of the matrix) The figure below illustrates the expected order with a 4x4 matrix The program asks for one integer input from the user that represents the number of rows and columns of the matrix (N). For example, if the user enters 4 The program output should be (without the triangle) 4 12 13 9 14 15 16 0 Hint: The use of a 2-D array is recommended Important: There is a tab between the numbers in the columns. For example, there is one tab between 1 and 2. There is no extra line between rows. For example, there is no extra line between 1 and 12 Reminder: When submitting your solution to the lab system, make sure there is no package statement at the top of your . java file as this will result in a grade of 0 (restriction of this system). https://www.coursehero.com/file/2517607248-lab6-1-PJ-PK-QKpdf
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
