Question: Step 1. The starting code you ran in Step O only prints the first room. Modify the printRooms function so that it prints all numrooms

 Step 1. The starting code you ran in Step O onlyprints the first room. Modify the printRooms function so that it prints

Step 1. The starting code you ran in Step O only prints the first room. Modify the printRooms function so that it prints all numrooms rooms, by using a loop. If your changes are successful, when you compile and run it, ZoomRooms should now print out the headers for Rooms 0 and 1, as shown below. Note that there are still no student names printed yet, which will be addressed in the next step. $ java-introcs ZoomRooms greedy 3 Room: Room: 1 // Prints out the students in all rooms public static void printRooms(int numRooms, int[] assignedRooms, String[] studentNames) { STUDENT CODE BEGIN STEP 1 // This code is just temporary and should be replaced: // For now it just prints room O. Add a loop so that it prints all numRooms. printRoom(0, assignedRooms, studentNames); // STUDENT CODE END STEP 1

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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!