SLR 7 Flashcards

Types of programming language

1
Q

What is meant by a paradigm in CS?

A

To describe an example of a way of doing things

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

What is a turing complete language?

A

A turing complete language can solve all the problems that a computer is able to solve

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

What is the point of programming paradigms?

A

Some paradigms are better at solving problems than others

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

What are the two categories that High-Level Languages fit into?

A

Imperative and Declarative

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

What is an imperative language?

A

A high-level language which consists of commands describing HOW a program operates

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

What is a declarative language?

A

A high-level language which focuses on WHAT a program should accomplish, not covered in any great detail

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

What is a procedural language?

A

A type of imperative programming paradigm where a program is built one or more subroutines

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

What is object-oriented programming?

A

A paradigm that identifies classes of objects which are closely linked to different methods

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

How do procedural languages lay out code?

A

A series of statements such as:
-Sequence
-Selection
-Iteration

This creates blocks of code using procedures and functions

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

What a mnemonics?

A

Simple sequences used in Assembly Languages

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

What makes up instructions?

A

The Opcode and Operand

Opcode - where something is being manipulated
Operand - what is being manipulated

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

How does a class work?

A

Has a class name, attributes and methods

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

What is instantiation?

A

The process of creating an object from a class template

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

What is the constructor method?

A

new ()
Used to create :D

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

What is inheritance?

A

Classes copying attributes and methods from other classes

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

What is encapsulation?

A

Bundling methods and restricting direct access to them (making them private)

17
Q

What are the types of polymorphism in OOP?

A

Static and Dynamic

Static Polymorphism allows you to implement multiple methods of the same name with different parameters in the same class

Dynamic Polymorphism is sharing the same parameters but having different functionality