System Analysis and Project Management question: Consider the following classes.
ID: 3848057 • Letter: S
Question
System Analysis and Project Management question:
Consider the following classes. In the above diagram, UndergradStudent and GradStudent are sub classes of Student. CheckDean'sList is a method that determines whether a student will be honored as a Dean's List student. The criteria for this determination are different for graduate and undergraduate students. The symbol '-' stands for private and '+" stands for public. In the above diagram, 1) Which attributes are inherited by UndergradStudent? GradStudent? Student? 2) Which methods are inherited by UndergradStudent? GradStudent? Student? 3) Which element in the above diagram is an example of polymorphism? 4) What is the interface for student?Explanation / Answer
1. No attributes are inherited by UndergradStudent and GradStudent as all the attribute in the Student are private.
2. computeGPA is inherited by UndergradStudent and GradStudent (Because it is the public method in Student, other attribute are private).
3. computeGPA is an example of polymorphism as it is defined in Student and overriden in GradStudent
4. No interface for Student is defined for above scenario.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.