Summary Notes PDF
Summary Notes PDF
Summary Notes PDF
Software
Design and
Development
Summary Notes
Jamie Kennedy
CONTENTS
Development And Impact Of Software Solutions ............................................................................... 3
Social and ethical issues..................................................................................................................... 3
Rights And Responsibilities Of Software Developers .................................................................. 3
Software Piracy And Copyright ..................................................................................................... 4
The Software Market ..................................................................................................................... 6
Significant Social And Ethical Issues ............................................................................................. 7
Application of Software Development Approaches ........................................................................ 8
Software Development Approaches ............................................................................................ 8
Software Development Cycle...............................................................................................................15
Defining and understanding the problem .......................................................................................15
Defining the problem ....................................................................................................................15
Design Specifications ................................................................................................................... 16
Modelling...................................................................................................................................... 19
Communication Issues, Including: .............................................................................................. 20
Planning and design of software solutions ..................................................................................... 21
Standard Algorithms For Searching And Sorting ........................................................................ 21
Custom-Designed Logic Used In Software Solutions ................................................................ 24
Standard Modules (Library Routines) Used In Software Solutions .......................................... 25
Customisation of existing software solutions ............................................................................ 25
Documentation Of The Overall Software Solution .................................................................... 26
Selection Of Language To Be Used ............................................................................................. 27
Implementation of software solution ............................................................................................ 29
Interface Design In Software Solutions ...................................................................................... 29
Language Syntax Required For Software Solutions .................................................................. 29
The Role Of The CPU In The Operation Of Software ..................................................................31
Translation Methods In Software Solutions ............................................................................... 32
Program Development Techniques In Software Solutions ....................................................... 34
Documentation Of A Software Solution ..................................................................................... 38
Hardware Environment To Enable Implementation Of The Software Solution ....................... 39
Emerging Technologies ............................................................................................................... 39
Testing and evaluation of software solutions ................................................................................ 41
-1-
-2-
The Responsibility to develop and use software in a social and legally ethical manner
Authorship
Right
Protection of their product against theft and
modification without their permission
Responsibility
Acknowledge the authors and sources
used in development, particularly where
there is a development team
Reliability
Right
Protection of their product against operating
system problems and other hardware and
programs which may make their product
unusable
Responsibility
Check the product works with the
hardware and operating system they
specify.
Ensure the product has no runtime
errors when installed and run as directed
Quality
Right
Codes to ensure that others develop programs
that follow the same high standard
Responsibility
Use thorough testing procedures and
error checking code
Meet the users expectations as much as
is possible
-3-
Response to Problems
Right
Not to be harassed with trivial problems that
could have been solved by reading the
documentation
Responsibility
Provide troubleshooting manuals and
online help
Provide customer support
Quick response to major or critical
problems
Make bug fixes freely available to
users
Code of Conduct
Right
All developers follow the same ethical standard
Responsibility
Adhere to the standards set by members
of the professional association to which
they belong
Viruses
Right
Protection of the developers products by
users by the user of good current AV products
Responsibility
Ensure that they do not distribute
viruses with their products or as part of
their customer contact such as via email
-4-
-5-
NETWORK USE
Software developers have recognised the increasing popularity of networked computers.
Programs are now available for network use. They could be either a) centralised software in
which software is available as a single copy on a central server or b) distributed software
which is available on individual machines. Regardless, each machine on the network or using
the software requires a separate license.
Selling price
Customer support for the current and earlier version of the product
Bug-free software
-6-
-7-
Disadvantages
Costly
Time consuming
Requires a range of different skills
The structured (or waterfall) approach to software development follows the software
development cycle. It considers the whole problem and divides it into steps that can be
systematically followed to arrive at a solution. Because of the complexity of this approach,
many people can be involved.
A systems analyst is a person with the skills and knowledge to see the problem as a whole
and divide it into elements. They manage the project and are the first level of
communication between development and management teams. They are often given
control of the whole project.
Define the problem: Understand and define and problem. This is important so you know
what you are solving. It is much easier and cheaper to fix mistakes here than in any other
stage of development.
Planning the solution involves a further understanding of the needs of the users and a choice
of a method or methods to solve the problem. Data needs to be collected to provide the
basis for decisions. Planning involves designing algorithms, planning a UI, data and program
structures needed, scheduling the project, choosing a programming language. As well,
dataflow diagrams, IPO charts, Gantt charts, screen designs and storyboards are all likely
tools that will be used here.
Building the solution requires the full involvement of the team. A large and complex project
is usually broken down into smaller modules; this process is called stepwise refinement. By
breaking parts down into modules, you allow for greater efficiency, easier debugging, less
-8-
Disadvantages
May be difficult to implement as a fully
working solution
Prototyping involves building a working model that is then evaluated by users. The model is
then usually modified and evaluated further until it becomes the solution. The prototyping
approach usually only involves a small team of programmers and one or more users. The
prototyping approach is particularly useful in the development of interactive systems and AI
but not as much where complexity and large mathematical calculations are required.
There are two type of prototyping used. Information gathering prototypes are developed to
gain information that can be used in another program. The prototype is never intended to
become the fully working solution. They are often developed in 5GL languages and use
reusable code modules that require only linking to operate.
Evolutionary prototypes become the full working program. The prototype is the first step in
the development of the final product. This prototype becomes the short term solution and
allows the product to be demonstrated before the fully working program is produced.
Prototyping focuses largely on the UI including menus, windows and IO processes. There is a
great amount of user involvement in the development process and there is reduced
amounts of documentation compared to the structured approach however this means that
the system is harder to maintain.
-9-
Disadvantages
Many not meet exact program
requirements
Many involve copyright and intellectual
property of others
Relatively cheap
Uses considerable amount of existing reusable
code
The rapid applications software development is any method of software design that uses
tools to quickly generate a program for a user. It uses existing modules and may reuse code,
CASE tools and templates. The developer is involved directly with the user.
END USER DEVELOPMENT
Advantages
(EUD) Should meet exact user requirements
Disadvantages
Limited to simply projects and limitations
of application programs
End user development is where the user adapts existing software tools to suit their needs or
to obtain a solution to a problem. EUD is very informal and used for very small solutions. It is
usually created in a 4GL programming environment such as in a spread sheet or database.
COMBINATIONS OF ANY OF THE ABOVE
Using combinations of any of the four approaches can make it easier to develop a program.
If different parts require different approaches then using the right approach for each part
will make the process more effective.
Methods of Implementation
DIRECT CUT OVER
Description
The new
program
immediately
replaces the old
program
Diagram
Advantages
Reduced implementation
costs compared to other
methods
Disadvantages
Data transfer from old
to new has to be done
very quickly
- 10 -
PARALLEL
Description
The old and the
new work
together over a
period of time
Diagram
Advantages
Two programs can be
compared and any
problems can be fixed to
take account of
differences
Testing and fixing of
problems in new
program is simpler as old
program is still available
for use in an emergency
Disadvantages
User stress as both old
and new programs have
to be operated for
conversion time
Confusion between
programs if close
records are not kept
PHASED
Description
One or more
tasks of the new
program are
gradually
implemented
until the new
program takes
over all tasks of
the old program
Diagram
Advantages
Each task can be
individually tested as it is
implemented
Disadvantages
Difficult for users to
separate the old and
the new programs and
operate different tasks
in each system
Longer time frame
leads to high
implementation costs
- 11 -
PILOT
Description
One section of
the organisation
use the new
program and all
other sections
continue with
the old program
until a decision is
made to put the
new program
into place across
the whole
system
Diagram
Advantages
Risk is confined to one
section of an
organisation
Disadvantages
Large organisations
usually use this method
particularly multiple
sites doing the same
thing such as one bank
amount a series of
branches
Authoring languages that guide the developer through the steps of creating
programs including markup languages
POPULAR LANGUAGES
4GL and 5GL languages are increasing becoming human centred to allow non-programmers
to develop customised software. SQL, is very powerful language but is limited to the domain
- 12 -
- 13 -
- 14 -
THE PROBLEM
The programmer must have a complete understanding of the problem before developing a
solution. This will establish what needs to be done.
- 15 -
DESIGN SPECIFICATIONS
The Developers Perspective in Consideration Of:
DATA TYPES
Simple data types include:
Integers: signed whole numbers (+32, -98)
Real/Floating Point: Numbers with decimals or exponents
Character: any character on the keyboard
Boolean: only two possible values (T/F)
Structured data type:
- 16 -
ALGORITHMS
An algorithm is a series of instructions or steps that will result in the solution to a specific
problem. It can be represented in pseudocode or in flowchart form.
Binary Selection:
CASEWHERE signal is
red
: stop the vehicle
amber
: stop the vehicle
green : proceed through the intersection
OTHERWISE : proceed with caution
ENDCASE
Pre-test (guarded) loop:
D:\Documents\School\School Work\SDD\Software Summary Notes.docx
- 17 -
REPEAT
beat the egg whites
UNTIL fluffy
VARIABLES
A variable is a pointer to an area in memory that is being used by a program to store data.
The contents are not fixed and may vary.
- 18 -
MODELLING
Representing a System Using Diagrams, Including:
System modelling tools allow the system designer to communicate and record the system so
that users and other developers can understand the system. There are three attributes that
needs to be represented. These are the function, the logic and interfaces.
INPUT PROCESS OUTPUT (IPO) DIAGRAMS
An IPO chart describes the system in terms of its input data, its output data and the
processes that are performed on the inputs to transfer them into the outputs.
STORY BOARDS
Storyboards give a general overview of a program. They are used to document the screens
used in a system and the flow between them. They are suited to applications with a large
number of screens of information which link to other screens. Storyboards can also be useful
in planning the flow of information between modules.
CONTEXT DIAGRAMS
Context diagrams are used to represent entire information systems. This system is shown as
a single process along with the input and output (external entities) to the system.
DATA FLOW DIAGRAMS
Data flow diagrams represent the flow of data into and out of the system in terms of the
processes used. A data flow diagram provides more detail at a lower level than a context
diagram. Contains processes, data flows, external entities and data stores.
SYSTEMS FLOWCHARTS
System flow charts are a diagrammatic way of representing both the flow of data and logic
through an information system.
SCREEN DESIGNS
The screen is the first point of contact between a user and a program. Sample screens may
be developed to provide the customer with a clear idea of the final interface of the program.
CONSIDERATION OF USE OF A LIMITED PROTOTYPE
A prototype is a hands-on model of the computer system that concentrates on the design of
input and output screens. Prototypes are often concerned with the final design and can give
users a good indication of what the final program will look/feel like.
- 19 -
- 20 -
- 21 -
BINARY SEARCH
A binary search is used to search data that has been sorted. It divides the data into two parts
and determines which part the data lies in with the other part discarded. The remained is
split in two and the process is repeated again until the target is found or there are no more
items left to divide.
BEGIN MAINPROGRAM
Set Lower to 1
Set Upper to 12
Set Found to False
Get the Target value
REPEAT
Set middle value to integer of (Upper + Lower) / 2
IF Target = NumArray[Middle] THEN
Set Found to True
Set FoundPosition to Middle
ELSE
IF Target < NumArray[Middle] THEN
Set Upper to Middle 1
ELSE
Set Upper to Middle + 1
END IF
END IF
UNTIL Found OR Lower > Upper
IF Found THEN print found ELSE print not found END MAINPROGRAM
- 22 -
INSERTION SORT
BEGIN MAINPROGRAM
Set First to 1
Set Last to ArrayLength
Set PositionOfNext to Last
WHILE PositionOfNext >= First
Next = TheArray[PositionOfNext]
Current = PositionOfNext
WHILE (Current < Last) AND (Next > TheArray[Current + 1])
{Shuffle sorted part along}
Increment Count
TheArray[Current 1] = TheArray[Current]
ENDWHILE
TheArray[Current] = Next
Decrement PositionOfNext
ENDWHILE
END MAINPROGRAM
SELECTION SORT
- 23 -
C U S T O M -D E S I G N E D L O G I C U S E D I N S O F T W A R E S O L U T I O N S
Requirements To Generate These Include:
IDENTIFICATION OF INPUTS, PROCESSES AND OUTPUTS
Here the software developer must fully describe the data and its format. It is helpful to
develop and IPO diagram to show the relationship between inputs, processes and outputs
REPRESENTATION AS AN ALGORITHM
Writing an algorithm helps the programmer to understand the logic of the problem making it
easy to convert it straight into code
DEFINITION OF REQUIRED DATA STRUCTURES
Data structures are a set of rules for storing and manipulating data. Developing a data
dictionary enables the programmer to determine the composition of data that is to be used
in the program.
USE OF DATA STRUCTURES, INCLUDING MULTI-DIMENSIONAL ARRAYS, ARRAYS OF RECORDS,
FILES (SEQUENTIAL AND RELATIVE/RANDOM)
The choice of data structure is important as it will have a significant impact on the algorithm
used. There is often a trade-off between complexity of the algorithm and the data structure
used.
- 24 -
CUSTOMISATION
- 25 -
Customisation
Customising software involves determining the portions of the program which are relevant
to the solution that you are developing.
Cost Effectiveness
Customising software solutions often results in faster development time and lower cost but
if the original program performs insufficiently than in the long run, the newer program may
end up costing more.
Repetition
A decision
DATA FLOW DIAGRAMS
Data flow diagrams are useful for tracking the movement of data through a system. They
show graphically the processing which occurs in a system and indicate where data is stored
- 26 -
Sequential Approach
A sequential program will execute instructions in a linear fashion one after the other until
the end of the program is reached.
DEFINED BY THE PROGRAMMER
Sequential programs must follow a predetermined order of events executing the first
statement and subsequent statements until the program is complete. While the program is
executing a statement, it cannot react to anything else. Each task is carried out in the order
as specified by the programmer.
Hardware Ramifications
The language chosen depends on the hardware architecture. Certain programs may be more
suited to different hardware types. As well, the speed of the hardware the required
execution time would determine the final language used. For example, if execution time was
important, a fast language such as C would be used
- 27 -
- 28 -
- 29 -
Use of BNF, EBNF and Railroad Diagrams to Describe the Syntax of New Statements in
the Chosen Language
The use of a metalanguage such as BNF to describe the syntax of a language allows users to
interpret definitions and check the legality of constructions.
BNF:
word ::= <letter><word>|<letter>
letter ::= a|b|c|d|e||y|z
Repetition is described through recursion. ::= stands for is defined as and non-terminal
elements are enclosed with <> brackets.
EBNF:
word = <letter>{<letter>}
letter = a|b|c|d|e||y|z
Symbols similar to BNF with the addition of {} for repetition, [] encloses optional elements, ()
groups elements together.
Railroad diagrams are also known as syntax diagrams or structure diagrams. They are a
method of graphically representing the syntax by tracing a one-way path or railroad track
from left to right. Branching it only permitted in the direction of motion. Terminals are
represented by circles or rounded rectangles. Rectangles represent previously defined
elements and repetition is shown by a looping structure.
ARRAYS OF RECORDS
- 30 -
T H E R O L E O F T H E CP U I N T H E O P E R A T I O N O F S O F T W A R E
All modern computers are based on the ideas of input, output, memory and a central
controller.
Storage
Input
Control
Output
Processing
- 31 -
Result of this
action stored
in RAM
The processor
reads an
instruction
from memory
(fetch)
Action then
executed in
the ALU
Decodes the
instruction to
determine
action to be
taken
- 32 -
Lexical Analysis: uses the delimiters (symbols such as colons or CR that indicates the
end of a syntactic unit) in the source code to break the program into single
commands. Each character in the line is scanned and redundant characters removed.
Different types of elements are labelled with a token. If there is an error in the syntax
then translation cannot continue.
2. Syntactic Analysis: examines and tests the validity of the relationships between the
elements. It is an examination of whether the identified elements of a statement are
combined together in a way that is legal according to the syntax of the language.
Disadvantages
Compiling
Interpreting
- 33 -
- 34 -
Non-valid values.
- 35 -
ARITHMETIC OVERFLOW
Overflow errors involves the incorrect use of data types and data structures. Arithmetic
overflow errors occur when the computer is unable to store or process the number of digits
being manipulated. Floating point overflow may occur when performing calculations using
large numbers. The result may be either out of the range of values able to be stored or the
precision may be inaccurate. Range errors occur when a value is too large to be stored using
the number of bits allocated.
DIVISION BY ZERO
Errors may also be caused by performing an undefined arithmetic operation such as dividing
a number by 0 (which is arithmetically impossible!)
ACCESSING INAPPROPRIATE MEMORY LOCATIONS
Errors will also occur if the program attempts to access an inappropriate or privileged
memory location.
- 36 -
- 37 -
- 38 -
The OS under which the software will run: Windows XP+, OS X 10.5
EMERGING TECHNOLOGIES
Hardware
Computer hardware is constantly improving and new hardware devices are being developed
that allows users to operate in completely different ways. Processor speed, storage and
- 39 -
Software
Wirths law states that software gets slower faster than hardware gets faster. As we
continue to improve computer hardware, applications continue to be developed that require
every increasing processing speeds. Compare the CLI programs of 10-15 years ago with
todays modern 3D games and photo/video manipulation programs. Current hardware
limitations will restrict the type of software that can be developed. There has also been an
emerging trend in mobile operating systems with the iPhone and iOS revolutionising the
smart phone market as well as the emergence of Android that provides users with an
experience ever close to that of a desktop computer (multi-tasking, video conferencing,
games, email, word processing etc).
- 40 -
Levels of Testing
Test data must be sufficient to ensure the program is completely operational and free from
logic errors. To do so, a set of test data must test:
All parts of a program: Test data must test every part of a program, including the mainline of
the program and any modules used by the program.
Each path of execution: Must test every logical pathway in the algorithm. Data must be
chosen which will execute every possible alternative in a selection control structure. Should
also test the termination and correct exit of repetition control structures.
Boundary conditions: Boundary conditions are the values of variables or expressions that
determine the choice of available options to be taken. Values between boundary conditions
are called middle values.
UNIT OR MODULE
It is possible to develop computer programs that can be easily tested. In structured
programming, each module performs a simple task. Subprograms can be tested as a black
box where only the inputs and outputs are checked and the processes ignored or they can
be tested as a white box where the algorithm of the subprogram is understood and each
path of execution tested appropriately.
A driver program may be developed to test modules in a program, this substitutes for the
main program calling the subprogram and supplying the necessary values for any variables.
PROGRAM
To completely test a program, it is a minimum requirement that the test data tests each
logical pathway and program branch that can be entered. This may not always be feasible
and in such cases test data should be selected which tests scenarios of expected and
possible system use.
- 41 -
- 42 -
Benchmarking
A benchmark is a standard against which performance of a computer program can be
assessed. This standard may be a set of performance criteria that should be met by the
program. Benchmarking can be used to determine the real improvements when
upgrading a system.
Quality Assurance
Quality assurance is a set of procedures used to certify that a generated product meets
specified criteria with respect to quality and reliability. Quality control involves periodically
performing inspections, reviews and tests on the system being developed. Regression
testing is the process of re-testing a program to ensure that the changes made have not
affected a previously working part of the program.
After a programmer has tested the program, end users may perform alpha testing in a
controlled environment to see if the requirements are met. Following this, beta testing may
be performed at the clients own site under normal working conditions. Once a program
passes beta testing it is ready for acceptance by the client.
- 43 -
Communication with Those for Whom the Solution Has Been Developed, Including:
The testing process should never be carried out in isolation. The software developer often
approaches testing with the aim of demonstrating how well the program works. This is why
it is important to have other people involved in the testing process. It is essential that the
end user is provided with the opportunity to evaluate the solution that has been developed.
TEST RESULTS
Results of the testing process should be summaries for the user. This empowers the user
and provides an opportunity for them to evaluate and discuss the function of the new
system.
COMPARISON WITH THE ORIGINAL DESIGN SPECIFICATIONS
After testing, users are given an opportunity to use the program and test that it meets the
initial requirements of the problem. After a customer has approved a program, it can be
released to the market.
- 44 -
DOCUMENTATION OF CHANGES
Documentation should be created during every stage of the program development cycle.
- 45 -
DEFINING
Understanding
INTERFACE DESIGN
COMMUNICATION WITH OTHERS INVOLVED IN THE PROPOSED SYSTEM
REPRESENTING THE SYSTEM USING DIAGRAMS
SELECTION OF APPROPRIATE DATA STRUCTURES
APPLYING PROJECT MANAGEMENT TECHNIQUES
CONSIDERATION OF ALL SOCIAL AND ETHICAL ISSUES
SYSTEMS
IMPLEMENTATION
Implementation
PRODUCTION AND MAINTENANCE OF DATA DICTIONARY
INCLUSION OF STANDARD OR COMMON ROUTINES
USE OF SOFTWARE TO DOCUMENT DESIGN
TRANSLATING THE SOLUTION INTO CODE
CREATING ONLINE HELP
PROGRAM TESTING
REPORTING ON THE STATUS OF THE SYSTEM AT REGULAR INTERVALS
APPLYING PROJECT MANAGEMENT TECHNIQUES
- 46 -
Maintenance
MODIFYING THE PROJECT TO ENSURE AN IMPROVED SOLUTION
- 47 -
Maximum size of a real number and how many decimal places that can be used.
- 48 -
Subtraction is too hard for computers to perform so instead they add negatives.
Essentially they add the first number to the twos complement of the second number
MULTIPLICATION, SHIFT AND ADD
The multiplication of two binary numbers is performed using addition. Each successive bit of
the multiplier is looked at. If it is a 1, then the multiplicand is written down. If it is a 0 then all
D:\Documents\School\School Work\SDD\Software Summary Notes.docx
- 49 -
Shifting the next digit into the remainder until the divider can be subtracted again.
Repeat above
- 50 -
Truth Tables
Name
AND
Description
The output value of C
is 1 when both input
values A and B are 1
OR
NOT
NAND
NOR
The output C is 1
when both inputs A
and B are 0
XOR
The output C is 1
except when both
inputs A and B are
the same
Logic Gate
Truth Table
Input
A
B
0
0
0
1
1
0
1
1
Input
A
B
0
0
0
1
1
0
1
1
Input
A
0
1
Input
A
B
0
0
0
1
1
0
1
1
Input
A
B
0
0
0
1
1
0
1
1
Input
A
B
0
0
0
1
1
0
1
1
Output
C=A+B
0
0
0
1
Output
C=A+B
0
1
1
1
Output
C=A
1
0
Output
C=(AB)
1
1
1
0
Output
C=A+B
1
0
0
0
Output
C=A+B
0
1
1
0
- 51 -
Y
0
1
0
1
Output
Carry
0
0
0
1
Sum
0
1
1
0
The half adder is made by combining the AND and XOR gates
FULL ADDER
A full adder is a combinational circuit that can be used to add three binary digits. It consists
of three inputs and two outputs.
Input
X
0
0
0
0
1
1
1
1
Y
0
1
1
1
0
0
1
1
Z
0
0
0
1
0
1
0
1
Output
Carry
0
0
0
1
0
1
1
1
Sum
0
1
1
0
1
0
0
1
- 52 -
If the set input is 1 and the reset input is 0, gate 2 (bottom) will have an output of 1. But if
either of the NOR inputs are 1, then the output has to be 0 regardless of the other input.
- 53 -
- 54 -
DATA
Control Systems
A computer-controlled system is a combination of hardware and software designed to
instruct that computer to control a connected device.
Sensors (input): Sensors are used to capture information from the environment. They are a
form of transducer as they convert one form of energy into another.
Instructions (input as well): Instructions control the actuators and effects and allow the
controller to interpret the input from the sensors in an appropriate way.
Process Controller (processing): may be a computer or a specially designed circuit built into
an appliance to allow stand-alone applications.
Effectors and actuators (output): perform the actions of modifying the environment such as
motors, relays etc.
RESPONDING TO SENSOR INFORMATION
Sensors are used to record both analogue and digital data. Analogue signals are
continuously variable with the signals having any value within a particular range. Digital
signals have discrete levels only (0 or 1)
SPECIFYING MOTOR OPERATIONS
Printer Operation
CONTROL CHARACTERS FOR FEATURES, INCLUDING PAGE THROW, FONT CHANGE, LINE
SPACING
- 55 -