Chapter 1 Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

Encapsulation

A

Encapsulation is the packing of data and functions into a single component.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Object

A

An instance or manifestation of an object class.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Class

A

may be thought of as the blueprint or pattern; the object itself is the thing created from that blueprint or pattern.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Instantiated.

A

When an object (an instance of a class) is created, it is said to be instantiated.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Class attributes

A
Class attributes or Class Variable.
Belong to class and not an object
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

object attributes (or instance attributes).

A

We use the convention that any attribute is assumed to be an instance attribute unless we explicitly call it a class attribute.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Class method

A

controls access to the class variables and also performs any tasks that might have classwide effects rather than merely objectwide.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Inheritance

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Subclass

A

When a class B inherits from a class A, we say that B is a subclass of A.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Superclass

A

When a class B inherits from a class A, we say that A is the superclass of B.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

(MI)Multiple Inheritance

A

Ruby does not allow.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What Is Polymorphism?

A

??

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Module?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Raise

A

??

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Ensure

A

??

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

include (module)

A

The module’s methods become available as instance methods.

17
Q

extend(module)

A

The module’s methods become available as class methods.

18
Q

Load and require

A

A load operation reads a file and runs it in the current context so that its definitions become available at that point. A require operation is similar to a load, but it will not load a file if it has already been loaded.

19
Q

Super

A

Call the parent method.

20
Q

Alias

A

??

21
Q

singletons

A

They belong solely to that object and have no effect on its class or superclasses.