Lesson 4.1.2.3
4.1.2.3 Object-oriented programming and class diagrams Quiz: AQA Computer Science, Unit 1
20 questions
In partnership with Revision Ninja
Lesson 4.1.2.3, Object-oriented programming and class diagrams: 20 multiple choice questions for the AQA Computer Science (7517), Unit 1: Fundamentals of programming, written with Revision Ninja.
Host it live on the board and students join with a game code on their own devices, or revise alone with Free Play. The answers are revealed in the game.
The 20 questions
-
In object-oriented programming, what acts as a template for creating objects?
- Method
- Variable
- Class
- Attribute
-
In object-oriented programming, what is a single instance of a class called?
- Attribute
- Object
- Interface
- Method
-
What term describes the process of creating an object from a class?
- Instantiation
- Inheritance
- Polymorphism
- Encapsulation
-
Combining data and methods within a class while restricting direct access is called what?
- Aggregation
- Encapsulation
- Inheritance
- Polymorphism
-
Which concept allows a subclass to acquire attributes and methods from a parent class?
- Encapsulation
- Inheritance
- Aggregation
- Composition
-
Which OOP concept allows different classes to implement the same method in distinct ways?
- Polymorphism
- Instantiation
- Encapsulation
- Aggregation
-
Replacing an inherited parent method with a custom implementation in a subclass is called what?
- Instantiation
- Method overriding
- Method overloading
- Encapsulation
-
In a UML class diagram, which symbol represents a composition relationship?
- Dashed line
- White diamond
- Black diamond
- Open arrowhead
-
In a UML class diagram, which symbol represents an aggregation relationship?
- Dotted line
- White diamond
- Solid arrowhead
- Black diamond
-
What do the symbols +, - and # represent in a UML class diagram?
- Member visibility
- Data types
- Inheritance order
- Operator overloading
-
Which OOP concept hides an object's internal state and only exposes necessary methods?
- Polymorphism
- Inheritance
- Encapsulation
- Instantiation
-
In UML class diagrams, which symbol represents a composition relationship?
- Filled diamond
- Dashed arrow
- Hollow diamond
- Solid arrow
-
A class Car has an attribute engine of type Engine. The Car is destroyed when the Engine must not exist independently. Which relationship is this?
- Aggregation
- Inheritance
- Polymorphism
- Composition
-
A class Department contains a list of Teacher objects that exist independently of the Department. Which relationship fits best?
- Composition
- Overriding
- Aggregation
- Encapsulation
-
Which OOP concept allows a subclass to provide a specific implementation of a parent class method?
- Overloading
- Overriding
- Aggregation
- Instantiation
-
Which access modifier makes an attribute usable only within its own class?
- private
- public
- protected
- static
-
Which access modifier allows a member to be used in subclasses but not by unrelated code?
- private
- protected
- public
- abstract
-
Which term describes a method declared without an implementation in its defining class?
- Abstract method
- Static method
- Private method
- Virtual method
-
Which type of method can be called directly on a class without instantiating an object?
- Virtual method
- Static method
- Protected method
- Abstract method
-
In a standard three-section UML class box, which section lists the methods?
- Bottom section
- Middle section
- Header section
- Top section
Related quizzes
- Data types Quiz · 4.1.1.1 · 20 questions
- Programming concepts: sequence, selection and iteration Quiz · 4.1.1.2 · 20 questions
- Arithmetic operations Quiz · 4.1.1.3 · 20 questions
- Relational and Boolean operations Quiz · 4.1.1.4 · 20 questions
- Constants and variables Quiz · 4.1.1.6 · 20 questions
- String-handling operations Quiz · 4.1.1.7 · 20 questions
- Random numbers and exception handling Quiz · 4.1.1.8 · 20 questions
- Subroutines Quiz · 4.1.1.10 · 20 questions
- Parameters and returning values Quiz · 4.1.1.11 · 20 questions
- Local and global variables Quiz · 4.1.1.13 · 20 questions