Objects (OOP) (OCR A-Level Computer Science): Quizzes
📚Quizzes
Practise the questions
12 questions from this quiz
ShowHide
Practise the questions
12 questions from this quiz
In OOP, what is a class?
In OOP, what is a class?
A blueprint defining object structure
What is an object in OOP?
What is an object in OOP?
An instance of a class
How do you create an object from a class?
How do you create an object from a class?
Call the class like a function
What do attributes represent in an object?
What do attributes represent in an object?
The state of an object
What are methods in OOP?
What are methods in OOP?
Functions defined within a class
What can methods do with object attributes?
What can methods do with object attributes?
Use and modify them
How can you change an object's attributes?
How can you change an object's attributes?
Directly or by using methods
How do multiple objects of the same class operate?
How do multiple objects of the same class operate?
They operate independently
What does encapsulation in OOP refer to?
What does encapsulation in OOP refer to?
Bundling data and actions together
What makes each object a unique instance?
What makes each object a unique instance?
Having its own attribute values
What is the purpose of the init method?
What is the purpose of the init method?
To initialise an object
How can you trace an object in a program?
How can you trace an object in a program?
By inspecting its attribute values
