Object Oriented Programming Flashcards
1
Q
What is object-oriented programming?
A
Programming built around objects and their interactions
2
Q
Define classes
A
A class is the set of instructions that describe how an object can behave and what information it contains
A class is a blueprint for an object
Classes are nouns
3
Q
Define an instance
A
Instances are objects that are based on classes.
Synonymous with instance variable, object or member
Objects are adjectives
4
Q
Why do we use to constructor method?
A
To provide initial values to the instance variables
5
Q
Define a method
A
A method is a behavior of an object inside of a class
methods are verbs