Object Orientated Programming Flashcards

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

Describe the concept of data abstraction

A

The process where an object only offers the essential information to the outside world, and hides the background information. It essentially acts as a black box system.

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

Describe the concept of encapsulation

A

An objects data is encapsulated within its methods, protecting it and ensuring it remains uncorrupted.

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

Describe the concept of inheritance

A

In object orientated programming code can be reused by creating new classes using existing ones as templates. The new class will have the all the fields, and access to the same methods, as it’s ancestor. Additional fields and methods can be added to the new class.

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

Describe the concept of polymorphism

A

The ability to us an operator or function in different ways.

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

Describe the concept of overloading

A

When an existing operator or function is made to work on a new data type. A form of polymorphism.

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

Describe dynamic binding

A

Also called late binding, the process of connecting one program to another, that is to be executed after the call.

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

What is the difference between an object and a class?

A

A class is a blueprint containing the data fields and methods, but no data. An object is an instance of the class and contains data. It has access to the methods of the class, but does not contain copies of these.

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

What is MVC

A

Model-View-Controller, a framework for developing programs with user interfaces. It divides the code into 3 interconnected parts.

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

What is the model part of the MVC framework?

A

The model is the central component of the MVC system, and contains the application data, business rules, logic, and functions. The model should inform associated views and controllers when there are changes to the data.

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

What is the view part of the MVC framework?

A

The view is any representation of the data show to the end user. It requests information from the model to generate displays.

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

What is the controller part of the MVC framework?

A

The controller accepts inputs from the user and converts them into commands for the model or view.

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

What does CRUD stand for?

A

Create Read Update Delete are the 4 basic functions of persistent storage. In SQL this translates into PUT/POST, GET, PUT/PATCH, and DELETE

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

How do you add a comment line to Ruby code?

A

Use the #

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