1.2.4 - types of programming language Flashcards
11
class
A template defining methods and attributes used to make objects.
attribute
Data associated with the class.
method
A functionality of the class - something that it can do, or that can be done with it.
Why are attributes declared private and methods public?
Allows other classes to use methods belonging to another class but may not see or change their attributes.
information hiding
A class cannot directly access the attributes of another class when they are declared private.
constructor method
Used to create objects in a class.
instantiation
The creation of a new object (an instance of a class).
getter method
Functions that return the value of an attribute.
setter method
Procedures which change the state of an object.
encapsulation
Binds together the attributes and methods that manipulate the data.
inheritance
Classes can inherit data and behaviour from a parent class.
synonym for child class
subclass
synonym for parent class
superclass
polymorphism
A programming language’s ability to process objects differently depending on their class.
overriding
Defining a method with the same name and formal argument types as a method inherited
from a superclass.