Programming paradigms Flashcards

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

What generation are high-level languages?

A

Third

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

What generation are low-level languages?

A

First (machine code) or Second(assembly language)

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

Define paradigm

A

A style or way of thinking about how to solve a problem

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

How do HLL make it easier for people to understand code?

A

They abstract many of the steps the computer needs to solve a problem in a program

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

What are imperative languages designed to do?

A

Solve specific problem types

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

How do programmers use imperative languages to solve a problem?

A

By writing a set of instructions to say how the problem should be solved, the instructions are translated from HLL to object code

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

What’s an advantage of an HLL?

A

They have built-in functions and libraries

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

What type of language are functional languages?

A

A type of declarative language

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

How do declarative languages work?

A

They have no mutable data structures, instead, they use things like mathematical expressions where the same input = the same output.

Functions can call other functions and use the output of one function as input for another.

Their immutable data structures make them ideal for processing big data

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

How do programmers use object orientated code?

A

They use classes to define objects in order to model the problem

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

What are the 4 main principles of OOP?

A

Encapsulation, abstraction, inheritance, and polymorphism

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

What is encapsulation?

A

The state of an object is private and other objects can only interact with the object’s public methods

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

What is abstraction?

A

The complexities of how the object works are hidden

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

What is inheritance?

A

When subclasses inherit properties and methods from parent classes

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

What is polymorphism?

A

The ability of an object to take on many different forms

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