Which word means:
"The things that a user will enter into a program".
Inputs
- Flowchart.
OR
- Structure Diagram.
What data type should be used for the following data?food = "cheeseburger"
String
Design is one of many stages of software development.
What does it mean that software development stages are 'iterative'?
i.e a test finds an error in implementation - we go back to that stage to fix it.
How can you make a program readable?
- Whitespace
- Internal Commentary
- Meaningful variable names
- Indentation
Decisions, calculations and predefined functions are examples of ...
Processes.
Name a non-graphical design notation.
Pseudocode.
What Predefined Function is shown?
Do
Password = Inputbox("Enter a new password")
PasswordLen = Len(Password)
Loop Until PasswordLen >=8
A number between 1 and 10 must be entered into program. Give example of Normal test data.
2-9
If a program is robust, it....?
A program is robust if it can cope with unexpected inputs or mishaps without crashing
What are functional Requirements?
The inputs, processed and outputs of a program.
Designing a user interface for a program is known as a _____ Diagram.
What should it include?
Wireframe Diagram.
Inputs, start button, outputs.
Whats the difference between a conditional and a fixed loop?
Fixed loops an exact number of times.
Conditional loops based on a condition being met.
Exceptional Test Data?
Range of numbers from 5 to 100
-1, Fifteen
How can you make this more efficient?
SEND "You are repetitive" TO DISPLAY
SEND "You are repetitive" TO DISPLAY
SEND "You are repetitive" TO DISPLAY
SEND "You are repetitive" TO DISPLAY
Use a Fixed Loop:
FOR counter = 1 to 4
SEND "You are repetitive" TO DISPLAY
NEXT
A program will be created to find the average of 5 numbers.
Can you provide a process?
- Calculate total
OR
- Calculate Average
How do I say this in Pseudocode?
Listbox1.items.add ("Siiiiix Seveeeen")
SEND "Siiiix Seveeeeen" TO DISPLAY
What does the following code do?
IF temperature >= 50
SET Fan TO "FULL SPEED"
ELSE IF temperature < 50 AND temperature >=30
SET Fan TO "HALF SPEED"
ELSE
SET Fan TO "OFF"
Sets a fan to on, half or off based on temperature.
Give an example of an execution error.
Anything that crashes the computer.
How could you make this code more efficient?
Dim student as string
Dim student2 as string
Dim student3 as string
Dim student4 as string
Use an Array Data Structure rather than variables.
Dim Student(3) As string
A program is used to create a valid username and password.
The password must be 8 characters.
When an acceptable password is selected the user will be welcomed.
State:
An Input, a Process and an Output.
Using a design notation of your choice.
On the board, design a program to ask a user to enter a password until correct password "Password123" is entered.
DO
GET password FROM (String) KEYBOARD
IF password is not "Password123"
SEND "Invalid, try again" TO DISPLAY
ENDIF
LOOP Until password is "Password123"
What Standard algorithm is shown?
Dim seatAvailable(49) AS Boolean
FOR EACH seatAvailable()
IF seatAvailable = "FALSE"
SEND "Passenger name: " & passengerName
TO DISPLAY
END IF
END FOR
Traversing an Array (it's written using pseudocode).
A program is required to display the average of 5 numbers. Part of the code is shown below:
LOOP 5 TIMES
GET number FROM (INTEGER) KEYBOARD
SET total TO total + number
END FOR
SET Average TO total * 5
What type of error is shown above?
Logic Error. Should be divide and not multiply.
How can you make this more efficient?
If marks >=20 Then
msgbox("You get A") ENDIF
If marks < 20 AND marks >=15 Then
msgbox("You get B") ENDIF
IF marks >=10 AND marks < 15 Then
msgbox("You get C) ENDIF
IF marks < 10 Then
msgbox("You fail") END IF
Combine IF statements into one continuous statement.
This means when a condition is met other conditions will be skipped saving CPU time and memory resources.
IF...
ELSEIF
ELSEIF
ELSE