0%
0 / 12 answered

Impact of Program Design Practice Test

12 Questions
Question
1 / 12
Q1

A course management platform includes Course, Student, and Instructor classes. Course has a list of enrolled students and a Gradebook. The platform supports InPersonCourse and OnlineCourse, both extending Course. Each course type calculates participation differently, so both override a method like computeParticipationScore(student). The Gradebook calls computeParticipationScore through a Course reference when generating final grades. The team wants to add HybridCourse later without changing Gradebook. Considering the class design, how does polymorphism in the described classes benefit the program?

Question Navigator