Question: AP CS A Unit 5 January 22nd, 2019 (a) Write the constructor for the Seating Chart class. The constructor initializes the seats instance variable to

 AP CS A Unit 5 January 22nd, 2019 (a) Write the

AP CS A Unit 5 January 22nd, 2019 (a) Write the constructor for the Seating Chart class. The constructor initializes the seats instance variable to a two-dimensional array with the given number of rows and columns The students in student List are copied into the seating chart in the order in which they appear in studentList. The students are assigned to consecutive locations in the array seats, starting at seats[0][0] and filling the array column by column. Empty seats in the seating chart are represented by null. For example, suppose a variable List roster contains references to Student objects in the following order. A SeatingChart object created with the call new Seating Chart(roster, 3, 4) would have seats initialized with the following values. "Karen" "Lester "Glen" "Danny" "Liz" "Henry" "Fran" 6 null "Paul" "Renee" "David" null Write your solution on the next page

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

To write the constructor for the SeatingChart class we need to initialize a twodimensional array of ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!