YEAR 2 CO1 WEEK 1 PROGRAMMING PARADIGMS Flashcards

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

What is a programming paradigm?

A

A style/”way” of programming where each style has many different languages.

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

Describe a Low Level Language.

A

A low level language one whose programming statements are geared towards a particular CPU.
Almost machine code (binary).
Chip makers provide low level language which to code their CPU.

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

State some features of a Low Level Language.

A

Are CPU specific using direct use of internal registers.
Code uses Mnemonic such as MOV or DIV.
Labels used as reference points to allow the code to jump from one part to another.
Many different memory modes can be used.

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

State some pros for a Low Level Language.

A

Low level language excellent for close control of the CPU.
Can be very efficient. Well optimised code written in Low Level Language.

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

State some cons for a Low Level Language.

A

Low level language produce least portable source code.
A good assembly language programmer needs to know a lot of details about internal structure of the CPU.
Difficult to use as the programming commands can be quite obscure.

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

Describe Procedural Languages.

A

Used to create specific instructions for computer to carry.

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

State some characteristics of a Proedural Language.

A

Sometimes called imperative languages. Means telling the computer what to do step by step.
All imperative languages lay out instructions in sequence.
Easier for people to read and understand code as uses named variables and using functions/subroutines.

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

State the pros to a Procedural Language.

A

Excellent for general purpose coding.
Good for set tasks to be completed in a specific way.
Good level of control without having to know precise CPU details.
Portable source code.

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

State the cons to Procedural Langauge.

A

So many procedural languages, programmers tend to specialise in one particular language to get work.
Need precise knowledge about programming instructions.
Not as efficient as hand crafted source code written in low level language.

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

Describe Object Orientated Languages.

A

Makes use of the idea of classes + objects manipulated through internal methods.
Main idea to gather data and all methods that act upon that data into one entity called a class making data hiding,code re use and maintenence much easier.

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

State features of Object Orientated Languages.

A

Features inheritance.
Data stored in attributes.
Programs structured into classes methods and instances.
Data concealed from other parts of the program (encapsulation).

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

State the pros for OOP

A

Easier to provide working code. A class can be fully tested and released in the team to use. Can reuse classes.
Treated as ‘black boxes’ so don’t need to know how they work just how to manipulate it through its methods.
Code portability.

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

State cons for OOP.

A

Steep learning curve.
Complex, need skills to craft efficient and flexible classes.
Not as compact and efficient as writing code directly in a low level language.

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