Software Design & Development Flashcards

1
Q

What are the stages of software development?

A
Analysis = an investigation to find out what functions the program is require to do in terms of the input, process and output 
Design = identifying the variables and data types required for the program and then designing the structure and detailed logic of the code. Also involves a sketch of the user interface in terms of its inputs and output
Implementation = conversion of the design into software using actual programming language 
Testing = finding and taking out any errors in the program. Specially chosen test data is used to make sure the program is error free
Evaluation = accessing if the software is fit for purpose, robust, efficient and readable
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are examples of design notation?

A
  1. Flowcharts
  2. Structure diagrams
  3. Pseudocode
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are the symbols in a structure diagram for:

  • procedure (title)
  • single step
  • decision
  • loop

What are each of these things?

A
  • Rectangle with sides
  • Rectangle
  • Stretched out hexagon
  • Rounded rectangle

Procedure = group of instructions
Single step = one instruction
Decision = following one group of instruction or another depending on a condition
Loop = repeating one or more instructions

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

What are the symbols in a flowchart for:

  • terminator
  • decision
  • input/output
  • step

What is the terminator?

A
  • stretched oval
  • diamond
  • parallelogram
  • rectangle

Start/end

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

What is a:

  • Fixed loop
  • Conditional loop

How do you write these in:

  • Pseudocode
  • Visual Basic
A
  • A loop that repeats a fixed number of times
  • A loop that repeats until a condition is true

Pseudocode: Fixed loop (ARRAY)

SET Agelist TO [12, 25, 16, 89, 45, 27]

FOR Index FROM 0 TO 5 DO
SEND AgeList (Index) TO DISPLAY
END FOR

Pseudocode: Conditional loop

REPEAT
      RECEIVE mark FROM KEYBOARD 
      IF mark < 50 THEN 
          SEND [“Fail”] TO DISPLAY
      END IF
UNTIL mark > 50

SET count TO 0

WHILE count < 10 DO
SEND [“Keep going”] TO DISPLAY
END WHILE

Visual Basic: fixed loop

FOR x = 1 TO 5 DO
Number = InputBox(“Enter a number”)
NEXT X

For number = 1 To 100
ListBox1.Items.Add(number)
Next number

Visual Basic: conditional loop

Do While number < 5
??????????
Loop

Do

Valid = true

Height = inputbox(“please enter the height’)
If Height < 0 Then
MsgBox(“That is not possible. Enter again”)
Valid = false
End If
Loop until valid = true

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

What are items of data stored in in program?

What data type:

  • holds a single character
  • holds a decimal number
A

Variable

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

What is an array used for?

Make an array for six different toppings

What is this type of array called?

A

To store multiple values of the same data type

Dim Toppings(5) As String

1D array

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

What symbol is used to make concatenated strings?

What are arithmetical operators?

What are comparisons?

What are logical operators?

A

&

+ * / ^

= <> =>

And, Or, Not

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

What makes an if statement complex?

What are global and local variables?

A

Having an AND or OR

Global = declared outside the function and can be used in multiple different functions
Local = declared inside the function and can only be used inside that function
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Give an example of a conditional loop nested inside a fixed loop

A
For person = 0 to 9
Do 
Age(person) = InputBox (“Please enter the age of person no. “ &amp; person + 1)
If Age(person) > 120 Then 
    Msgbox(“Not possible”)
Loop until Age(person) < 120 
Next person
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Give some examples of pre-defined functions and how they work

A
  1. Rnd

Throw = Int(Rnd*6) + 1

Rnd * 6 = any decimal number between 0 and 6
Int = selects the integer part of that number eg. 1, 2, 3
+ 1 = Adds one to the selected integer so it cant be 0

  1. Round

Record time = Math.Round(Record time, 2)

  1. Len

Len (“Hello”)

  1. Left and right

Returns the specified number of characters from the left or right of a string

Left(Gardens, 3)

= Gar

Right(Gardens, 4)

= dens

  1. SQR = square root

SQR(16)

= 4

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

What is:

  • assignment
  • sequencing
  • selection
  • iteration
A
  • assigning a value to the variables
  • ordering your code in a certain way to do certain things before others
  • executing one set of instructions if a condition is true and another set if the condition is false
  • repetition of certain instructions using loops
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What are the three types of test data?

A

Normal = tests if the program can give correct results for commonplace data

Extreme = sees if the software can handle data on the boundaries of valid data

Exceptional = sees if the software can cope with unexpected data without crashing

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

What are the three error types?

A

Syntax = incorrect use of programming language eg. Misspelt words or missing brackets

Execution = found when the program is run, even if the code has so visible errors before it is run. Eg. Trying to decide by 0.

Logic = in the logic of the code itself. Trying to do things that aren’t logically right. Eg. Area = length + breadth

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

What are the stages of evaluation?

A

Fit for purpose = if the software meets the requirement set out in the software specification document, agreed by the client and programmer

Efficiency = a code that makes the best possible use of constructs such as loops and arrays

Robustness = making sure that the program does not crash when handling unexpected data. Robust programs use error tapping and provide the user with and error message rather than just crashing

Readability = a code that is easily understood by another programmer. Ways to make the code readable are:

  1. Include internal commentary
  2. Meaningful variable names
  3. Indentations
  4. White space
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Why may a program be inefficient? (2)

A

If the processor continues to work when i doesn’t need to. Eg. Using END IF instead of ELSE.

Also many unnecessary lines of code take up time and memory

17
Q

What can make a program more efficient?

More robust?

A

Arrays and not making the processor work when it doesn’t need to

Error tapping and displaying error messages instead of crashing