Flashcards
Object Orientation (OOP)
Cards in this deck (12)
- 1What is a class?A class defines methods and property/attribute fields that capture the common behaviors and characteristics of objects.
- 2What is an Object?Objects based on a class are created using a constructor and a reference to the object assigned to a reference variable of the class type.
- 3What is a procedure?Procedures and functions are grouped around related data to create an object.
- 4How do objects work?Objects use attributes and methods from the class so they all start off behaving in the same way.
- 5What is a constructor?Constructors are a special method which in OOP allows the programmer to have some control over how the objects are initialized.
- 6How are constructors created?They are created when a class instantiates an object and every defined class will have what is known as a default constructor.
- 7How are they done in python?Def__init__(self, classvariables)
- 8What is encapsulation?The concept of grouping data and methods together is referred to as Encapsulation. This allows for separation between the interface and the implementation.
- 9How do subroutines work?The subroutines (functions and procedures) act on the data within the object.
This is one of the main concepts of OOP as this allows objects to be self-contained. - 10What is an attribute?Attributes is a data item that helps define or describe the object (like variables in procedural terms).
- 11What is inheritance?Inheritance is when a class inherits another classes variables and procedures.
- 12—
Information
- Description
- A level Computing Flashcards on Object Orientation (OOP), created by Noah Barker on 09/11/2022.
- Created by
- Noah Barker
- Views
- 0
- Rating