Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Change assignNewCourse() to do : - method should add the new Course to the courses field, but cannot assign the Course if the instructor is
Change assignNewCourse() to do :
- method should add the new Course to the courses field, but cannot assign the Course if the instructor is already assigned to the Course
- if the Course is aasigned, it should take all the students enrolled in the course and add them to the students ArrayList in the instructor class
- cannot be assigned if total course students is over 500, use a boolean to return whether successful or not
- if successful, set the instructor field for the Course to that Instructor.
- getNumStudents() to return the nunber of students the instructor has
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started