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.

Host this setFree Play

The 20 questions

  1. In object-oriented programming, what acts as a template for creating objects?

    • Method
    • Variable
    • Class
    • Attribute
  2. In object-oriented programming, what is a single instance of a class called?

    • Attribute
    • Object
    • Interface
    • Method
  3. What term describes the process of creating an object from a class?

    • Instantiation
    • Inheritance
    • Polymorphism
    • Encapsulation
  4. Combining data and methods within a class while restricting direct access is called what?

    • Aggregation
    • Encapsulation
    • Inheritance
    • Polymorphism
  5. Which concept allows a subclass to acquire attributes and methods from a parent class?

    • Encapsulation
    • Inheritance
    • Aggregation
    • Composition
  6. Which OOP concept allows different classes to implement the same method in distinct ways?

    • Polymorphism
    • Instantiation
    • Encapsulation
    • Aggregation
  7. Replacing an inherited parent method with a custom implementation in a subclass is called what?

    • Instantiation
    • Method overriding
    • Method overloading
    • Encapsulation
  8. In a UML class diagram, which symbol represents a composition relationship?

    • Dashed line
    • White diamond
    • Black diamond
    • Open arrowhead
  9. In a UML class diagram, which symbol represents an aggregation relationship?

    • Dotted line
    • White diamond
    • Solid arrowhead
    • Black diamond
  10. What do the symbols +, - and # represent in a UML class diagram?

    • Member visibility
    • Data types
    • Inheritance order
    • Operator overloading
  11. Which OOP concept hides an object's internal state and only exposes necessary methods?

    • Polymorphism
    • Inheritance
    • Encapsulation
    • Instantiation
  12. In UML class diagrams, which symbol represents a composition relationship?

    • Filled diamond
    • Dashed arrow
    • Hollow diamond
    • Solid arrow
  13. 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
  14. A class Department contains a list of Teacher objects that exist independently of the Department. Which relationship fits best?

    • Composition
    • Overriding
    • Aggregation
    • Encapsulation
  15. Which OOP concept allows a subclass to provide a specific implementation of a parent class method?

    • Overloading
    • Overriding
    • Aggregation
    • Instantiation
  16. Which access modifier makes an attribute usable only within its own class?

    • private
    • public
    • protected
    • static
  17. Which access modifier allows a member to be used in subclasses but not by unrelated code?

    • private
    • protected
    • public
    • abstract
  18. Which term describes a method declared without an implementation in its defining class?

    • Abstract method
    • Static method
    • Private method
    • Virtual method
  19. Which type of method can be called directly on a class without instantiating an object?

    • Virtual method
    • Static method
    • Protected method
    • Abstract method
  20. In a standard three-section UML class box, which section lists the methods?

    • Bottom section
    • Middle section
    • Header section
    • Top section

All AQA Computer Science quizzes