This program is written in java. 2D arrays (matrices/grids) Write a program that takes 20 student objects and stores them in an array.
This program is written in java.
2D arrays (matrices/grids)
Write a program that takes 20 student objects and stores them in an array.
Each Student object should have a first name and a last name.
Sort the array by student’s last name. You can use any of the sorts you have.
Then put the names into a 2D array that has 5 rows and 4 columns.
Create and print 2 seating charts by printing the 2D array, formatted as shown below.
Student 17 |
Student 18 |
Student 19 |
Student 20 |
Student 13 |
Student 14 |
Student 15 |
Student 16 |
Student 9 |
Student 10 |
Student 11 |
Student 12 |
Student 5 |
Student 6 |
Student 7 |
Student 8 |
Student 1 |
Student 2 |
Student 3 |
Student 4 |
second chart should look randomized, like this.
Student 4 |
Student 8 |
Student 12 |
Student 16 |
Student 20 |
Student 3 |
Student 7 |
Student 11 |
Student 15 |
Student 19 |
Student 2 |
Student 6 |
Student 10 |
Student 14 |
Student 18 |
Student 1 |
Student 5 |
Student 9 |
Student 13 |
Student 17 |
Step by step
Solved in 2 steps with 1 images