Types of programming language Flashcards

software and software development

1
Q

What is a programming paradigm

A

The approach a programming language takes to define a program.

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

What are the different common types of high-level paradigms

A
  • Procedural programming
  • Object-oriented programming
  • Functional programming
  • Declarative Programming
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is procedural p[rogramming

A

A language where instructions are given in sequence.
These can be grouped into subroutines that can be called throughout the program.

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

What is object-orientated programming

A

A language in which the solution is represented by objects that interact

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

What is functional programming

A

A description of the solution to a problem is built up through a collection of functions, some of which are used to define other functions

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

What is declarative programming

A

A language where the characteristics of a solution are stated, rather than stating how the problem is solved
Eg. SQL

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

How do procedural languages work

A

We give the compiler instructions on the steps we want it to go through to solve a problem.

  • These instructions are given in sequence
  • Selection is used to decide what a program does when certain conditions are met
  • Iteration (ie. loops) dictates how many times it does it
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are the two types of iteration

A
  • Condition controlled
  • Count controlled
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is memory addressing

A

Different ways of referring to locations.

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

what does ADD do (LMC)

A

Add

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

What does SUB do (LMC)

A

subtract

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

What does STA do (LMC)

A

Stores value from the accumulator to memory

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

What does LDA do (LMC)

A

Loads value from the memory to the accumulator

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

What does BRA do (LMC)

A

Branch always ( loop continuously)

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

What does BRZ do

A

Branch if zero ( loop only if the value in the accumulator is currently 0)

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

What does BRP do (LMC)

A

Branch if positive (loop only if the value in the accumulator is currently positive)

17
Q

what is INP (LMC)

A

Input

18
Q

What is OUT (LMC)

A

Output

19
Q

What is HLT (LMC)

A

End program

20
Q

What is a class

A

Defines a type of object
- Specifies the methods and attributes an object should have

21
Q

What is an object

A

An instance of a class

22
Q

What is an attribute

A

Variables contained within and associated with an object

23
Q

what is a method

A

A subroutine associated with an object

24
Q

What is a method

A

A subroutine associated with an object

25
Q

What are the 4 pillars of OOP

A
  • Abstraction
  • Inheritance
  • Polymorphism
  • Encapsulation