SDD Flashcards

1
Q

Waterfall Method

A

This is the term used to describe the design process of a piece of software

It is made up of these 5 stages:

  • Analysis
  • Design
  • Implementation
  • Testing
  • Evaluation
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Iteration

A

Iteration means ‘to do over again’
The software development process is described as iterative because each stage may have to be revisited as a result of new information coming to light

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

Inputs

A

What data is being input into your program

E.g.
Length = inputbox(“Give the length”)
Breadth = inputbox(“Give the breadth”)

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

Processes

A

What the program calculates for you

E.g.
Area = Length * Breadth

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

Outputs

A

What the program displays when it is complete

E.g.
Msgbox(Area)

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

Input, Process and Output Example

A

‘Declare variables
Dim Length as integer
Dim Breadth as integer
Dim Area as integer

‘Get Inputs
Length = inputbox(“Enter Length”)
Breadth = inputbox(“Enter Breadth”)

‘Calculate Area
Area = Length * Breadth

‘Display Area
Msgbox(Area)

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

Structure Diagram

A

Structure diagrams break down a problem into smaller sections
These smaller sections cam then be worked on one at a time
This can be good for big projects where a large problem can be split into smaller tasks for separate groups, or individuals, to work on

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

Flowchart

A

Flow charts show what is going on in a program and how data flows around it
Flow charts represent everyday processes, show decisions taken and the result of these decisions

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

Pseudocode

A

When designing a program, it is useful to pay out how the program might work, before writing it in a programming language
Pseudocode is a design notation that is closely related to teh logic of how a program will work
Pseudocode can look alot like code but it DOES NOT NEED to be implemented as strictly

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

Wireframe

A

Just as we learned in the Web Design and Development unit, a wireframe is used to design the layout of a programs User Interface
This provides a skeletal outline of the components of the interface

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

Variables

A

Variables are used to store information to be referenced and manipulated in a computer program
They also provide a way of labelling data with a descriptive name, so our programs can be understood more clearly by the reader and ourselves
It is helpful to think of varianles as containeres that hold information
Their sole purpose is to label and store data in memory
This data can then be used throughout your program

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

Data Types

A

In National 5, when we create a variable we will store them as a following data type:
Characters - Storing a single letter
String - Storing anything that contains letters
Integer - Storing whole numbers
Real - Storing numbers that have a decimal point
Boolean - Storing data that can only have 2 values
Array - Storing a list of 1 data type

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

Declating Variables

A
Dim Grade as Char
Dim Forname as String
Dim Age as Integer
Dim Height as Single
Dim Valid as Boolean
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Assinging Values

A
Grade = "A"
Forename = "Big Tasty"
Age = 40
Height = 1.82
Valid = False
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Declaring Arrays

A

Dim Name(9) as String

This sets aside a space in memory to store 10 names (0 - 9)

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

Assinging Array Values

A
Name(0) = "Chris P.Bacon"
Name(1) = "Jed I Knight"
Name(2) = "Joelle Rollo-Koster"
Name(3) = "Deja Viau"
Name(4) = "Tahra Dactyl"
Name(5) = "Brock Lee"
Name(6) = "Jass Singsasong"
Name(7) = "Sam Sung"
Name(8) = "Vol Demort"
Name(9) = "Christian Guy"
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

Assihninh Array Vaules (Loop)

A

For i = 0 to 9
Name(i) = Inputbox(“Enter a Name”)
ListBox1.Items.Add(Name(i))
Next

It would provide the same answer if you asked for the same output as the first example

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

Arithmetic Operations

A
Addition             +
Subtraction        -
Multiplication     *
Division              /
Exponentiation  ^
19
Q

Concatemation

A

Concatenation is when you join 2 or more variables together using the & symbol to make one large string variable

E.g.
Forname = "Bob"
Age = 186
Eyes = 7
Facts = "Mr " & Forname & " is " & Age & " years old, has " & eyes & "eyes"
Msgbox(facts)
20
Q

Operatiors

A
Less than             <
Grater than          >
Less than or equal to 
                            <=
Grater than or equal to                         >=
Equals                 =
Does not equal  <>
21
Q

Selection (IF)

A

Most programs make use of “IF” statements to solve problems
The “IF” statement allows the computer to make decisions, and to choose what path to follow depending on the result of the decision

22
Q

The AND Operator

A

If all of the conditions are true then the AND conditon is met

E.g.
If Mark1 > 70 AND Mark2 > 70 AND Mark2 > 70 THEN
Grade = “A”
END IF

23
Q

The OR Operator

A

If some of the conditions are true then thr OR condition is met

E.g.
If Mark1 > 70 OR Mark2 > 70 OR Mark2 > 70 THEN
Grade = “A”
END IF

24
Q

The NOT Operator

A

If none of the conditions are true then the NOT condition is ment

E.g.
IF (NOT(Mark1 > 40)) THEN
Grade = “F”
END IF

25
Q

Fixed Loop

A

You use a fixed loop when you know exactly how many times you want to repeat a set of program commands

E.g.
For 1 = 0 to 3
ListBox1.Items.Add(“Hello”)
Next

26
Q

Conditional Loop

A

Use a conditional loop when you do not know how many times you want to repeat a set of program commands

E.g.
Password = inputbox("Enter a Password")
While Password <> "1234"
Password = inputbox("Re-Enter Password")
End While
27
Q

Pre-Defined Functions (Random)

A

The random pre-defined function will return a random number

E.g.
exerciseNumber = Int((50 * Rnd) + 1)

28
Q

Pre-Defined Functions (Round)

A

This pre-defined function is used to return a calue that has been rounded to a specific number of decimal places

E.g.
longJump = 9.212536544
longJump = Math.Round(longJump,2)

29
Q

Pre-Defined Functions (Length)

A

The length function is used to return the numebr of characters present in a value held in a variable

30
Q

Standard Algorithms

A

When creating code at National 5 level, it is necessary to be able to implement three specific algorithms:

  • input valuation:used to check that input is acceptable
  • running total within loop: used to calculate a running total
  • traversing a ID array: to access each item stored in an array
31
Q

Input validation

A
Do
mark = Inputbox("Enter a Mark")
If mark < 0 OR mark > 100 Then
Msgbox("Error")
End If
Loop Until mark > 0 AND mark < 100
32
Q

Running Total

A
totalMark = 0
For i = 0 to 4
mark = Inputbox("Enter a Mark")
totalMark = totalMark + mark
Next
33
Q

Average

A
totalMark = 0
For i = 0 to 4
mark = Inputbox("Enter a Mark")
totalMark = totalMark + mark
Next
Average = totalmark / 5
34
Q

Traversing an Array

A

Say a loop is to repeat 5 times (o to 4):

For i = 0 to 4
Mark(i) = Inputbox(“Enter a mark”)
Next

  • during the first time through the loop, i will hold the value 0
  • during the second time it will hold 1
  • during the third time it will hold 3
  • during the fourth time it will hold 3
  • during the fifth time it will hold 4
35
Q

Test Data

A

To comprehensively test a program, it should be tested using Normal, Extream and Exceptional data

Normal: Data that lies within the acceptable range of inputs
Extream: Data that lies at the boundary of acceptable data
Exeptional: Data that lies out with the boundaries of acceptable data…Data that should not be accepted

36
Q

Test Table

A

The table should contain:

  • a column with the data being tested
  • a column for the expected result
  • a column for t=what atchually happens when the program runs (including screen shots)

The table would normally include:

  • at least two items of normal data
  • at least two items of exceptional data
  • at least two items of extream data
37
Q

Syntax Error

A

This is an error that occurs when you disobey the rules of the programming language that you are using
Syntax errors usually happen when you are typing in your program, they are mainly spelling errors

E.g.
Keying in msgbix instead of msgbox will great a syntax error, they are easily fixed

38
Q

Logic Error

A

Logic Errors usually orrir when the program does not do what its supposed and subsequently produces the wrong result

E.g.

  • Using OR instead of AND
  • Using < instead of >
  • Having 5 items in an Array and only looping for 3
39
Q

Execution Error

A

Run-time errors are very nasty as they dont show up until you run the program, and sometimes they will cause your progran to crash

E.g.

  • Not closing a loop or looping too many times
  • Dividing by 0
  • Getting the computer to carry out a large calculation and not giving it enough memory into which to store the result
40
Q

Fitness for Purpose

A

Something is Fit for Purpose if it solevs the task that it was created to solve

41
Q

Efficiency

A

The term efficiency is usually used to refer to the demands that code places on RAM or the processor
Only using RAM and the processor when nessary leads to effiicient use of system resources

It is important to consider the following when creating code:

  • Have you used repetition (loops) where possinle to reduce the amount of code?
  • Have you used arrays where possinle instead of declaring many indicidual variables?
  • Have you used selection statements (IF’a and ELSE IF’s) that will only make comparisons until a solution is reached?
42
Q

Robistness

A

A program is considered robust if it can handel all types of data
If your program crashes when you enter exceptional data (entering text when a number is expected) then it is not rpbust
Most programs that you will create in National 5 will not be robust

43
Q

Readability

A

To make code more readable you should use:

  • internal commentary
  • meaningful identifers
  • indentation
  • white space