Software Development INT 2 Computing - Software Development Infosheet 5.6.1 What is software? You should already know that any computer system is made up of hardware and software. The term hardware is fairly easy to understand, because you can see it. It is all the pieces of equipment that make up the system - the processor, monitor, keyboard, mouse, printer, scanner and so on. Software is not so obvious. It is all the programs, instructions and data that allow the hardware to do something useful and interesting. Think about all the different items of software that you have used in the last week or so. Here is a list of popular programs that you may be familiar with: • Microsoft Word (the word processing program that I use) • Microsoft Excel (spreadsheet used to keep charity accounts for which I am the treasurer) • AppleWorks 6 (integrated package - I mainly use its word processor and simple database sections) . • Internet Explorer (both PC and Mac versions - for browsing the web) • two different e-mail clients (Nets cape Communicator and MS Outlook • iPhoto (for organising my digital photographs) • iMovie (for editing digital movies) • Safari (web browser for MacOS X) • Adobe Photoshop (for editing digital photographs) • Adobe PageMaker 6.5 (for creating worksheets to be used at school) • Toast (for burning CDs) • Adobe Acrobat (for viewing pdf files) But that’s not all! On each computer that we have used, a program (or group of programs) called the operating system must have been running. So we must add the following to our list: • MacOS 9.2 ( iMac at school) • MacOS X.2 (on a iMac at home) Thirdly, a full list would include all the actual documents, files, web pages, e-mails and so on, that we had accessed, as these are also software. That would be too long a list, so I ’ll ignore it here.
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Software Development
INT 2 Computing - Software Development
Infosheet 5.6.1
What is software?
You should already know that any computer system is made
up of hardware and software.
The term hardware is fairly easy to understand, because you can see it. It is
all the pieces of equipment that make up the system - the processor, monitor,
keyboard, mouse, printer, scanner and so on.
Software is not so obvious. It is all the programs,
instructions and data that allow the hardware to do
something useful and interesting.
Think about all the different items of software that you have used in the last week
or so.
Here is a list of popular programs that you may be familiar with:
• Microsoft Word (the word processing program that I use)
• Microsoft Excel (spreadsheet used to keep charity accounts for which I am the treasurer)
• AppleWorks 6 (integrated package - I mainly use its word processor and simple database sections) .
• Internet Explorer (both PC and Mac versions - for browsing the web)
• two different e-mail clients (Nets cape Communicator and MS Outlook
• iPhoto (for organising my digital photographs)
• iMovie (for editing digital movies)
• Safari (web browser for MacOS X)
• Adobe Photoshop (for editing digital photographs)
• Adobe PageMaker 6.5 (for creating worksheets to be used at school)
• Toast (for burning CDs)
• Adobe Acrobat (for viewing pdf files)
But that’s not all! On each computer that we have used, a program (or group of programs) called the
operating system must have been running. So we must add the following to our list:
• MacOS 9.2 ( iMac at school)
• MacOS X.2 (on a iMac at home)
Thirdly, a full list would include all the actual documents, files, web pages, e-mails and so on, that we
had accessed, as these are also software. That would be too long a list, so I’ll ignore it here.
Software Development
INT 2 Computing - Software Development
Infosheet 5.6.1
Stage 2: Design
out.
The development process Before we think about how software is developed, it is worth considering how any product is developed,
because the process is essentially the same.
For example, think about the process of developing a new model of TV.
Stage 1: Analysis
Before a new product is developed, someone within the
company, probably in the marketing department,
analyses what people want. They consider which
products are selling well, look at what rival companies
are producing, and maybe even carry out a survey to find out what people want.
From this they can work out which features are required in their newest model,
including its size, target price range and various technical requirements.
They use this information to produce a specification for the new model of TV. This states clearly all the
features that it must have.
The next stage is to turn the specification into a design. Designers will
get to work, alone or in groups, to design various aspects of the new
TV. What will it look like? How will the controls be laid out? Sketches
will be drawn up and checked against the specification. Another team
of designers will be planning the internal circuitry, making sure it will
allow the TV to do all the things set out in the specification.
Stage 3: Implementation
Once the design phase is over, engineers will get to work to actually
build a prototype. Some will build the case according to the design,
while others will develop the electronics to go inside. Each part will be
tested on its own, and then the whole thing will be assembled into a
(hopefully), working TV set.
Stage 4: Testing
Before the new model can be put on sale, it will be thoroughly tested. A wide range of tests will be carried
It might be tested under ‘normal’ conditions. It could be put in a room at
normal room temperature, and checked to see that all the controls work
correctly, the display is clear, it is nice and stable, and so on.
If it passes this type of testing, it might be tested under ‘extreme’ conditions.
For example, does it still work if the temperature is below freezing, or very hot and humid, if it is used for
long periods of time, or with the volume or the brightness or contrast set to their maximum values.
Software Development
INT 2 Computing - Software Development
Infosheet 5.6.1
Finally, it could be tested under
‘exceptional’ conditions. What happens if
a 2-year old picks up the remote and
presses all the buttons at once? What
happens if there is a power cut, or a power
surge?
If it fails any of these tests, it might be necessary to go back to the implementation (or even design) stage
and do some further work, before re-testing.
If it passes all the tests, then the new TV can go into production.
Stage 5: Documentation
However, the development isn’t yet complete! Some documentation
will be needed to go with the TV - a User Manual containing all the
instructions about how to work the new TV, and probably a
Technical Manual for repair engineers.
Stage 6: Evaluation
Once the model is in production, the company will want to
evaluate it. Does it do what it is supposed to do? Is it easy to
use? And, from the engineer’s point of view, is it easy to
repair?
Stage 7: Maintenance
Stage 6 should be the end of the story, but in the real world, there needs to be
stage 7 - maintenance. There are different kinds of maintenance: fixing faults that
turn up once the product is being used
regularly, improving the design to make
the product even better, or making changes
for other situations the product may face
(like making a version that
will work in another
country) .
These seven stages are an essential part of any production system
and are collectively known as the Development Process.
Software Development Process
INT 2 Computing - Software Development
.
Infosheet 5.6.2
A system is much more than an environment of computer hardware and
software, and in some cases will have none of these components. You
only need to look around to see that in the world of work some systems
do not contain or utilize computers.
A small companies payroll system
may have a process set-up to pay
employees but does not use any
computers. The amount of Pay, Tax,
National Insurance, etc is calculated manually and the employees paid
in cash. Books are kept with all the total information regarding the
staff payroll and are kept for
years.
The most common factors are:
So, when does a system become a computerised system and the
design of a computerised solution become a requirement? What
factors would influence this decision?
• the manual system becomes overloaded by increasing workloads
• the system is too dependent on skilled staff who are expensive or difficult to employ
• the nature of the work changes
• frequent expensive errors are made
The manual system will have to undergo a rigorous process of Systems Analysis and Design to transform
it into a computerised system.
Developing Computerised Solutions Prior to the 1960's computer solutions
were developed with little regard to
what we now recognise as established
methods. Development of a system
was handled by highly trained,
technical personnel within an
organisation. There were many
problems with this approach. Too often user's
needs were met by programmers who did not
take into account the system as a whole.
Managers and directors are not expert programmers, but understandably knew
that these systems were not what they required. They insisted upon better
solutions. The solution lies in a method of clearly translating a verbal or
textual description of an idea into a feasible solution.
Software Development Process
INT 2 Computing - Software Development
.
Infosheet 5.6.2
The only way to guarantee that the best solution is
identified at the earliest opportunity is to adopt a clearly
defined system of procedures and practices that provide
guides and checks that all factors have been taken into
account at all stages of the development.
The most popular and widely used system in industry is
referred to as the waterfall model.
Lots of different versions of this development model
exist, each one is usually specific to the type of
problem that is being solved, but each follows basically
the same procedures.
THE WATERFALL MODEL
ANALYSIS
DESIGN
IMPLEMENTATION
TESTING
Using the ‘Waterfall Model’ each
stage is created and completed in
turn before moving on to the next
stage. This process continues to the
completion of the task however as
we move from one stage to another
questions or problems may arise that
require that we return to a previous
stage to obtain clarity. This referral
to previous stages to answer
questions and resolve problems is
referred to as an Iterative Process.
DOCUMENTATION
EVALUATION
MAINTENANCE
ANALYSIS
INT 2 Computing - Software Development
Infosheet 5.6.3
A systems analyst is the person who is capable of ensuring that all of the
demands of the system are properly analysed, documented and applied. It
is this person's job to carry out an analysis of the situation. In other
words the need for exploring the original idea more closely.
Skills Of A Systems Analyst Most systems analysts have a background in programming. The first
thing that a systems analyst needs to learn is to communicate effectively with the user / client and
technical systems developers. The analyst is like a buffer between the user / client and the systems
development team. These communication skills can be transferred into many other aspects of the job.
It is fundamentally important that a system is developed which
meets the needs of the client. Anything less is simply useless.
The client will be dissatisfied, with money and time misspent.
Clients are not usually technically skilled, therefore the analyst
must develop ways of extracting their needs, documenting
these needs in some formalised way and finally
communicating them to the team of designers and
programmers who will build the system.
Analysis of the problem Systems Analysis relates to the understanding of the problem, clearly identifying what the solution to the
problem must do.
What type of computer and what operating system will be used to run the program?
Will it need special input or output devices?
Will it be using specialist backing storage devices?
Problem Specification The problem specification is a clear and precise description of the
problem understood by both the programmer and the client. A clear
statement of the problem inputs, outputs and any assumptions are stated.
It is important to get software correct the first time. For example, if new
software was being developed for all of the banks in Scotland the cost
would be very high, therefore it is imperative to get the software right
the first time, to save money and keep good customer relations.
The aim is to produce robust and easy to use software. Program
schedules (the expected time for each stage of development), test plans
(to check that is robust and correct) and user documentation (instructions on how to use the package) arise
from the problem specification.
ANALYSIS
INT 2 Computing - Software Development
Infosheet 5.6.3
Errors Any errors regarding the problem specification should be
detected early in the development cycle. If not they can be very
costly to resolve especially at a later stage in the development of
the software. If errors are not detected then poor testing and
incorrect documentation will be produced as a result. It costs
more to correct an error at the maintenance stage of software
development that it does at the analysis stage.
Algorithm An algorithm is a set of instructions that describe how a particular type of problem may be solved.
When we are going to make
something e.g. a meal we
firstly need all of the
ingredients combined with
the recipe. Every time we go
to make the meal after this
we use the same ingredients
and follow the same recipe.
If we missed something out
then would not end up with
desired result! The input and
the recipe must be clearly
identified and adhered to
obtain the expected output.
An algorithm correctly implemented will always produce a correct result. In computing the correctness of
a program can be ensured if the correct algorithm is chosen.
A problem is fully specified when it is stated clearly and we define the inputs and outputs for the problem.
Only when both the analyst and the client are sure and happy about the
idea and its proposed development, only then will the analysis stage may
be completed. It is a lengthy iterative process (repeatedly checking that
the various stages are correct and do the correct job) , but both parties
must be 100% sure before the next stage in the development can take
place.
DESIGN
INT 2 Computing - Software Development
Infosheet 5.6.4
Once the needs of the user are clearly understood and documented,
software development can move onto the next stage - the DESIGN of
the system. System Design involves the methodical planning of the
solution to the problem. Systems Design answers the following
questions:
•What the hardware and software environment of the system
will be.
• The programming language to be used.
• HCI - screen designs, menu options, etc.
When the problem for the programmers is clearly specified there
are some techniques which the programmer can use to produce the
program. A number of methods are available, they all express large
problems as a set of smaller problems. This method is called Top
Down Design. Top Down Design is a process of breaking a
problem down into smaller problems, this is known as stepwise
refinement. Stepwise refinements continues until the subproblems
are manageable enough to be coded. It is necessary to use a
structured and methodical approach to planning the solution.
These techniques can be used in any type of design or planning. We can use a Top Down Design
technique to write an essay.
Introduction
Set Scene
Introduce Main Characters
Introduce Plot
Middle
Develop relationship between main characters
Introduce a minor but important character
Develop Plot
Tell strand 1 of plot
Tell strand 2 of plot
Tell strand 3 of plot
Ending
Bring together strands
Conclusion of plot
Happy ending
DESIGN
INT 2 Computing - Software Development
Infosheet 5.6.4
No
Calculate average
Print out average
Stop
Two graphical methods of designing the structure of a program which we will look at are structured
diagrams and flow charts.
Structured Diagrams Structured diagrams represent the top down design of the solution by 'layering'. The top layer of the
diagram is the initial problem. The second top layer shows the breaking down of the initial problem into
smaller problems, and so on. It's a tree-like diagram.
Example A program has to be written to find the average of a set of numbers.
A typical structure diagram for this problem could be:
Finding the average of a
set of numbers
Get first
number
Repeat until no
more numbers
Calculate average
by dividing total by count
Print average
Add number to total
Add 1 to count
Notes about structure diagrams
• The box at the top describes what the whole program
does.
• The boxes below are arranged in logical order from left
to right.
• Each box shows a different section of the program.
• The flow of data may be indicated by an arrow labelled
with the data name.
Start
Initialise
variables
Get first numbers
Add 1 to count
Flow Charts A flowchart is often used to illustrate an algorithm (set of
instructions) to solve a problem. A flowchart is a diagram which
uses different shapes and arrows to show the steps in a problem
solution. Particular box shapes are used to represent different
aspects of coding.
Example
A program has to be written to find the average of a set of
numbers,
A typical flowchart for this problem could be:
Any more
numbers?
Yes Add number
to total
DESIGN
INT 2 Computing - Software Development
Infosheet 5.6.4
Pseudocode Pseudocode is a cross between a programming language and English. Pseudocode is sufficiently like
English to allow you to concentrate initially on your program design without having to worry about the
complexities of the programming language using key words.
When writing pseudocode it is important to use indentation and keywords to represent the design
structure. Every program should be broken down into modules and then each module should be described
and again broken down fully. This is known as step-wise refinement.
Stepwise refinement can be identified by the numbering of the statements. Indentation of the
statements helps to represent the design structure. This helps to make the program more readable.
Example
A program has to be written to find the average of a set of numbers.
Typical pseudocode for this problem could be:
Program Inputs: data
Program Outputs: average
Algorithm 1 initialise variables
2 work out average
3 print the average of the data set
Refine step 1 1.1 initialise the total and count of data items
Refine step 2 2.1 get the first number
2.2 while there are more numbers do
2.3 add number to total
2.4 increment the count of numbers
2.5 endwhile
2.6 divide the total by the count of numbers
DESIGN
INT 2 Computing - Software Development
Infosheet 5.6.4
Software Characteristics
At each stage of the design process the programmers must consider
certain characteristics of the program they are developing. Some
relate to the requirements of the customer who is going to use the
software. Some relate to other programmers or computing
specialists who may have to read the program.
Fitness for purpose
A program should be:
correct A program should produce the correct answers (output) for all valid data (inputs).
There is no point in producing a program that doesn't do the task required.
reliable Are there any design or coding bugs? Does the program work for any situation ?
efficient The program should run at a speed that is appropriate to the task it has to perform.
There is no point in a bank auto-teller that takes four hours per transaction.
Likewise a small business payroll program which had to run on a super-computer wi
Gigabytes of RAM would not find many customers.
Design of the User Interface
The screen presentation should be clear. The user should receive consistent instructions on how to
proceed through a program. If at different stages the program stops running until the user presses the
<space> bar then the screen instructions on how to proceed should be positioned at the same place on the
screen. The user will look to that place. Clear prompts should be given.
The software should be robust. The user should see any data entered on the screen so that it can be altered
if necessary. Suppose you wanted to type in '37' but you typed '73' instead. How do you know that you
have made a mistake during data entry if you do not see what you have typed. It should be clear to amend
what you have typed if it is incorrect.
All inputs should be validated (checked to ensure that they are appropriate) and helpful messages given to
the user. This means that any entry at the keyboard should be automatically passed into a module which
will test the validity of the input before accepting it. If your entry is being rejected as invalid - e.g. 31st
February 2000, then you should get an error message on-screen.
If invalid data is allowed into the program it may cause the program to 'hang' - this is when a data item is
entered which is not acceptable input. The program cannot proceed and you will have no option but to
come out of the program.
The program should give correct results for all acceptable inputs. The program should present the user
with prompts that make sense and are easy to follow. Menus should have suitable headings and be well
structured. Option names should be meaningful. Error messages should attract the user's attention with
possible actions indicated.
Implementation
INT 2 Computing - Software Development
Infosheet 5.6.5
Implementation is the third stage in the software development process.
This stage involves the translation of the design into a form that the
computer can understand - program code. There are many high level
programming languages available, Basic, Comal, Pascal, Visual Basic,
Algol, Primex, C ++ etc.
Choosing a Programming Language When considering the problem many questions need to be answered
regarding which programming language to use - How complex is the
problem? Which language will be the most effective for the particular
problem? What hardware is needed for the language? Can I develop a
program in modules, that is, with procedures? Does the language let
me do structured programming? Does it support sequence, repetition
and selection? and so on.
In general a good programming style will be user friendly; be
as short as possible at the top level; have clear internal
documentation; use meaningful variable names; have routines
to check that all the inputs are acceptable; and show a clear
structured layout.
Types of Languages The nature of the problem that you are trying to solve will
decide the programming language that will be used. Some
languages are special purpose and suited to solve one particular type of programming language, such as
Primex (an expert system shell) or Prolog. Others are general purpose and these are designed to produce
programs that solve a wide range of problems, such as Comal, Pascal, Hypertalk, Visual Basic etc.
There are 2 different types of languages. They can either be procedural or declarative.
• In a Procedural Language the programmer identifies all the
instructions that the program must carry out to complete the
task and set them in the correct order.
• Declarative languages allows the programmer to define the
problem being solved in terms of the facts and relationships
contained in the program.
Language.
Once you have coded the design of your program in
a High Level Language you will run the program on
a computer which has a translator program for the
code. All programs developed in High Level
Languages have to be translated into
machine code - this is the only language that
the computer understands! The translator
program may be an interpreter or compiler
depending on your choice of High Level
Implementation
INT 2 Computing - Software Development
Infosheet 5.6.5
When your coding is finished it is ready to be entered into the computer. The file that you create is
known as the source code. This code is then processed by the compiler and checked for any syntax errors
(language errors) and construction errors. The compiler then translates the source code into machine
code. This Low Level Language file of code is called the object file. When you run the program the
object file is loaded into the computer's memory and executed.
Print"What is the leng th"
Input leng th Print"What is the breadth"
Input breadth
Let area=leng th * breadth Print "The area is "; area
Source Code
Processed by
Compiler
10101101
10100001 11011101
11010000 10000000
01000101
01001010 10010111
00100010 00101001
Object Code
High Level Language Features
User Interface
The user interface is the way that your program looks to the person who is using it. This includes the
screen layouts, the prompts or instructions and the way it checks the input.
Screen Layout
How your program looks on the screen is important. If it is clearly laid out, then the user will find it easy
to use and follow. The problem statement may well include a description of the way the screen may look.
User Prompts
Programs must tell the user what keys to press to operate the program, or what type of input to give.
Input Validation
When a user can choose what they input, the program must check to see if it is the correct type, text or
number. For example, if a number is required then a number is entered. The program checks that the
number is in the correct range. This is called validating the data.
Variables
Variables can take the form of integer, real number, character or string. A variable is a name given to a
box in the computer's memory that is being used in the program. Programs are not very useful if they
cannot be used more than once. Therefore a program will be more useful if variable names as meaningful.
Reserved Words
The language in which you use to program will have reserved words. These are words that have a special
meaning in the High Level Language. These words cannot be used as variable names.