OOP Flashcards

1
Q

What is Julia designed to be?

A

An object-oriented programming (OOP) language

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

Procedural vs OOP?

A

Procedural: writing list of instructions that tell the computer what to do

OOP: emphasizes objects and their relationships with each other using operators

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

Examples of OOP languages other than Julia?

A

Python, Java, C++

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

What is an object?

A

an abstract concept representing an entity on which computation is performed

objects have attributes and behaviors

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

How does the type of an object affect its computation?

A

The type affects memory storage requirements and what can be done computationally.

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

How can the type of an object be obtained?

A

The creation of an object requires declaration of its type.

Julia can assign type dynamically. The type can be obtained using the function “typeof()”

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

How can we access the memory location of a Julian object?

A

the built-in function pointer_from_objref(x) where x is the reference to the object

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

How can be find the size of memory in bytes in Julia?

A

sizeof(x) where x is the reference to the object

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