Class Flashcards

1
Q

Where would you find a class name

A

At the top of the diagram

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

Why does a constructor method do

A

Initialises a instance if the object with the correct properties

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

What is encapsulation

A

Setting variables to public and private to prevent data being changed

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

What is a private variable

A

One that is only accessible withing the object and dot for notation

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

What is a method

A

A function the object can perform

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

What is inheritence

A

When a object gets the properties and methods of another class becoming a sub-class of the class

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

What is polymorphism

A

This is when a method is changed in a sub-class to overwrite the method in the class

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