OOP Flashcards
What is a method?
A method is a function which is a property of an object.
How can you tell the difference between a method definition and a method call?
the definition is inside the function and and it has {} function call dont have defination and it has ()
Describe method definition syntax (structure).
variable variableName = {property: value or function}
Describe method call syntax (structure).
objectName.functioName()
How is a method different from any other function?
method can also have function and function can be the value of the property of the object
What is the defining characteristic of Object-Oriented Programming?
objects can contain both data (as properties) and behavior (as methods).
What are the four “principles” of Object-Oriented Programming?
Abstraction
Encapsulation
Inheritance
Polymorphism
What is “abstraction”?
being able to work with (possibly) complex things in simple ways. You
What does API stand for?
application programming interface
What is the purpose of an API?
api is collection of tool that can be use in other software