We began the lesson discussing our coursework. We went over ADITEM.
is the understanding of the problem, which the systems analyst would perform. The systems analyst would use their techniques to gain information and produce a problem specification of basically what the customer wants the program to do.
The design in ADITDEM is a plan of the program will do. Two types of design are pseducode and structured diagrams. These designs involve steps taken to make the program. This makes it smaller and easier to understand.
To help us understand the concept of design we were given a task. We were given two pieces of paper, with which on one we had to make a shape/diagram e.g. paper aeroplane or oragami and on the other we had to write our steps taken to make this shape/diagram. We than were given a final piece of paper and swapped our steps with someone else. Each of us had then to use that person’s steps and make their shape. This task proved very difficult as hardly anyone’s shape was the same as the right one. This task told us that in design our pseducode and structured diagram had to be very detailed to work. We decided we need a way to help us design. Rules!
Our pseducode had to make rules. In our coursework the design stage is worth 6 marks. Our design must be understood by anyone to pass. It is worth looking over.
We use visual basic in class for implementation, however, there are a lot more. There are various, different languages and different sources.
- exceptional – values not expected, defensive program, assume the programmers don’t understand e.g. always check and verif
- extreme – allowed but at limits, right on limit, sensible data, e.g. you could enter the wrong PIN as long as it is in the rang
- Normal – allowed e.g. enter a number between 1 and 5. The number 3 will be accepted.
A test table will check the limits of the program e.g.
PRESSED EXPECTED ACTUAL
yes quit quit
no don’t quit don’t quit
The program works, however, we cannot be sure of errors.
You should find the powerpoint I used in class attached at the bottom of this entry. Here are some of the example I used in class.
Squeakland – the home of etoys
Sugar on a stick – OLPC’s OS
Please see the PT ICM blog for minecraft
Software Development Catchup
The code we have created so far at the end of the period is given below, please see if you can finish it off.
Private Sub CmdStart_Click()
‘Set up variables
Dim multiple As Integer
‘Get Multiplier from user
Private Sub GetValue(ByRef intvalue As Integer)
intvalue = InputBox(“Please enter the value”)
Private Sub DisplayTable()
Today’s lesson was feed back from Tuesday’s short paper.
Please look over the paper and answers. Make sure that you have studied the questions that you did not get full marks on so you can improve your answers in the future.
You can find the papers and answers here
Design a program that displays a times table that the user enters.
Design MUST have data flow indicated.
Private Sub Command1_Click()
‘Set up variables
Dim NumA As Single
Dim NumB As Single
Call Get2Numbers(NumA, NumB)
Call DisplaySum(NumA, NumB)
Sub Get2Numbers(ByRef NumA, ByRef NumB)
NumA = InputBox(“What is the first number”)
NumB = InputBox(“What is the second number”)
Sub DisplaySum(ByVal NumA, ByVal NumB)
MsgBox (NumA + NumB)
Today’s lesson introduced 1-D arrays. The class started off by creating 3 programs.
1. Create a program to take in 3 numbers and display the sum and average.
2. modify the program to work with 5 numbers.
3. Modify the program to display the numbers after it displays the sum and average.
The class were given the main steps and asked to refine it, before starting the task. Each task was to be saved in separate folders.
The class was then asked to modify the program for 100 numbers. This led to discussion about the need for a new data type that could store a list of values, this data type is called Array.
Scratch was used to show how arrays can be used. The class then looked at the DIM command’s help page to discover how to set up an Array.
DIM IntNumber(50) as Integer
Where (50) is the number of items in the array.
The program was modified to allow entry of 100 values before the period finished.
Write the refinements for the main program given for 100 numbers.
- Set up Variables
- Get 100 values from user
- Calculate Average and Sum of values
- Display the Average, Sum and values
- End program