Functions and Objects Flashcards
1
Q
What is a function?
A
Is a reusable piece of code that executes a particular function within a program.
2
Q
What is an Object?
A
Object are instances of classes that contain attributes and methods of how to use a certain class?
3
Q
What’s a Method, Attributes and Properties?
A
- Attributes are values and data types that define the object.
- Methods define what you can do to an object. E.g: Deleting an object.
- Properties are methods that control how the attributes are accessed or modified.