OOP Test Flashcards

1
Q

What are the 3 parts of a class?

A
  1. Name 2. Static attributes 3. Dynamic behaviours
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Static attributes

A

A variable that remains constant for all instantiations of the class. Cannot be changed at runtime

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

What is Instantiation?

A

Instantiation is the process of taking a class definition and creating an object that you can use in a program.

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

What is the Name?

A

The title of the class/object and what is is refered to.

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

Dynamic Behaviors

A

The pattern of state change over time is called the dynamic behaviour of a system

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

What is an instance?

A

A specific copy of an object

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

What is an object?

A

An object what is created after constructing a class. It is also the “type” variable.

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

What are constructors?

A

Constructors are used to initialize the instance of the object, which can determine its behaviour and assigned variables.

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

What are the 3 parts of a method signiture?

A
  1. body 2.parameters 3.return type
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is Polymorphism

A

Polymorphism is the ability of an object to take on many forms. The most common use of polymorphism in OOP occurs when a parent class reference is used to refer to a child class object. (Parent and Child classes)

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

What is information hiding?

A

Making the variables unacessable/private to other classes.

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

What is abstaction?

A

Through the process of abstraction, a programmer hides all but the relevant data about an object in order to reduce complexity and increase efficiency.

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

What is encapsulation?

A

Data encapsulation is the process of combining and assembling elements in order to create a new entity and the wrapping of private data into a class. Methods can be used to access the private data.

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

What does a UML diagram look like?

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