Ch1 Flashcards
What is Object Oriented Programming?
A programming paradigm that was created to deal with the growing complexity of large software systems
What happens as applications grow in size and complexity?
They become increasingly difficult to maintain. One change in code can have a ripple effect throughout the program
What does OO programming allow programmers to do?
Allows them to create containers for data that can be manipulated without affecting the entire program
What is encapsulation?
A form of data protection so that data cannot be manipulated without obvious intention
What does encapsulation do?
Defines the boundaries in your application and allows code to achieve new levels of complexity
What is polymorphism?
It is the ability for different data types to respond to a common interface
What is inheritance?
Where a class inherits the behaviors of another class, referred to as the superclass
What does inheritance do?
Gives the power to define basic classes with large reusability and smaller subclasses for more fine-grained, detailed behaviors
What is another way to apply Polymorphic structure?
Using a module
What is a module?
Similar to classes in that they shared contained behaviors; but you cannot create an object with a module
How do you mix a module in with a class?
The include method
What happens after mixing in a module?
The behaviors declared in that module are available to the class and it’s objects
What is an object?
Anything that is said to have a value is an object. E.g., strings, integers, arrays, hashes etc.
What are objects created from?
Classes
What about objects is defined in classes?
Attributes and behaviors