Lesson 1.2.4a
1.2.4a Programming paradigms, procedural and object-oriented languages Quiz: OCR Computer Science, Unit 2
20 questions
In partnership with Revision Ninja
Lesson 1.2.4a, Programming paradigms, procedural and object-oriented languages: 20 multiple choice questions for the OCR Computer Science (H446), Unit 2: Software and software development, 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
-
Which programming paradigm focuses on describing what the computer should achieve rather than how?
- Declarative
- Object-oriented
- Imperative
- Procedural
-
Which paradigm organises code into reusable blocks of instructions called procedures and functions?
- Logic
- Declarative
- Functional
- Procedural
-
What term describes a blueprint or template used to create objects in object-oriented programming?
- Class
- Method
- Instance
- Attribute
-
What is the process of creating an individual object from a class definition called?
- Instantiation
- Polymorphism
- Inheritance
- Encapsulation
-
Which OOP concept hides internal object details and restricts direct access to attributes?
- Polymorphism
- Encapsulation
- Inheritance
- Abstraction
-
What OOP feature allows a subclass to acquire properties and methods from a superclass?
- Inheritance
- Instantiation
- Polymorphism
- Encapsulation
-
Which OOP concept allows methods with the same name to behave differently in different classes?
- Polymorphism
- Inheritance
- Instantiation
- Encapsulation
-
What special method is automatically run when a new object is created from a class?
- Setter
- Getter
- Constructor
- Destructor
-
An attribute in a class should only be readable via a method. Which access modifier is best?
- Protected
- Global
- Private
- Public
-
A Dog class has a breed attribute and a bark action. What is the bark action called?
- Attribute
- Method
- Class
- Constructor
-
If Car is a class definition, what is myCar created from it called?
- Procedure
- Object
- Method
- Attribute
-
Which type of method specifically retrieves the current value of a private class attribute?
- Setter
- Constructor
- Destructor
- Getter
-
A subclass defines a method with identical name and parameters as its superclass. What is this?
- Data hiding
- Class instantiation
- Method overloading
- Method overriding
-
Passing a variable where the subroutine receives a copy of its value is called what?
- Pass by address
- Pass by pointer
- Pass by reference
- Pass by value
-
Passing a parameter so that modifications inside the subroutine affect the original variable is called what?
- Pass by value
- Pass by copy
- Pass by literal
- Pass by reference
-
Which programming paradigm uses mathematical functions and avoids changing state or mutable data?
- Object-oriented
- Procedural
- Imperative
- Functional
-
In OOP, what type of relationship exists when a Student class inherits from a Person class?
- Is-a
- Part-of
- Uses-a
- Has-a
-
A Car class contains an Engine class object. What type of relationship is this?
- Polymorphic
- Inherited
- Has-a
- Is-a
-
Which access modifier allows attribute access within the class and any of its subclasses only?
- Protected
- Global
- Public
- Private
-
Which type of method is used to modify the value of a private class attribute?
- Getter
- Constructor
- Destructor
- Setter
Related quizzes
- Operating systems and memory management Quiz · 1.2.1a · 20 questions
- Interrupts, scheduling, OS types, BIOS, device drivers and virtual machines Quiz · 1.2.1b · 20 questions
- Types of application, utilities and open vs closed source Quiz · 1.2.2a · 20 questions
- Translators, compilation stages, linkers and loaders Quiz · 1.2.2b · 20 questions
- Software development lifecycles and methodologies Quiz · 1.2.3 · 20 questions
- Assembly language, Little Man Computer and memory addressing modes Quiz · 1.2.4b · 20 questions
- Processor components: ALU, control unit, registers and buses Quiz · 1.1.1a · 20 questions
- Compression, encryption and hashing Quiz · 1.3.1 · 20 questions
- Primitive data types and binary number representation Quiz · 1.4.1a · 20 questions
- Data Protection Act 1998 and Computer Misuse Act 1990 Quiz · 1.5.1a · 20 questions