Question: You are writing a method in the MidtermD class. Given field: IILec: LinkedList object containing LectureHall objects Write a method, removeLectureHalls. This is a void

You are writing a method in the MidtermD class. Given field: IILec: LinkedList object containing LectureHall objects Write a method, removeLectureHalls. This is a void method with no parameters. The method removes from the LinkedList all LectureHall objects that do not have any courses scheduled in them. You must use a while loop and an Iterator object for full marks. In your method, you must use method numCourses in the LectureHall class. It has no parameters and returns the number of Courses scheduled in that LectureHall. Javadoc comments, comments within the method, and proper formatting are required for full marks. Use at least 3 spaces for each indentation. Everything that you need to know about the LectureHall and Course classes is included above
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
