C.1 System design concepts Flashcards

Explain how knowledge of data structures, algorithms ad programming influence system change.

1
Q

What are information systems designed as?

A

Interacting collections of computer programs

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

What do computer programs consist of?

A

Collections of instructions that tell the computer how to interact with the user and undertake specific functions

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

Define algorithms in the context of computer programs.

A

Rules used for calculation or problem-solving based on particular representations and structures of data

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

What do data structures enable?

A

Accurate representation of data relationships and efficient data usage

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

List some examples of data structures.

A
  • Arrays
  • Linked lists
  • Stacks
  • Queues
  • Trees
  • Graphs
  • Tables
  • Sets
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How do arrays organize data?

A

Store elements of the same type in a specific order and accessed by indexing

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

What characterizes a stack data structure?

A

Last element in is the first one out (LIFO)

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

Describe the queue data structure.

A

First-in, first-out (FIFO) rule for processing elements

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

What is the structure of a tree in data structures?

A

Starts with a root value and branches into sub-trees of children

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

Define graphs in terms of data structures.

A

Comprise sets of ordered pairs called edges/arcs and entities called nodes/vertices

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

What is the purpose of tables in data structures?

A

Store elements that can be inserted, searched for, or deleted

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

What is a set in data structures?

A

Stores certain values without any particular order and no repeated values

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

How does a binary tree improve search efficiency?

A

Reduces the average search steps compared to linear search

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

What are the average search steps using linear search versus binary search for n items?

A
  • Linear Search: n/2 steps
  • Binary Search: log2n steps
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What are data types?

A

Data that share a specific property, such as integer, Boolean, alphanumeric characters, or strings

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

What do algorithms manipulate?

A

The data contained in data structures

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

Define an algorithm.

A

An explicit, precise, unambiguous, mechanically-executable sequence of elementary instructions

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

What are conditionals in algorithms?

A

Different steps based on whether a specified Boolean condition evaluates to true or false

19
Q

What is recursion in algorithms?

A

A solution to a problem depends on solutions to smaller instances of the same problem

20
Q

What is abstraction in problem-solving?

A

Identifying the underlying abstract problem devoid of unnecessary detail

21
Q

What is the role of programming languages?

A

Express algorithm(s) and data structure(s) in a particular programming language

22
Q

How do compiled languages work?

A

Programmer writes general instructions, and a compiler translates these into machine language

23
Q

What is the difference between compiled and interpreted programming languages?

A

Compiled languages translate code before execution, while interpreted languages translate code during execution

24
Q

What marked the shift from low-level programming to procedural programming?

A

Higher-level programming languages that allowed writing programs using familiar terms

25
Q

Define the structured programming paradigm.

A

A subset of procedural programming that deconstructs problems into smaller components

26
Q

What is functional programming focused on?

A

Modeling the problem rather than the solution using functions that depend only on their inputs

27
Q

What is object-oriented programming?

A

Models problems in terms of entities (objects) that have attributes and behaviors

28
Q

List the key characteristics of object-oriented programming.

A
  • Class
  • Abstraction
  • Encapsulation
  • Inheritance
  • Polymorphism
29
Q

What do multi-paradigm languages aim to achieve?

A

Leverage constructs from different paradigms for specific problems

30
Q

How have modern programming languages evolved?

A

More abstract from the machine and improved in usability and efficiency

31
Q

What is the primary goal of object-oriented programming?

A

Facilitates disciplined software development process and enables building secure programs through data-hiding concept

Object-oriented programming enhances reusability, extensibility, reliability, and maintainability.

32
Q

Name two examples of object-oriented programming languages.

A
  • Smalltalk
  • Eiffel

These languages exemplify the principles of object-oriented programming.

33
Q

What do multi-paradigm languages aim to achieve?

A

Leverage constructs from different paradigms to make a program that suits the nature of a specific problem

Examples include C++, Leda, Common Lisp, and Scala.

34
Q

How have modern programming languages evolved over time?

A

More abstract from the machine and closer to human thinking, addressing complex, real-world problems

This evolution spans over more than five decades.

35
Q

What are the common components of structured programs?

A
  • Statements to establish the program’s start
  • Declaration of variables
  • Blocks of code

These components create a consistent overall pattern in structured programming.

36
Q

Why are variables declared at the program’s start?

A

The compiler needs to know the type of data stored in it in advance

Variables are named to be referred to and typically store values of a given data type.

37
Q

What is Boolean logic?

A

A two-valued logic allowing only two truth values – ‘true’ and ‘false’

Boolean expressions consist of logical operands and logical operators.

38
Q

What are the basic logical operators in Boolean logic?

A
  • AND
  • OR
  • NOT
  • EQV (logical equivalence)
  • NEQV (logical non-equivalence)

Boolean expressions often involve comparison operators as well.

39
Q

What types of control statements exist in programming?

A
  • Sequential
  • Decision (conditional)
  • Iterative

These control statements dictate which code sections are executed.

40
Q

What is the purpose of decision (conditional) control statements?

A

Controls which block of code is executed based on ‘if… then …else’ logic

The ‘if’ block executes when the condition is true, else the ‘else’ block executes.

41
Q

What are the main categories of iterative control statements?

A
  • FOR loops
  • WHILE/DO loops

These loops control how many times a block of code is executed.

42
Q

What is the structure of a simple FOR loop?

A
  • Initialisation
  • Condition
  • Increment or decrement

These components define the execution of the loop based on counting.

43
Q

How do WHILE and DO loops differ from FOR loops?

A

WHILE and DO loops repeat while a condition is true, while FOR loops specify a count

The condition is a Boolean expression that determines the loop’s execution.