intermediate 2 computing unit 2 - software development

33
Intermediate 2 Computing Unit 2 - Software Development

Upload: christian-alan-dawson

Post on 18-Jan-2016

220 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Intermediate 2 Computing Unit 2 - Software Development

Intermediate 2 Computing

Unit 2 - Software

Development

Page 2: Intermediate 2 Computing Unit 2 - Software Development

Topic 1: Software Development Process• Describe the stages (in order) of the SDP;• Describe and give examples of pseudocode

and one graphical design notation;• Describe and give examples of appropriate

test data;• Describe the features of a user guide and a

technical guide; &• Evaluate software in terms of fitness for

purpose, user interface and readability.

Page 3: Intermediate 2 Computing Unit 2 - Software Development

Topic 2: SD Languages and environments• Describe and compare machine code and

HLL’s;• Explain the need for translation;• Describe the functioning of interpreters and

compilers• Describe the process of recording a macro

and assigning it to a keystroke;• Describe a macro and examples of the use

of macros; &• Describe the features and use of a text

editor.

Page 4: Intermediate 2 Computing Unit 2 - Software Development

Topic 3: High Level Programming Language Constructs• Describe and give examples of the following

constructs in an appropriate HLL:– Input and Output, assignment; arithmetical

operations and logical operators, fixed loops, conditional loops, simple and complex conditions, conditional statements and nested loops.

• Describe and give examples of numeric and string variable and 1-d arrays; &

• Describe and give examples of pre-defined functions.

Page 5: Intermediate 2 Computing Unit 2 - Software Development

Topic 4: Standard Algorithms

• Describe and give examples of the following standard algorithm in an appropriate HLL:– Input Validation.

• Recognize appropriate use of the following standard algorithms:– Input Validation, Find Min, Find Max, Count

Occurrences and Linear Search

Page 6: Intermediate 2 Computing Unit 2 - Software Development

Software Development

Topic 1 -Software Development

Process

Page 7: Intermediate 2 Computing Unit 2 - Software Development

Describe the stages (in order) of the Software Development Process

A Dance In The Dark Every Monday

TOPIC 1 - SOFTWARE DEVELOPMENT

PROCESS

Page 8: Intermediate 2 Computing Unit 2 - Software Development

Describe the stages of the SDP

A Dance In The Dark Every Monday

• Analysis• Design• Implementation• Testing• Documentation• Evaluation• Maintenance

Page 9: Intermediate 2 Computing Unit 2 - Software Development

Analysis

The main purpose of the analysis stage is to be absolutely clear about what the program is supposed to do.

The result of this is the production of a program specification, agree by both the customer and the developer.

Page 10: Intermediate 2 Computing Unit 2 - Software Development

Design• Before the programmer writes the actual

code, he spends time working on the structure of the program, the screen layouts, and how users will interact with the program.

• Two common methods for designing a program are:– Pseudocode; &– Structured Diagrams.

• Spending time carefully planning how a program will work, will cut down on errors at later stages.

(We will look at these later)

Page 11: Intermediate 2 Computing Unit 2 - Software Development

Implementation• Implementation is the process of converting

a program design into a suitable programming language.– The screen should look like your screen design;– The structure of your code should follow your

pseudocode and your structured diagrams.

• Any changes made during implementation MUST be recorded and changed in design.

Page 12: Intermediate 2 Computing Unit 2 - Software Development

Testing• This is when you systematically look for any errors

in your code. There are three types of testing:– Normal Testing

• Making sure that the program does what it should do when used normally. If the program asks for a percentage enter 12 as it should accept this.

– Extreme Testing <--- used to be called boundary• Making sure the program can handle situations that are at

the edge of what would be considered normal. If the program asks for a percentage enter 0, -1, 100, and 101.

– Exceptional Testing• Making sure it can handle inputs that it has not been

designed to cope with. If the program asks for a percentage enter “You are an ugly class”. It should give an error message and not crash.

Page 13: Intermediate 2 Computing Unit 2 - Software Development

Documentation• This is the documents that the user gets when they

buy a piece of software.

• When you buy a PS2 game you get:– On the outside a label saying PS2 so that you know what

console it is for.– In the package a booklet telling you what control does

what and how to work the basics of the game.

• There are two main types of documents:– User Guide; &– Technical Guide.

» We will describe these later in detail!

Page 14: Intermediate 2 Computing Unit 2 - Software Development

Evaluation• The final stage before software is distributed is

evaluation. This involves reviewing the software under various headings:

» Fitness for purpose;» User Interface; &» Readability.

• to see if it does what it is supposed to and is of good quality.

– We will look at these headings in more detail later.

Page 15: Intermediate 2 Computing Unit 2 - Software Development

Maintenance• This stage happens once the program has

been sold. There are three headings:– Corrective Maintenance

• Means fixing any bugs that appear once the program is in use.

– Perfective Maintenance• Means adding new features to the program.

– Adaptive Maintenance• This is when the software has to be changed to take

account of new conditions. E.g. new OS.

Page 16: Intermediate 2 Computing Unit 2 - Software Development

Describe and give examples of pseudocode and one graphical design

notation (structured diagram or other suitable)

TOPIC 1 - SOFTWARE DEVELOPMENT

PROCESS

Page 17: Intermediate 2 Computing Unit 2 - Software Development

Pseudocode• We look at the program that has to be

written.

• Then we make a list of numbered steps, in English, on how the program will solve the problem.

• We start with the Inputs, then the Processes and finally the Outputs.

Page 18: Intermediate 2 Computing Unit 2 - Software Development

Pseudocode - Example• Problem - Write a program that allows a

user to enter a score out of 50. The program should calculate and display the percentage.

• Before we write the pseudocode it is good to work out the Inputs, Processes (calculations) and the Outputs.

• Inputs Processes OutputsScore Percentage Percentage

Page 19: Intermediate 2 Computing Unit 2 - Software Development

Pseudocode - Example• Pseudocode:

1. Get the score1.1Prompt user for a score1.2Accept

2. Calculate Percentage2.1percentage := score / 50 * 100

3. Display Message

• Here is the trick:– Start with the input variables and put “Get the” in front

of them.– Next comes the process variables. Put Calculate in front

of the them.– And always put Display Message at end!

Page 20: Intermediate 2 Computing Unit 2 - Software Development

Structured Diagram• Instead of the instructions being in a list

they go into boxes, from left to right.• Here is the previous problem as a

structured diagram:

Percentage Program

Get the ScoreCalculate

PercentageDisplay Message

Page 21: Intermediate 2 Computing Unit 2 - Software Development

Describe and give examples of appropriate

test data (normal, extreme and exceptional)

TOPIC 1 - SOFTWARE DEVELOPMENT

PROCESS

Page 22: Intermediate 2 Computing Unit 2 - Software Development

Test Data

• When designing a test table the programmer must test for all eventualities. Normal data, extreme data and exceptional data should be tested.

• Remember the purpose of testing is not to see if the program works it is to find the errors.

Page 23: Intermediate 2 Computing Unit 2 - Software Development

Test Data• The table should have the following

headings:• Inputs;• Expected Outputs; &• Actual Outputs.

• To work out the inputs and your expected outputs you need to think about what you are being asked to enter.

• Then consider what would be the normal test data, extreme test data and exceptional test data.

Page 24: Intermediate 2 Computing Unit 2 - Software Development

Test Data• Lets go back to the percentage problem - Write a

program that allows a user to enter a score out of 50. The program should calculate and display the percentage.

Input Type of Expected ActualTest Data Output Output

25 Normal 50%0 Extreme 0%-1 Extreme Error message50 Extreme 100%51 Extreme Error MessageHello Exceptional Error message

Page 25: Intermediate 2 Computing Unit 2 - Software Development

Test Data• The actual Output column does not get filled in

until the programmer is actually entering the test data.

• If there are any differences between what the programmer expected and what the program actually does then the programmer needs to go back to the program and find out what needs to be fixed.

• These differences need to be written up as part of testing for future reference.

Page 26: Intermediate 2 Computing Unit 2 - Software Development

Describe the features of a user guide and a technical

guide.

TOPIC 1 - SOFTWARE DEVELOPMENT

PROCESS

Page 27: Intermediate 2 Computing Unit 2 - Software Development

Documentation

• User Guide– This tells you how to use the product.

It might also contain a tutorial, taking you through the use of the product step by step.

– Some user guides come in the form of a booklet or on a CD.

Page 28: Intermediate 2 Computing Unit 2 - Software Development

Documentation

• Technical Guide– This gives technical information such as:

• Which OS is required;• How much memory is needed; &• How fast a processor it must have.

– The technical guide should also include instructions on how to install the software.

Page 29: Intermediate 2 Computing Unit 2 - Software Development

Evaluate software in terms of fitness for purpose, user interface and readability

TOPIC 1 - SOFTWARE DEVELOPMENT

PROCESS

Page 30: Intermediate 2 Computing Unit 2 - Software Development

Fitness for Purpose

• Is the software fit for purpose?– To answer this question the programmer

must go back to the program specification and check that all the features of the software have been implemented.

– It also means considering the results of testing, and making sure that the program works correctly and is free from bugs.

Page 31: Intermediate 2 Computing Unit 2 - Software Development

User Interface

• Answer the following questions:– Is the program easy to use?– Is it clear what all the menus, commands

and options are supposed to do?– Could it be improved in any way?

Page 32: Intermediate 2 Computing Unit 2 - Software Development

Readability

• This is not for the end-user, but for the programmer.

• If a programmer can take a program they have not written and understand it, it is deemed readable.

Page 33: Intermediate 2 Computing Unit 2 - Software Development

Readability

• What makes a program readable?– Using meaningful variable names

• If the program asks for a user name call the variable “username” not scoobydoo!

– Use internal commentary• Beside each section of code write a small

sentence on what that piece of code does.