paper 1 Flashcards

(39 cards)

1
Q

examples of analysis stage work during software dev

A
  • problem definition
  • list of objectives
  • data model
  • interviews
  • questionnaires
  • research existing solutions
  • acceptable limitations / constraints
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

why use named constants

A
  • makes clear what the value held by the constant actually is / used for
  • if the constant’s value would need to be changed, it only needs to be changed in one place
  • improves readability of the code
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

purpose of a hierarchy chart

A
  • represent the structure of the program
  • to aid decomposition of a problem
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

differences between local and global variables

A
  • global variables accessible to all parts of the program / have global scope
  • global variables declared in main program block
  • local variables declared in subroutine
  • local variables accessible only in program block/subroutine they were declared in
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

why use local variables

A
  • makes a subroutine self-contained
  • easier to re-use subroutine in another program
  • releases storage when subroutine terminates
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

decomposition

A

breaking a problem into a number of sub-problems that are easier to understand, program and maintain

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

automation

A

models are put into action to solve problems. involves creating algorithms for performing actions on, and with, the data that has been modelled

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

composition

A

combining procedures into compound procedures

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

problem abstraction / reduction

A

details are removed until the problem is represented in a way that is possible to solve because the problem reduces to one that has already been solved

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

why use meaningful variable names

A

easier to follow program process

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

array

A

finite, ordered set of elements of the same data type

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

what is a structured programming approach

A
  • decomposition of a problem
  • makes use of subroutines
  • makes use of control structures - sequence / selection / iteration
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

what is a subroutine

A

named block of code performing a specific task within a program

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

features of a structured program

A
  • selection, iteration, sequence
  • modular
  • exit gate
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

advantages of modular programming

A
  • easy to understand subroutines as small units of code - easier to understand, debug, maintain
  • subroutines can be tested independently, shortening dev time
  • modules can be reused in other programs
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

why use exception handling

A
  • avoid errors which will cause the program to crash
17
Q

tasks performed during design soft-dev stage

A
  • data structures specified
  • algorithms / ui / screen designs designed
  • design appropriate module structure
18
Q

task performed during technical soft-dev stage

A
  • implementation / writing of code
19
Q

task performed during testing soft-dev stage

A
  • system tested for presence of errors, using selected test data covering normal, boundary and erroneous data
  • testing for logic errors, syntax errors, runtime errors
20
Q

task performed during evaluation stage

A
  • system evaluated according to given criteria
21
Q

erroneous data

A

data outside of expected range and/or wrong data type

22
Q

strategies for problem solving

A
  • exhaustive search
  • binary search
23
Q

exhaustive search

A

trying every possible method / searching every possible item

24
Q

linear search

A

search item compared with each element in list in linear fashion

looks at, on avg, n/2 items

25
binary search
- look at middle item - if not correct item, if middle item greater than one being sought, discard second half, vice versa - repeat until item found if a list of data has 2^n items, it will look at, at max, n items
26
top-down design
decomposition of a task, where problems broken down until simple enough to be written as self-contained modules
27
what does a good algorithm feature
- should allow for invalid inputs - should execute efficiently, in as few steps as possible - designed in an easily understandable / modifiable way - always terminates at some point
28
bubble sort
in an array of n items: - go through array, comparing each item with item next to it - if item greater, swap - last item in the array will be in correct place after first pass - repeat n - 1 times, reducing by 1 on each pass
29
representational abstraction
representation arrived at by removing unnecessary details
30
abstraction by generalisation or categorisation
grouping by common characteristics to arrive at a hierarchical relationship of the 'is a kind of' type
31
information hiding
process of hiding all details of an object that do not contribute to its essential characteristics
32
procedural abstraction
represents a computational method, actual values used in a computer separate from overall design - involves only writing a subroutine and passing abstracted parameters
33
functional abstraction
particular computation method is hidden - *think of it like a primary school number box thing, where you put in inputs and you get outputs, and you don't know what happens inside of the box*
34
data abstraction
details of how data are actually represented are hidden - separate the way that a compound data object is used, from the details of how it is constructed
35
what is a finite state machine
abstract model of how a machine reacts to an external event
36
in a finite state machine:
- machine can only be in one state at a time - transition can occur, where machine changes state in response to an event / condition - FSM defined by a list of its states and the condition for each transition
37
finite state automaton
FSM with no output
38
FSM symbols and their meanings
- empty circle - state - circle with arrow pointing to it - start state - circle with inner circle - accept state
39
use of parameters in context of subroutines
specifies any values that must be passed to a subroutine when it is called