2.4 - Types of Programming language Flashcards

1
Q

What are imperative programming paradigms?

A
  • approach to using a programming language to solve a problem that uses code that clearly specifies the actions to be performed
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is procedural programming?

A
  • widely used paradigms as it can be applied to a range of problems
  • easy to write and interpret
  • written as a sequence of instructions
  • instructions carried out step by step
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is object-oriented programming?

A
  • suited to problems which can be broken down into reusable components with similar characteristics
  • based on objects formed from classes which have attributes and methods
  • focuses on making programs that are reusable and easy to update and maintain
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is declarative programming?

A
  • states the desired result and the programming language determines how best to obtain the result
  • details about how result is obtained are abstracted from the user
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is functional programming?

A
  • functions form the core of the program
  • function calls are often combined within each other
  • closely linked to mathematics
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is logic programming?

A
  • a set of facts and rules based on the problem is defined
  • queries are used to find answers to problems
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Strengths of Procedural programming?

A
  • efficient execution of straightforward tasks
  • clear flow of control (top to bottom)
  • ease of implementation for algorithms
  • strong emphasis on step-by-step procedure execution
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Weaknesses of procedural programming?

A
  • can become unwieldy for large programs
  • lack of modularity can lead to code redundancy
  • not ideal for applications with complex states or behaviours
  • difficulty in managing and scaling the system as it grows
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Strengths of Object-Oriented programming?

A
  • enhances modularity with encapsulation
  • enables real-world modelling using objects
  • code reuse through inheritance
  • polymorphism allows flexibility in interface design
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Weaknesses of Object-Oriented Programming?

A
  • can lead to unnecessary complexity
  • inefficiency due to overhead (e.g. memory for objects)
  • not always intuitive for all types of problems
  • misuse can lead to overly complex inheritance heirarchies
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Strengths of assembly programming?

A
  • direct control over hardware
  • optimised performance due to low-level operations
  • tranparent understanding of how machine operates
  • potential for very efficient code
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Weaknesses of Assembly programming?

A
  • Extremely steep learning curve
  • Hardware specific, leading to lack of portability
  • Tedious and error-prone, due to memory management
  • difficult to write, debug, and maintain large programs
How well did you know this?
1
Not at all
2
3
4
5
Perfectly