SDD - Object Orientated Programming Flashcards

1
Q

What is encapsulation?

A

When a classes properties cannot be accessed directly, instead they must be accessed through the getter and setter methods.

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

Explain what instantiation is…

A

When an instance (an object) of a certain class is created

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

Explain what a super class and a subclass are…

A
  • A super class is a class that a sub class has been derived from
  • A sub class is class that has inherited all of the super class it was derived from’s properties and methods
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What two things do things do objects and classes have?

A

Properties (Their data) and methods (What they do with that data, basically code)

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

What is a class?

A

A class is a template which contains properties (data) and methods (procedures). An object can instantiated from a class, and a sub-class can be derived from a class.

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

How do you instantiate an object from a class (Using Pseudocode)?

A

DECLARE example1 INITIALLY example (The values for the properties go in here, in respective order)

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

How do you call a method in an object (Using Pseudocode)?

A

example1.examplemethod (Parameters needed go in here)

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