7 Algorithm Design & Problem-Solving Flashcards

(35 cards)

1
Q

What are the 4 stages of program development 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 analysis (program development life cycle)

A

involves considering the problem that needs to be solved computationally

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

What is abstraction?

A
  • involves removing unnecessary detail to help identify the fundamental components of what the program is going to solve
  • it must be clearly understood by everyone
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is a requirements document

A

A document that labels each requirement, gives it a description as well as success criteria

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

What is Design? (And the 3 examples)

A
  • involves using techniques to come up with a blueprint for a solution
  • Structure diagrams, Flowcharts, pseudocode
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is coding?

A

its when developers begin programming modules in a suitable programming language that works together to provide an overall solution

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

What is iterative testing?

A

When each module is tested and debugged thoroughly to ensure it interacts correctly with other modules and accepts data

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

What is testing

A

Running the program many times using varying sets of test data to ensure the program works as intended

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

What is a sub-system

A

a smaller part of a computer system that works together with other sub-systems to create fully functional computer systems

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

What is top-down design

A

the decomposition of a computer system into a set of sub-systems, and breaking it down into smaller sub-systems, until it performs just a single action

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

what are the 5 main sub-systems

A

1) CPU - executes instructions
2) Memory - stores data & instructions temporarily for the CPU
3) Storage - permanent storage data & software
4) Input devices - enter info
5) Output devices - displays information/create output

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

Advantages of sub-systems

A
  • can help troubleshoot problems in a computer system
  • isolate a sub-system (makes it easy to identify error)
  • ensure that developing software operate efficiently
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is decomposition

A

Breaking down complex problems into smaller parts

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

4 main things developers think about when decomposing a problem

A

1) Inputs - data entered
2) Processes - subroutines & algorithms that turn input into output
3) Output - data display/printed for users
4) Storage - data that needs to be stored In files/appropriate medium

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

What is an algorithm

A

a precise set of rules and/or instructions to solve a specific problem or task

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

What is a variable

A

named data store that stores the value that may change during the execution of a program

17
Q

What is a constant

A

value that doesn’t change throughout the program

18
Q

Advantages of bubble sort

A
  • easy to implement
  • doesn’t use too much of the computer’s memory
  • can be fast if the array is small
19
Q

Disadvantages of bubble sort

A
  • not suitable for large data sets
  • can be very slow
20
Q

What is validation

A

The process of examine input so that only reasonable data is accepted

21
Q

What are the types of validation checks

A
  • range check
  • length check
  • type check
  • presence check
  • format check
  • check digit
22
Q

What is range check

A

checks the data if it’s within a reasonable range (e.g. marks between 0-100)

23
Q

What is length check

A

Checks if the data contains an exact/reasonable number of characters

24
Q

What is type check

A

checking the data type

25
What is presence check
Checks if data is entered for fields which require it
26
What is format check
checks that the entered characters follow a predefined pattern
27
What is check digit
final digit included in a code
28
What is verification
examining input to check that it has been accurately copied onto the computer or transferred from one part of a system to another
29
What is double entry
tells users to enter info twice
30
What is visual check
manual check completed by a user; they have to look at the screen and confirm that the data entered is correct
31
A maintainable program should:
- always use meaningful identifier names - be divided into modules for each task using procedures and functions - be fully commented
32
Normal test data
test data that is accepted and the algorithm is expected to work with
33
Abnormal test data
Test data is rejected by the algorithm as it's not suitable
34
Boundary test data
2 values are required (one end of the range and is just inside and just outside the range) e.g. valid age 1-120 inside: 1-120 outside 0-121
35
Extreme test data
Extreme test data uses the highest or lowest values within the allowed/valid range. Example: If valid age is 1–120: Extreme valid values = 1 and 120