Chapter 1 Flashcards
Encapsulation
Encapsulation is the packing of data and functions into a single component.
Object
An instance or manifestation of an object class.
Class
may be thought of as the blueprint or pattern; the object itself is the thing created from that blueprint or pattern.
Instantiated.
When an object (an instance of a class) is created, it is said to be instantiated.
Class attributes
Class attributes or Class Variable. Belong to class and not an object
object attributes (or instance attributes).
We use the convention that any attribute is assumed to be an instance attribute unless we explicitly call it a class attribute.
Class method
controls access to the class variables and also performs any tasks that might have classwide effects rather than merely objectwide.
Inheritance
Inheritance is a relation between two classes. A child class inherits all the features of its parent class. Methods from the parent can be overridden in the child and new logic can be added.
Subclass
When a class B inherits from a class A, we say that B is a subclass of A.
Superclass
When a class B inherits from a class A, we say that A is the superclass of B.
(MI)Multiple Inheritance
Ruby does not allow.
What Is Polymorphism?
??
Module?
A module is a collection of methods and constants that is external to the Ruby program. It can be used simply for namespace management, but the most common use of a module is to have its features “mixed” into a class (by using include). In this case, it is used as a mixin.
Raise
??
Ensure
??