COMP 249 FINAL REVISION 2024 EXAM PREP (Object-Oriented Programming II) (Concordia University)
COMP 249 FINAL REVISION 2024 EXAM PREP (Object-Oriented Programming II) (Concordia University) INHERITANCE -Public class DerivedClass extends BaseClass{...} -Although a subclass inherits all members of its superclass, it cannot access the superclass’s private members by name -Inheritance implements an is-a relationship, because a subclass is a more specialized version of its superclass and composition is an has-a relationship -The class Object is the only class without a superclass (base class) -The class Object is the superclass of all classes. -The access permission of overridden methods: can be changed to something more permissive but not to something more restrictive -instanceof returns true if it is a member of this class or if it is a descendent of that class(getClass is more exact) -a static variable is specific to the class and not the object itself
Written for
- Institution
-
Concordia University (
)
- Study
- Unknown
Document information
- Uploaded on
- December 8, 2024
- Number of pages
- 15
- Written in
- 2024/2025
- Type
- Exam (elaborations)
- Contains
- Unknown
Subjects
- comp 249
-
comp 249 final revision 2024
Also available in package deal