OOP Flashcards

1
Q

Is a programming paradigm based on the conecpt of “objects”, which can contain data and code to manipulate data.

A

Object-Oriented Programming

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

Give the 4 principles of OOP

A

Encapsulation, Inheritance, Abstraction, Polymorphisim

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

Is a process of wrapping code and data together into a single unit

A

Encapsulation

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

Makes sure that “sensitive” data is hidden from users.

A

Encapsulation

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

To achive Encapsulation: Declare class variables/attributes as ____

A

Private

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

To achive Encapsulation: provide ___ and ____ method to access and update the value of a private variable.

A

Get and Set

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

___ method returns the variable value

A

Get

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

____ mehtod sets the value.

A

Set

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

Attributes can be made read-only, if u only use the ___ method

A

Get

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

Attributes can be made write-only, if u only use the ___ method

A

Set

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

The class that inherits from another class

A

Subclass

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

The class being inherited from

A

Superclass

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

To inherit from a class, use the ____ keyword

A

Extends

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

_____ means “many forms” and it occurs when we have many class that are related to each other by inheritance

A

Polymorphsim

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

_____ is the process of hiding certain details and showing only essential info to the user.

A

Abstraction

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

Abstraction can be achieved with either _____ classes or _____

A

Abstract classes or Inherfaces

17
Q

Abstract ____ is a restricted class that cannot be used to create object

18
Q

Abstract ____ only be used in an abstract c;ass, and does not have a body.