Software Design & Development Flashcards
What are the stages of software development?
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
What are examples of design notation?
- Flowcharts
- Structure diagrams
- Pseudocode
What are the symbols in a structure diagram for:
- procedure (title)
- single step
- decision
- loop
What are each of these things?
- 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
What are the symbols in a flowchart for:
- terminator
- decision
- input/output
- step
What is the terminator?
- stretched oval
- diamond
- parallelogram
- rectangle
Start/end
What is a:
- Fixed loop
- Conditional loop
How do you write these in:
- Pseudocode
- Visual Basic
- 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
What are items of data stored in in program?
What data type:
- holds a single character
- holds a decimal number
Variable
- char
- real
What is an array used for?
Make an array for six different toppings
What is this type of array called?
To store multiple values of the same data type
Dim Toppings(5) As String
1D array
What symbol is used to make concatenated strings?
What are arithmetical operators?
What are comparisons?
What are logical operators?
&
+ * / ^
= <> =>
And, Or, Not
What makes an if statement complex?
What are global and local variables?
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
Give an example of a conditional loop nested inside a fixed loop
For person = 0 to 9 Do Age(person) = InputBox (“Please enter the age of person no. “ & person + 1) If Age(person) > 120 Then Msgbox(“Not possible”) Loop until Age(person) < 120 Next person
Give some examples of pre-defined functions and how they work
- 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
- Round
Record time = Math.Round(Record time, 2)
- Len
Len (“Hello”)
- 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
- SQR = square root
SQR(16)
= 4
What is:
- assignment
- sequencing
- selection
- iteration
- 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
What are the three types of test data?
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
What are the three error types?
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
What are the stages of evaluation?
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:
- Include internal commentary
- Meaningful variable names
- Indentations
- White space