You are on page 1of 9

Stephen Rossiter (S0511437)

Unit - 6

Software development lifecycle


Task 1
User requirements; What the user requires is of major importance the design of a program. For instance the program needs to be designed to support the user of one or many different users at once. The list created by the user for the program will, most of the time, be non-technical and will not contain some of the parts that are needed for the program to run. Once the user has come up with what he wants they have to sign a declaration to make sure they dont say they wanted something the designer hasnt put in or the designer has put something the user didnt want. Specification The specification is more technical document compared to the list of user requirements the spec tells the programmer what he/she needs to put in the program and what to leave out. The specification is a list of controls that need to be placed on the form and the outlines of certain pieces of code that will ban certain actions; for example, entering letters in to a calculator. Design Story Board

04/10/11

Page 1

Stephen Rossiter (S0511437)

Unit - 6

The story board is a prototype of the form that will make up the face of the program. For example the image on the left is my story board for a change calculator; the story board is shown to the user to make sure the program looks like what the user wants. Design pseudo code
List of procedures 1. Enter item 2. Enter payment 3. Press calculate button 4. Change = payment item price 5. If(change 50)> = 0 then Add + 1 to 50 tender label Change = change 50 Go to line 5 ELSE Go to line 6 6. If(change 20)> = 0 then Add + 1 to 20 tender label Change = change 20 Go to line 6 ELSE Go to line 7 7. If(change 10)> = 0 then Add + 1 to 10 tender label Change = change 10 Go to line 7 04/10/11 Page 2

Stephen Rossiter (S0511437)


ELSE Go to line 8

Unit - 6

The above pseudo code basically shows us how the user in basic English how the program will work. Although the code is in English it helps the user understand the basis behind the programming. For example line 7 of the code will check to see if the change can have 10 removed from it without it going below 0 if so it will add one to the label showing how many 10 notes need to be returned to the customer, although this is only a small snippet of the pseudo code it shows the basics. Data flow chart The data flow chart is a visual guide to how the code works and which directions it takes when certain parameters are or are not met by the calculations or user input. See attached for example. Design data dictionary The data dictionary will tell the solo or group programmers what variables are being used. For instance if a group of programmers all used different data types once the code has been finished and merged together it will not work because the programmers all used different variable names.
Variable Name Change ItemValue Payment N Data Type Double Double Double Integer Example 0.01 19.99 20.00 2

A data dictionary will make sure the programmer(s) will use the same variables so when the code is put together it will all work perfectly. Design test plan The test plan will help the programmers test the program before it is given to the user. It
04/10/11 Page 3

Stephen Rossiter (S0511437)

Unit - 6

will show what tests are going to be made and what should happen, once the test have been made and the results filled in the programmer(s) can return to the coding and fix the bugs.
ID Test Date Expected Outcome Actual Outcome Action Passed ReTest date

Check item value doesnt accept nonnumerical values (no letters)

22/09/201 1

Text box doesnt allow nonnumerica l entry

Check item value doesnt allow values over 150

22/09/201 1

No values over 150 cannot be entered

Check the right change has been displayed on the screen

22/09/201 1

The change is equal to payment - item price There will be as little cash returned as possible A message box opens telling the user more money is

Check the change is displayed as the best possible.

22/09/201 1

Payment is less than item an error message is shown

22/09/201 1

04/10/11

Page 4

Stephen Rossiter (S0511437)


needed.

Unit - 6

Make sure the text box accepts numbers with up to two decimal places.

22/09/201 1

The table above is an example of a testing table that has yet to be filled in. As the names in the columns in the table show what the tester would have to look out for when testing the program. For instance the first test will see if non-numeric data can be entered in to the text boxes of a change calculator. If the program allows the entry of these values the tester will not this down and inform the programmer.
Implementation Reliability + Robustness - When putting the program to the test it must be able to with stand use by multiple users at once and constant use. For example if it was going to be used by 10 people you could make the program to handle 100 users without crashing. Along the same lines if the program was going to be used for 2 hours straight a day it could be made to last 10+ hours a day. Usability - To make a program useable the layout of the form needs to have some sense within it, would it make sense to have a program with two text boxes and a button but they controls are placed in any random place instead of next to each other.

The form in this image is useable but it is not very well laid out and would be difficult to understand.

04/10/11

Page 5

Stephen Rossiter (S0511437)

Unit - 6

On the other hand this form has order and a user would be able to understand the layout and be able to use it with little problem
Portability - For a program to be portable it has to use up little space as possible, if a program took up 2GB it could be moved around on a USB memory stick but if it was 6 GB it would need to be written on to a DVD. Although a DVD isnt that big it does take up more space than a USB but the program could be so large it would need to go on a Blue Ray disk or an external hard drive. The Blue Ray may be the same size as a DVD but it needs a specialist reader and writer which means forking out more money. Maintainability - To make a program maintainable the code has to be ordered and readable. If the code is all over the place the bugs will be very difficult to find and fix. Variable names - by creating variables a coder can make his code easier to read and reduce the file size. By declaring n as an integer when using the integer all that needs to be entered is n. If the variable has not been declared they would have to declare n as an integer every time they used it.

Camel casing Camel Casing makes code reading the code easier but it is not essential as it makes no difference to the working of the code. When using came casing the first letter of the second word onwards will be capitalised to make it easier to read the words

The first line is camel cased so the beginning of each word can be seen but the second line is a lot harder to read because there are no capitals at the beginning 04/10/11 Page 6

Stephen Rossiter (S0511437)

Unit - 6

of each word. Camel Casing is important because it will increase the readability of the code and help the program see where words end and new ones begin. Indentation Indentation will make reading code a lot easier because the code inside a loop of if statement will be indented so the programmer can see what code is doing what.

When indenting code we can see where the loops and functions end and begin and what code is inside them. Comments when writing code we can use the apostrophe to comment the code. By commenting on the code you can refer to these when updating or de-bugging the program to familiarize with what the code does.

Also if another programmer had to de-bug or upgrade your program they can refer to the notes to see how the program works because they didnt create it. Comments are important because, like the Camel Casing, it will increase readability and the ability to maintain the coding behind the program. Regions a region will group all relevant data in to one line of code, this makes it easier to find and change certain parts of the code when it comes to updating or de-bugging.

04/10/11

Page 7

Stephen Rossiter (S0511437)

Unit - 6

By using a region the programmer can clean up the code and make it easier to find a certain piece of code. When the region is closed it minimizes in to one line making the program ordered and tidy. Classes and objects when creating a program a programmer can use objects and classes to make the file smaller and more portable. When a class is created it is given certain attributes and an object inherits many classes so it has lots of different attributes. For example a class called animal would contain data that every animal has. The object would be a certain animal. If the object was a dog it would inherit multiple classes to obtain all of the data about a dog. Functions unlike a sub-routine a function returns a value to the user whereas a sub-routine only executes an action.

04/10/11

Page 8

Stephen Rossiter (S0511437)

Unit - 6

Procedures when a program follows procedures it will only work in one way. The code cannot mix up the steps or take them in a random order. For example when I made a text reverser the code would have to take the first letter and then the second letter. If it could mix up the order of the code it wouldnt reverse the text correctly.

04/10/11

Page 9

You might also like