Home
Subjects
Textbook solutions
Create
Study sets, textbooks, questions
Log in
Sign up
Upgrade to remove ads
Only $35.99/year
Software Development
STUDY
Flashcards
Learn
Write
Spell
Test
PLAY
Match
Gravity
Terms in this set (47)
Functional Requirements (Programs)
The functional requirements of a program are defined as inputs, processes and outputs.
A list of inputs that will come from the user, a sensor or a file are included.
The processes focus on tasks the program will need to perform, such as validating input, or calculating an average.
The outputs are a list of what the program will output, usually on screen but possibly to a file.
Analysis Phase
A systems analyst creates a software specification. The specification includes the purpose and functional requirements (inputs, processes, outputs)
Design (Programming)
When designing a program, it is possible to use:
Pseudocode
Structure Diagrams
Flowcharts
Pre-defined fucntions
Pre-defined functions can be used to return single values.
The three in the course are
random,
round and
length (LEN)
Pseudocode
Pseudocode is a written list of steps used to design a program.
Main steps are listed e.g. 1, 2, 3.
Each main step is then refined e.g. 1.1, 1.2, 1.3, 1.4 etc.
One line of pseudocode usually results in one line of code when implementing (creating the program).
User Interface Design
The functional and end user requirements are taken into consideration when designing the user interface. The user interface is the part of the program the user sees.
A wireframe showing input and output areas as well as the location of media is often created when designing a program.
Real
A real number is a number that includes a decimal value. The real data type is often called 'Single or Float' when using a programming language.
Real numbers are used to store positive or negative numbers that include a decimal value e.g.
21.54
-54.12423
Integer
An integer is a whole positive or negative number. To store a whole number, use the Integer data type. E.g.
14
-21
223
String
A piece of text - a string of characters
Character
A character is a single letter, number or symbol. Examples:
A
!
7
The character data type is used to store one single character only.
Data Types
Data types identify the type of data held by a variable:
Character
String
Integer
Real
Boolean
Concatenation
Joining two or more strings or substrings
For example:
fullname = firstname & " " & surname
Would join first name and surname and include a space between both.
In Reference language: SET fullname TO firstname + " " + surname
Arithmetic
Using arithmetic (+, -, /, *, ^) e.g.
In reference language SET total TO total + score
In Python total = total + score
Assignment
Assigning a value to a variable e.g.
In reference language
SET score TO 20
Selection Constructs
< Less than
> Greater than
<= Less than or equal to
<=Greater than or
== Equal to
!= Does not equal
Boolean
The Boolean data type is used to store either true or false.
Simple Condition
A simple condition has only one condition e.g.
IF firstname = "Betty"
The condition is = "Betty"
Logical Operators (AND, OR, NOT)
Logical operators can be used in IF statements and conditional loops.
AND - Both conditions must be true
OR - One condition must be true
NOT - The opposite outcome to what would logically apply (negation)
Nested IF Statements
Nested IFs are IF statements inside IF statements.
The nested parts only run if needed.
IF score < 100 THEN
SEND "Low Score" to DISPLAY
ELSEIF score < 150 THEN
SEND "Mid level score" TO DISPLAY
ELSE
SEND "High score" TO DISPLAY
END IF
END IF
IF Statements
IF statements allow the program to make decisions. Conditions, such as score < 10 are used within IF statements.
IF score < 10 OR score >50 THEN
SEND 'Try Again' TO DISPLAY
END IF
This IF statements checks to see if a score is less than 10 or higher than 50
Complex Condition
A complex condition has two or more conditions e.g.IF firstname = "Betty" OR firstname = "Trevor"
The two conditions are = "Betty" , = "Trevor"AND / OR are used as part of complex conditions
Conditional Loop
A conditional loop repeats until a condition is met e.g.
WHILE score <10
<CODE TO BE REPEATED GOES HERE>
END WHILE
This loop will repeat the code inside as long as the score variable holds a value that is less than 10
Fixed Loop
A fixed loop will repeat all code held within the loop a set number of times only. E.g.
For i = 0 to 9
<CODE TO BE REPEATED GOES HERE>
Next i
The above loop would repeat 10 times.
Repetition and Iteration
Repetition and iteration are technical terms for loops.
Repetition repeats a task set number of times. Iteration is the same but usually involves checking over the contents of an array until you achieve what you want to achieve e.g. find a number or get to the end of the array list.
RANDOM Function
RANDOM is a pre-defined function, meaning the code to make it work already exists.
If you use the RANDOM function, the computer will generate a random number:
SET bonusBall TO RANDOM(1, 59)
This would generate a random number between 1 and 59 and returns this number to the bonusBall variable.
ROUND Function
ROUND is a pre-defined function, meaning the code to make it work already exists.
If you use the ROUND function, the computer will round a value to a certain number of decimal places:
SET size TO ROUND (measurement, 1)
This takes the value of the measurement variable and rounds it to one decimal place. It then returns this new value to the size variable
Input Validation Algorithm
This algorithm checks that input is valid:
Line 1 SEND "Enter a score between 1 and 99" TO DISPLAY
Line 2 RECEIVE score FROM (INTEGER) KEYBOARD
Line 3 WHILE score ? 1 OR score ? 99 DO
Line 4 SEND "Error, enter valid number" TO DISPLAY
Line 5 RECEIVE score FROM (INTEGER) KEYBOARD
Line 6 END WHILE
LENGTH Function
LENGTH is a pre-defined function, meaning the code to make it work already exists.
If you use the LENGTH function, the computer will calculate the number of characters held in a string variable:
SET numberOfCharacters TO LENGTH (firstname)
This would take the value in the first name variable, calculate its length and returns it to the numberOfCharacters variable. E.g. Jane would return 4
Normal Test Data
Normal test data is data that should be accepted. E.g. If asking for a number between 1 and 99, 77 is an example of normal data
Test Table
When testing a program, you should create a test table. A test table will contain at least two sets of normal, exceptional and extreme data. For each test, you will state the expected result and the actual result.
Traverse a 1D Array Alogrithm
To traverse an array means to use a loop to go through the array one item at a time.
DECLARE allGrades INITIALLY [A, B, B, D, F]
In the above example, each item in the allGrades array is checked one after another, with a running total also calculated.
This algorithm keeps a running total:
Line 1 DECLARE total INITIALLY 0
Line 2 FOR loop FROM 0 TO 4 DO
Line 3 RECEIVE number FROM (INTEGER) KEYBOARD
Line 4 SET total TO total + number
Line 5 END FOR
It asks for and keeps a running total of 5 values.
Running Total Algorithm
This algorithm keeps a running total:
Line 1 DECLARE total INITIALLY 0
Line 2 FOR loop FROM 0 TO 4 DO
Line 3 RECEIVE number FROM (INTEGER) KEYBOARD
Line 4 SET total TO total + number
Line 5 END FOR
It asks for and keeps a running total of 5 values.
Execution Error
An execution error is when the program tries to do something that is impossible e.g.
Divide by zero.
Read from an array position that does not exist (overflow)
Try to open a file that does not exist. Causes the program to crash.
Syntax Error
A syntax error is an error caused by adding or missing characters when typing code. E.g. iff, fore
Exceptional Test Data
Exceptional test data is data that should not be accepted. E.g. If asking for a number between 1 and 99, 1001 and 'hello' are examples of exceptional data
Extreme Test Data
Extreme test data is data at either limit of a range. E.g. If asking for a number between 1 and 99 inclusive, 1 and 99 are the extremes.
Efficient Code (Using Fixed Loops)
Using fixed loops is more efficient than repeating similar code over and over again. Use of 'i' or 'counter' tracks the position in the loop.
Always used fixed loops if you are repeating the same task such as asking for and storing a list of names.
Fitness for Purpose
Software is fit for purpose if it meets the specifications found in the end user and functional requirements. If it is not fit for purpose, it is necessary to revisit previous phases of development in light of new information.
Documentation
Various documents are created during software development:
Software Specification
Functional requirements
End User requirements
Design
Wireframe
Structured Listing
Test Table
Logic Error
A logic error does not cause a crash but causes unexpected output or results.
Some examples of logic errors are:Using AND when you should have used OR
Using > when you should have used <
Program runs but the logic is wrong, therefore the results are unexpected/incorrect.
Internal Commentary
Internal commentary lets programmers add comments that can be read by other programmers. These comments are not translated by interpreters or compilers. They can be used to describe the code that follows or to explain decisions taken when developing code.
Readability
Code is readable if:Internal commentary is usedWhite Space is usedIndentation is usedMeaningful variable names are used
Robustness
A program is robust if it can handle unexpected input without crashing. This means that it will make use of input validation algorithms that return messages if incorrect input is entered.
Efficient Code (Using Complex Conditions)
Use complex conditions that make use of AND, OR, NOT as part of an IF statement rather than creating two separate IF statements that use simple conditions.
Efficient Code (Using Nested IFs)
It is better to use nested IF statements rather than a number of individual IF statements. Nested IFs will stop running when the correct selection is applied. This is more efficient than using separate IFs with no nesting.
Software Development Phases
The phases of software development are:
Analysis
Design
Implementation
Testing
Evaluation
Iterative Phases
To 'iterate' means to revisit previous phases of software development in light of new information. For example, if you find a program is not working at the testing phase, you may need to revisit design and implementation phases to fix the problem.
Other sets by this creator
Database Essential KU Q's
14 terms
Web Essential KU Q's
23 terms
Systems Essential KU Qs
18 terms
SDD Essential KU Q's
11 terms