Computers πŸ‘©πŸΏβ€πŸ’» | Algorithms | 7.1 Flashcards

1
Q

What are the steps in program developing life cycle?

A

Analysis-Design-Coding-Testing

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

What is the analysis step in program development?

A

The step where the user must figure out the problem and decide how to resolve it.

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

What are the steps of analysing the process?

A
  1. Choosing a program
  2. Abstraction of the problem
  3. Decomposition of the problem
  4. Identification of the problem
  5. Requirement’s specification
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is Abstraction of a problem?

A

The process of filtering out the characteristics of problems that are not needed in order to concentrate on those that are needed. It allows programmers to have a general idea of a problem and how to solve it.

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

What is decomposition of a problem?

A

Analysing a complex problem and breaking it down into smaller more manageable parts that are easier to understand.

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

What is identification of a problem?

A

Understanding the problem statement, finding the requirement, and output of problem solution.

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

What is a problem statement?

A

A problem statement is usually one or two sentences to explain the problem your process improvement project will address.

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

What is the requirement’s specification?

A

A document that captures a complete description on how a system is expected to perform.

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

What is the designing step of program development?

A

Various design tools such as
- Decomposition
- Structure diagrams
- Flowcharts
- Pseudocode
are used for program specification

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

What is the coding step of program development?

A

When the language of programming is used to write the lines of code based on the program specification obtained from the design stage. The code is the program listing or source code.

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

What is the testing stage of program development?

A

In various levels of software testing, the code is tested. It is iterative and tested till free of errors.

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

What are the methods of testing and debugging a program?

A

Unit - individual modules tested
System - all modules, the whole system tested
User acceptance - asking someone or another company to test the program.

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

What is a system?

A

A combination of the parts or components which work together to control a task or activity.

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

What are the types of systems?

A

Natural systems, Abstract systems, Designed systems, Information systems.

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

What are some natural system examples?

A

Ecosystems, water cycles

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

What are some abstract system examples?

A

Maths equtions, computer programs

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

What are some designed systems examples?

A

Cars, internet

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

What are some information system examples?

A

Banking system, databases

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

What are the elements of a system?

A
  1. Boundary
  2. Environment
  3. Observable mechanisms
  4. Subsystems
  5. Control mechanism
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

What is a boundary in a system?

A

What separates a system from its environment, often not sharply defined. aka interface.

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

What is the environment in a system?

A

Parts of the world which the system can interact with. The system and environment are interrelated.

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

What are observable interactions in a system?

A

How the system interacts with the environment. e.g. Inputs and Outputs

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

What is a subsystem in a system?

A

It can decompose a system into parts, each part also a system. For each subsystem, the remained of the system is it’s environment. They are interdependent.

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

What is a control mechanism in a system?

A

How the behavior of the system is regulated to allow it to endure often natural mechanism.

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

What is a computer system?

A

A system made up of software, data, hardware, communications, and people.

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

What can a system be divided into?

A

Into sub systems, further sub systems, and modules.

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

When designing a computer system, what is it referred to?

A

As a complex problem.

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

What are the sub systems within a system sometimes referred to?

A

Sub problems

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

What is top-down design?

A

The breaking down of a computer system into sub systems, also broken down until each subsystem performs one action.

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

What is the method of breaking down a computer system in top-down design called?

A

Stepwise refinement

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

What is the process of breaking a problem into smaller parts called?

A

Decomposition.

32
Q

What is a module?

A

An individual section of code that can be used with other programs.

33
Q

What is the difficulty of looking at a system as a complex problem?

A

It seems impossible to solve as it is complicated to handle.

34
Q

What are the benefits of top down design?

A
  1. Helps development team to clarify what needs to be done.
  2. Algorithms can be developed quickly as each designer can be given a separate module to work on, for their area of expertise.
  3. It is easier to debug
  4. Structure diagrams showing how modules relate to each other help visualize a program
  5. Makes it easier for another designer to understand the logic of an algorithm
  6. Modules can be reused in different programs that require the same structure.
35
Q

What do we use to show top down design in diagrammatic form?

A

Structure diagrams.

36
Q

How does a structure diagram show a top down design?

A

It shows the design of a system in a hierarchical way, each level giving a more detailed breakdown of the system into subsystem.

37
Q

What is an algorithm?

A

A sequence of steps which are considered as a set of instructions to solve a problem or execute a given task.

38
Q

What are the algorithm design methods?

A
  • Pseudocodes
  • Program flowcharts
  • Structure diagrams (top down design)
39
Q

What is an identifier?

A

A name or label chosen by the programmer to represent an object within a program. It could be a variable, function, procedure, data type, or any other element defined in a program.

40
Q

What is a variable?

A

A uniquely named location in memory (RAM), in which a single data item can be held while a program is running. By definition the program can change the value held during the time of the program execution.

41
Q

What does a variable consist of?

A

A name, data type, size, and memory location.

42
Q

What are the rules to declare a variable?

A
  1. Reserve words or keywords cannot be taken as variable names (eg INPUT, IF, ENDIF)
  2. Every variable name should start with alphabets / underscore, not with numeric or special characters.
  3. Except β€œunderscore”, no other special characters are allowed in the middle of the variable declaration.
  4. No spaces
  5. Meaningful names
  6. Variable names cannot be repeated within same level of scope (program segment)
43
Q

What are the basic data types used in algorithms?

A

Integers, Real, Char, Boolean, String, Date

44
Q

What is Integer data type?

A
  • Positive or negative whole number
  • Used with mathematical operator (eg +35, -24)
  • Used for counting, whole number addition/subtraction
45
Q

What is real data type?

A

Numeric data with decimal numbers

46
Q

What is char data type?

A

Holds only a single character, used for codes.

47
Q

What is Boolean data type?

A

Represents a logical value: only two

48
Q

What is string data type?

A

Consists of 1 or more characters

49
Q

What is date data type?

A

Stores date in (dd/mm/yy) format

50
Q

What is the operator for assignment?

A
51
Q

What is the modular function?

A

It returns the remainder (5 MOD 2 returns 1)

52
Q

What is the operator for modular function?

A

MOD

53
Q

What is the integer function?

A

It returns the integer value, rounding down (eg 89.9 returns 89)

54
Q

What is the operator for integer function?

A

INT

55
Q

How is a value assigned?

A

arrow!!

56
Q

How do we show β€œLess than or equal to”, or β€œMore than or equal to” in an algorithm?

A

<=, >=

57
Q

How do we show β€œNot equal to” in an algorithm?

A

<>

58
Q

What is a constant?

A

A data value which can be introduced at the time of program execution.

59
Q

What are the two kinds of memory?

A

Primary memory and secondary memory

60
Q

What does primary memory consist of?

A

RAM and ROM

61
Q

What are the types of secondary memory?

A

Magnetic media, optical media, and solid state

62
Q

What are examples of magnetic media?

A

Magnetic tape, floppy disc, hard drive

63
Q

What are examples of optical media?

A

CD, DVD, and BluRay

64
Q

What are examples of solid state memory?

A

Pendrive and SD card

65
Q

What is pseudocode?

A

Pseudocode is a method of representing program instructions using plain English, Mathematical notations, and keywords commonly found in high level languages without being bound by the strict rules of vocabulary and syntax of any popular programming language.

66
Q

What is a flowchart?

A

A diagrammatic representation of step by step instruction of a program or problem, showing the workflow or process step by step in symbols.

67
Q

What is used for starting and stopping in a flowchart?

A

A rounded rectangle. There can be one start point but more stop points.

68
Q

What is used for inputs and outputs in flowchart?

A

A parrerelogram.

69
Q

What is used for processes in flowcharts?

A

A square, used for any operation or sequence of instructions that do not involve a decision.

70
Q

What is used for decisions in a flowchart?

A

A diamond with two arrows leaving.

71
Q

What is used as a connector, and what is a connector in a flowchart?

A

A circle, continuing on the next page to indicate the flowchart continued elsewhere at an identically labelled connector point. To simplify layouts, connector symbols may be used to replace lengthy flow lines or indicate that the flowchart continues on another stage.

72
Q

What are the 3 basic control structures?

A

Sequence, selection, repetition/iteration/loop

73
Q

What is a sequence?

A

A set of instructions executed in order.

74
Q

What is a seclection?

A

A decision made based on some strict condition.

75
Q

What is a repetition?

A

A set of actions repeated a number of times.

76
Q

How can a program execute a series of steps in order?

A

Program instructions should be written with sequential control, writing one action after another, each action on a line by itself aligned by the same event.