USE THIS FOR INTRO TO COMPUTING Flashcards
What is object-orienting programming?
Object-orienting programming allows a program to solve problems by programming objects that interact with each other.Classes are made to create objects which contain methods and attributes
Define class in OOP
A template used to define an object.It specifies the methods and attributes an object should have.
Define Object in OOP
An instance of a class
Define Method in OOP
A subroutine associated with an object
One type is a constructor- defines how an object is created
Define Attirtubute in OOP
Variables contained within and associated to an object
Define Encapsulation in OOP
Ensuring private attributes can only be amended through public methods.This prevents objects being, manipulated in unintended ways
Define Inheritance in OOP
The ability for a class to inherit the methods and attributes of a parent class .its child class can have its own methods and attribute and override methods of its parents class
Define Polymorphism in OOP
Meaning ‘many forms’ polymorphism is the ability for objects of different classes to be treated in the same way
For example, the same method may be applied to objects of different classes