Question: I am working on a assignment about the Java Programming, in Task 2, I need to modify the method listThem() to list out the room
I am working on a assignment about the Java Programming, in Task 2, I need to modify the method listThem() to list out the room like this "The rooms are the kitchen , the ballroom , the conservatory , the billiard room , the library , the study , the hall , the lounge , the dining room.", but I need to use the specified requirement and it is showed in image 1, the image 2 is for me to modify the enum Room.java, and it will be used for Task 3 and Task 4, but I am stucked in Task 2.
Image 1:

Image 2:

Task 2 The rooms in which the murder might take place are already identified by an enum called Room.java. It contains this method public static void listThem() \{ //Replace this for Task 2 \} This is the method that should produce the list of rooms that follows the list of suspects in the initial example above. Modify this method so it works, ideally 3 COM1003 Java Programming - Assignment 3 even if another room is added to the list. In order to do this you will find the static method values () that all enums, including Room, have a built in. This method returns an array of all the enum objects in the order they were declared. Room already has a to String() method you should use to print them out. The list should start "The rooms are " as in the example. If you do this with a well written method that demonstrate the techniques identified in the marking scheme you can expect to get another 10% so 32% in all and your output, when you run the program Assignment3.java will now include the line about the rooms
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
