Question 1
Learning objective
Object-oriented programming: Be familiar with the concepts of: • class • object • instantiation • encapsulation • inheritance • aggregation • composition • polymorphism • overriding. Students should know that: • a class defines methods and property/ attribute fields that capture the common behaviours and characteristics of objects • objects based on a class are created using a constructor, implicit or explicit, and a reference to the object assigned to a reference variable of the class type • in the Unified Modelling Language (UML) composition is represented by a black diamond line and aggregation by a white diamond line. Know why the object-oriented paradigm is used. Be aware of the following object-oriented design principles: • encapsulate what varies • favour composition over inheritance • program to interfaces, not implementation. Students would benefit from practical experience of programming to an interface, but will not be explicitly tested on programming to interfaces or be required to program to interfaces in any practical exam. 46 Be able to write object-oriented programs. Practical experience of coding for user-defined classes involving: • abstract, virtual and static methods • inheritance • aggregation • polymorphism • public, private and protected specifiers. Be able to draw and interpret class diagrams. Class diagrams involving single inheritance, composition (black diamond line), aggregation (white diamond line), public (+), private (-) and protected (#) specifiers.
Read the explanation, check the common trap, then practise with flashcards and questions.
At a glance
0
Flashcards
0
Questions
Topic
Programming paradigms
Subtopic
Object-oriented programming
Study support
Understand this objective
Quick explanation
Object-oriented programming: Be familiar with the concepts of: • class • object • instantiation • encapsulation • inheritance • aggregation • composition • polymorphism • overriding. Students should know that: • a class defines methods and property/ attribute fields that capture the common behaviours and characteristics of objects • objects based on a class are created using a constructor, implicit or explicit, and a reference to the object assigned to a reference variable of the class type • in the Unified Modelling Language (UML) composition is represented by a black diamond line and aggregation by a white diamond line. Know why the object-oriented paradigm is used. Be aware of the following object-oriented design principles: • encapsulate what varies • favour composition over inheritance • program to interfaces, not implementation. Students would benefit from practical experience of programming to an interface, but will not be explicitly tested on programming to interfaces or be required to program to interfaces in any practical exam. 46 Be able to write object-oriented programs. Practical experience of coding for user-defined classes involving: • abstract, virtual and static methods • inheritance • aggregation • polymorphism • public, private and protected specifiers. Be able to draw and interpret class diagrams. Class diagrams involving single inheritance, composition (black diamond line), aggregation (white diamond line), public (+), private (-) and protected (#) specifiers
- This point belongs to Programming paradigms, especially Object-oriented programming.
- You need to be able to object-oriented programming: Be familiar with the concepts of: • class • object • instantiation • encapsulation • inheritance • aggregation • composition • polymorphism • overriding. Students should know that: • a class defines methods and property/ attribute fields that capture the common behaviours and characteristics of objects • objects based on a class are created using a constructor, implicit or explicit, and a reference to the object assigned to a reference variable of the class type • in the Unified Modelling Language (UML) composition is represented by a black diamond line and aggregation by a white diamond line. Know why the object-oriented paradigm is used. Be aware of the following object-oriented design principles: • encapsulate what varies • favour composition over inheritance • program to interfaces, not implementation. Students would benefit from practical experience of programming to an interface, but will not be explicitly tested on programming to interfaces or be required to program to interfaces in any practical exam. 46 Be able to write object-oriented programs. Practical experience of coding for user-defined classes involving: • abstract, virtual and static methods • inheritance • aggregation • polymorphism • public, private and protected specifiers. Be able to draw and interpret class diagrams. Class diagrams involving single inheritance, composition (black diamond line), aggregation (white diamond line), public (+), private (-) and protected (#) specifiers.
- Use the linked flashcards and practice questions to check recall, then practise applying the idea in an exam-style answer.
Why it matters
This objective helps connect Object-oriented programming to exam-style questions, flashcards, and revision notes for Programming paradigms.
Quick student answer
Which statement best describes a class?
Direct answer
A blueprint that defines common methods and property or attribute fields for objects
Key terms
- Polymorphism: An object-oriented concept in which related classes can provide class-specific behaviour through a shared class-based relationship.
- Aggregation: A whole-part relationship represented in UML by a white diamond line.
Common trap
Confusing composition and aggregation notation: Remember that composition uses a black diamond line, while aggregation uses a white diamond line.
Related questions
Try this as a practice card
Question 1 of 4
Choose an answer, get feedback, then move sideways through the set.
Flashcard prompts
Flip through the key recall cards
Flashcard 1 of 4
Revision tools
Choose how to practise
Flashcards0 linked cards
Practice Questions0 linked questions
Related learning objectives
- Programming paradigms: Understand the characteristics of the procedural- and object-oriented programming paradigms, and have experience of programming in each.
Programming paradigms
- Procedural-oriented programming: Understand the structured approach to program design and construction. Be able to construct and use hierarchy charts when designing programs. Be able to explain the advantages of the structured approach.
Procedural-oriented programming
