Function programming Flashcards

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

Objects

A

representations of things that exist in the real world that we wish to model in a computer system

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

Attribute

A

data item that helps define or describe the object

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

Class

A

blueprint/template for an object and defines attributes and behaviours (methods) of objects in that class

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

Instantiation

A

process of making an instance of an object using the class definition - object is assigned to a reference variable (a memory location for the object)

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

Constructor

A

sets initial values of attributes as default values, random values, or values passed in as arguments

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

Encapsulation

A

binds together attributes (data) and methods (functions and procedures) that manipulate the data so that data is protected

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

Inheritance

A

allows you to create a new child class that inherits the attributes and methods of the original (parent) class

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

Polymorphism

A

ability of the system to process objects differently depending on their data type or class

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

Overriding

A

inherited methods can be overridden to change their functionality and make the behaviour more appropriate to the subclass

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

Association

A

a relation between two separate classes established through their objects

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

Aggregation

A

defines a one-way relationship that specifies a ‘has-a’ relationship between two classes - hollow diamond shape

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

Composition

A

Stricter form of association - if container is destroyed, every instance of contained class is also destroyed

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

“Favour composition over inheritance”

A

composition generally considered preferable to inheritance - composition allows greater flexibility and has less rigid relationship between two objects than inheritance

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

Public access modifier

A

defined type/member can by accessed by code within any class

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

Private access modifier

A

defined type/member can only be accessed by the code in the same class

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

Protected access modifier

A

can only be accessed by the code in the same or derived class