Sie sind auf Seite 1von 35

9.

1 Development and Impact of Software Solutions


9.1.1 Social and ethical issues
Rights and responsibilities of software developers
Rights refer to entitlements that are due to them e.g. how other people
use and duplicate their products. Responsibilities is the need for software
developers to be accountable of reliability, virus free, etc towards the user
Authorship
o Refers to ownership of a particular piece of work, the author
has rights in regard to reproduction and distribution of their
work
Reliability
o Purchasers have rights to expect the product to consistently
perform the required tasks efficiently and without error.
Developers should consider these factors to ensure maximum
reliability:
Hardware
Operating System
Other software
Runtime errors
Quality
o Finally quality is an important responsibility for developers. A
good quality product will meet the program requirements in
an efficient way. Quality assurance is a set of procedures
used to certify that a generated product meets specified
criteria with respect to quality and reliability
Response to Problems
o Developers have a responsibility to ensure that any problems
users encounters with their products are resolved in a timely,
accurate and efficient manner, e.g. the developer refund or
inform the customer.
Code of Conduct
o An official agreement describing ethical and moral obligations
of the developer.
Viruses
o Software that deliberately produces some undesirable or
unwanted result. Developers have a responsibility to ensure
their products do not contain viruses.
Software Piracy and Copyright
Software piracy is the criminal act of illegally copying and use of software.
Intellectual property
o Intellectual property is something that belongs to your mind
or intellect. Purchasing a software product does not give you
the ownership rights but the customer just purchases a
licence to use the software.
Plagiarism
o The process of claiming authorship of an intellectual property.
Shareware
o Distributed free on a trial basis, once tested and decided to
use it you must pay for it. Covered by copyright laws
1 | Page
SDD 2007 ABHS - JSK

Public Domain
o Does not carry and copyright restrictions i.e. can be copied,
modified
Freeware
o Can be distributed freely, as long as its not for profit.
Ownership vs. Licensing
o Ownership implies that you have the rights to do as you with
the software. Licence agreements specify the legal
framework the program can be used. The customer does not
own the software but a license to use the software. The
licence agreement is the contract between the end user and
developer.
Copyright Laws
o Are in place to safeguard the legal rights of authors of any
original works. Copyright gives the exclusive rights to licence
others.
Reverse/Backwards Engineering
o Analysing a product and its parts to understand how it works
and to recreate its original design, usually with the purpose of
creating a similar product based on this design.
Decompilation
o The opposite of compilation. Translating machine executable
code into low level source code. This allows the programmers
design to be more easily understood by a software engineer
License conditions
o Off-the-shelf software packages contains a single user
licence, enables the customer to install the software on one
computer. Site licences are allowed to be installed on a large
number of computers. Multi-user licenses are similar to site
licences but they specify the exact numbers of users that can
use the software at once.
Network Use
o Organisations can obtain network licences for use on multiple
machines. Concurrent user licence allows the application to
be installed on the server and accessed over the network, but
at any one time only a certain number of employees can run
the program. Domain licences maybe be run on any
computer part of a specific domain.
Various national perspectives to software piracy and copyright laws
o Estimated use of 40% of all software use is illegally copied
o Piracy cost of US$11Billion internationally in software industry
o Business Software Association of Australia (BSAA) estimates
that 32% of Aust software is illegally copied. Equates to
A$290 million lost to developers per year.
The relationship between copyright laws and software license
agreements
o The copyright act does not require a formal application in
order to obtain copyright protection.
o A software licence agreement is a document used to create a
binding contract between the purchaser and software
developer.

2 | Page
SDD 2007 ABHS - JSK

The software market


Four Ps of marketing:
Product - what do you sell?
Place - where do you sell it?
Promotions - how do you spread the word?
Price - what do you sell it for?
Maintaining Market Position
o SWOT analysis - to ensure the product remains viable.
o Determining Strengths Weaknesses Opportunities Threats of
your product.
o Techniques include quality, reliability, support/maintenance,
upgrades and growth strategies
The Effect on the Marketplace
o As developers bring out new products into the marketplace
other developers would need to improve their products to
retain market share this leads to developers continually
innovate and develop better software. Side effects to
increasing complexity in software is the need for an increase
in computer power to run the application, i.e. computer
games
Significant social and ethical issues
Social and ethical issues need to be considered by those in the
business of creating and distributing software.
national and international legal action resulting from software
development
o Microsoft computer vs Apple computer
o Apple released the Mac os with their PCs; this was the first
system available with GUI. Microsoft soon released Windows
which felt like Apples Mac os. Apple claimed Microsoft stole
their idea, after long court battles a settlement was reached
allowing both companies to continue distributing their
operation systems.
Public issues including:
The year 200 problem
o In the 60s and 70s there was a requirement to use the
minimum amount of storage space therefore developers
stored the year in two digits. When a new millennium rolled
over year 2000 was thought to be mistaken at 1900. Millions
of dollars was spent to ensure the computers avoided the Y2K
problem, as it turned out very few problems occurred. A
positive result of this was that many organisations updated
their obsolete equipment.
Computer viruses
o New virus appears somewhere in the world on a daily basis.
E.g. I love You virus, 2000, the emails attached file contained
a virus which attached itself to system files and changes the
names.
Reliance on software
3 | Page
SDD 2007 ABHS - JSK

The impact of computers and software has been significant in


our everyday lives. Household appliances, all types of
motorised transport, government authorities all rely and
operate using software. The software development industry
has a huge responsibility to ensure all these systems are
reliable and perform well.

9.1.2 Application of software development approaches


Software development approaches
A software development approach is a model of the general
technique used to produce a software product.
The structured approach
o Consists of 5 stages, which are completed step-by-step.
Defining and understanding
Planning and Design
Implementation
Testing and evaluation
Maintenance
o This approach often takes long periods of time, this is due to
the need to complete each stage before moving on. For large
scale projects or large budget this approach is appropriate to
ensure every aspect of the program is accurate.
Prototyping
o Prototypes are interactive models of the final system.
o Encourages end user participation, the user gives feedback
on the model and it improves communications between
programmers and the end user.
o Focuses on the input and output requirements, does not
concentrate how the processing is done, but rather the user
interface.
o All prototypes focus on typical screens which are printouts so
the user can give feedback to developers.
o Prototyping have short development time, which can at times
lead to poor analysis in the design stages and therefore a
poor solution.
Rapid Application development (RAD)
o A sequential process often using CASE tools which allow rapid
development of software solutions. RAD allows programmers
to reuse pre-developed code and components of existing
programs to speed up developing time.
o No formal stages but and reduced quality of final product
because of the need to be implemented quickly.
o Suited to small scale projects with small budgets.
End user Development
o End user is the person who is the operator of the software to
be developed.
o The viability of the approach depends on the skills of the
developer.
o Usually involves modifying a standard off the shelf software
package.

4 | Page
SDD 2007 ABHS - JSK

Characteristics: lack of stages, small scale projects and small


budgets.
o Used over long periods of time since users developed the
program to meet their own needs and they understand it how
it operates.
o Over time it maybe become inefficient and difficult to
maintain, lack of formal documentation, user may have
difficulty implementing new features.
Combinations of any of the above
o Often development of a software product will be best
accomplished with a combination of approaches. E.g.
particular modules developed using a structured approach
and others using prototyping.
o

Methods of Implementation
Implementation involves installing a new system, which
would involve a conversion from an old system to a new
system.
o Direct Cut Over
Old system being completely dropped and new system
being completely at the same time.
Advantage: data does not need to be processed twice
Disadvantage: training of staff for new system is
difficult.
o Parallel
Implementing and operating the system at the same
time as the old system.
Advantage: faulty new system has minimal impact.
Disadvantage: two sets of data needs to be maintained
o Phased
Gradual and modular replacement of the old system
with the new system.
Advantage: suited to large projects where sub-systems
operate independently from each other
Disadvantage: gradual phasing may confuse users,
some on old system some on new system, makes
communication more difficult.
o Pilot
Involves a small-scale implementation of new system
Installed for a small number of users these users learn,
use and evaluates the new system. Once deemed
satisfactory the system is installed and used by all.
Advantage: minimal disruption if theres problems with
the system
Current Trends is Software Development
o Outsourcing
Software development companies (small or large
businesses) contract a particular software specialist to
develop software for them (this is called outsourcing)
for some of the following reasons
They do not have the resources internally
To reduce and control costs
5 | Page

SDD 2007 ABHS - JSK

Higher quality results from specialists


To free internal resources for other purposes
Access to new technologies
Faster development time
Specialists respond better to change
Outscoring involves contracting software development
to a third party
o Popular Approaches
Past 30 years from process oriented to data oriented
and now object oriented.
o Popular Languages
Despite growing use of 4th gen languages, majority is
still written in 3rd gen.
Modern languages like Visual BASIC, C++ increase
productivity
o Employment Trends
The greatest number of jobs advertised is for
programmers with knowledge of object oriented
languages e.g. Java, C++.
o Networked Software
To reduce the cost, businesses can share applications
software among users in networks of computers.
Sharing the application software can be conducted in
the following ways:
Mainframe computers use a time-sharing system
where each terminal is allocated slices of time to
execute programs on the mainframes
processors
PCs are link together to enable software
applications, data files and peripherals to be
shared.
A common database is stored on a server, client
can access the database from their machine
o Customised off-the-shelf Packages (COTS)
Refers to software that can be purchased as a standard
package from a software retailer
Users able to customise the software to perform the
required function many comes with templates that can
be easily adapted.
Use of CASE tools and their applications in large systems
development
Computer aided software engineering tools are software system
which enable software developers to automate many aspects of the
process of software development.
Software Versioning
Versioning allows for software development teams to track changes
as they are made to a system. Old versions can be restored if
necessary.
Data Dictionary
Data dictionary is used to identify and fully define entities, entity
characteristics and entity relationships.
Test Data
6 | Page

SDD 2007 ABHS - JSK

When analysing and planning of the program CASE tools can be


used to test the software. Test data can be generated to analyse
various aspects of the code. E.g. DataFactory
Production of Documentation
Tools are available to help create documentation of the
programming process. CASE tools allow for the rapid amendment of
diagrams and other structured information on the program.

9.2 Software Development Cycle


9.2.1 Defining and understanding the problem
Defining the Problem
Defining the problem clearly is essential to ensure the final solution
meets the needs of the user. If a program runs beautifully but does not
solve the specified program it is a failure.
Identifying the Problem
o Needs
Is an instance in which some necessity or want exists.
The developers must meet the needs of the solution.
o Objectives
Are what your are aiming for. Objectives are
statements that if achieved, will allow needs to be met.
Objectives requires to be readily tested, this means
they need to be quite scientific or mathematical
statements.
o Boundaries
Is the limits of the system
Anything outside the system is the environment.
The system interacts with the environment via an
interface.
Determining the feasibility of the solution
o Is it worth solving?
Preliminary investigation into the problem to see if the
problem can be solved. Sometimes patches would be
sufficient.
o Constraints
A factor that limits the scope of the development of a
solution. The solution must comply with a constraint.
o Budgetary
Determines whether the solution to the problem is affordable.
o Operational
Whether the solution will be usable by the target customers.
o Technical
What hardware and software currently being used.
o Scheduling
The time frame in which a solution must be developed.
o Possible Alternatives
Are their alternatives to the problem? Of the solution is not
feasible the software developer might explore alternatives
that are on a smaller scale or discard the project.
Design specifications
7 | Page
SDD 2007 ABHS - JSK

The design specifications form the basis for planning and designing
the solution. The aim of the design specifications is to accurately interpret
the needs, objectives and boundaries identified into a set of workable and
realistic specs form the a final solution can be created.
The Developers perspective in consideration of
o Data types
Data type
Integer

Description
Signed whole numbers

Example
-97, 0, 32767

Real

Positive and negative


numbers with decimal
points and/or exponents
Any of the characters that
appear on the keyboard
Only two possible values

-3.54, 234.2,
3.599E+11

Character
Boolean

Size
Usually 16 bits
32,768 to
+32,767
Usually 32 bits

A, 2, &, @

Usually 8 bits

True and False

1 bit

Algorithms
a series of procedural steps that will result in the
solution to a specific problem within a finite time.
Programmers use algorithms to determine the solution.
Once the algorithm is written, it is very easy to write
the code of the program from that.
Variables
is a pointer to an area in memory that is used by a
program to store data.
Variables are a feature of third generation languages,
and in particular of procedural languages. A constant
may also be used to store data, but once assigned a
value, it cannot be changed

These specifications will create a standard framework under


which the team of developers must work. The methods and
depth or algorithm description, how data types and variables
are to be allocated and any naming conventions should be
specified.
The users perspective
o The user is focused on the task to be competed the. From the
user perspective the software will assist them in solving a
task. These include screen designs, ergonomic issues and
familiarity with existing applications.
Modelling
System modelling tools allow the system design to communicate
and record the system so that users and other developers can understand
the system.
Input Process Output (IPO) diagrams
o Describes the system in terms of its input data and the
processes undertaken for the inputs to be transformed into
output.
Story Boards
o Used to describe the screens used in a project together with
how each screen interacts with other screens.
o Linear storyboard:
o

Screen
1
SDD 2007 ABHS - JSK

Screen
2

Screen
3

Screen
4
8 | Page

Hierarchical Storyboard:

Resource
Produc
ts
Non-Linear/ Networked/ Composite storyboard:
1

Home Page

About

2
5

Data Flow Diagrams (DFDs)


3
o Represents the flow of data into and out of the system in
terms of the processes used. Simply, data flow diagrams
show the transformation of data from inputs to outputs.
o A lower level data flow diagram is known as a Context
diagram, which consists of a single process with inputs and
outputs (external entities). Data store are not shown in
context diagrams.
Symbols used:
Data
External
Pro
Data
Flow
entity
ces
Store
s
System Flowcharts
o Represents the logic and flow of data through a system
o Describes the interactions between input, process, output
and storage
o Shows the nature of each component.
Symbols:
Input
Direct
outpu
Process
Decis
access
t
ion
storage
Onli
device
Paper
Magne
ne
Multi
Docume
tic
Displ
Paper
nt
Tape
ay
Document
Manual
Online
Operati
Telecommunications
Input
on
Link
Screen Designs
o The screen is the first point of contact between a user and a
program.
Considerations of a limited prototype
o A limited prototype is an interactive model of the final
solution.
o Prototypes are concerned with the appearance of the
program and demonstrating its functions, and is not
concerned with data processing or error handling

Communication issues
The need to empower the user
It is important to include the user in the development process
Consultation
Description/example
9 | Page
SDD 2007 ABHS - JSK

technique
Interviews
Questionnaires
, survey
Focus/user
group
meetings
Observation
Documentatio
n

Interviews allow the user to explain how the current


system is working and their needs for a new system
Questionnaires and surveys can be used to canvas the
opinions of a large number of users. . Questions may be
either closed (choice of several alternative responses) or
open (allow for free written response)
Opportunity for users to discuss collabratibely what they
expect the program to achieve
The software developer observes the user to determine
the procedures they follow
Look at input and output forms required by the users.
Analyse procedural manuals and information about the
current system that has been documented.

The need to acknowledge the users perspective


o The user requires the software is good quality and performs
specified tasks. It is the programs responsibility to determine
how the tasks are performed.
Enabling and accepting feedback
o The developer and users must communicate frequently to
ensure the system meets the needs of the user. Using Memos
or regular meetings

9.2.2 Planning and design of software solutions


Standard algorithms for searching and sorting
finding maximum and minimum values in arrays
processing strings (extracting, inserting, deleting)
file processing, including sentinel value
linear search
binary search
bubble sort
insertion sort
selection sort
SEE HAND WRITTEN NOTES FOR SEARCHING AND SORTING
Custom-designed logic used in software solutions
Most programming languages will require the programmer to
specify almost every detail of how to solve the problem. These include:
identification of inputs, processes and outputs
o The developer must fully describe the data and its format,
the method of input and the source of data will be
determined. The output will also be fully described and
documented. An IPO diagram would show the relationship
between inputs, processes and the outputs.
Representation as an algorithm
o An algorithm clearly describes the steps involved in solving a
problem writing an algorithm helps the programmer
10 | P a g e
SDD 2007 ABHS - JSK

understand the logic of a problem. Once the algorithm is


developed it is a straight forward task to convert into working
code.
Definition of required data structures
o Data structures are set of rules for storing and manipulating
data.
o Developing a data dictionary for a problem enables the
programmer to determine the composition of data that is to
be used.
Use of data structures, including multi-dimensional arrays, arrays of
records, files (sequential and relative/random)
o The better the data structure the easier the algorithm would
be.
o Multi-dimensional arrays
Useful for storing data values which are logically stored
in a grid or a table. The data types are constant.
Written form name(index1, index2)
o Array of records
Useful for storing data a variety of different information
for a number of items.
Can be treated as single data types, fields contained
within a record may be accessed independently.
Written in the form of name(1).item
o Sequential and relative/random files
Sequential files are when data are stored in a
continuous stream.
The access the data in the middle of a
sequential file, it requires reading all the
preceding data.
The structure is not stored as part of the file, it is
necessary to structure the data yourself when
using.
Sentinel values are used to indicate logical
breaks in the data.
Random or relative files can be accessed in any order.
Relative refers to the fact that there is a
structure to these files.
Each record within the files possesses
characteristics common to all records in the file.
Individual items can be accessed directly
without reading of any preceding data.
Random access files are used to store records,
each record of a particular data type must be
precisely the same length. Strings with differing
lengths are padded out using black characters.
Use of Random Numbers
o Random numbers are often used in programs to allow access
to unpredictable data.
o Most languages provide a Random Number Generator.
Thorough testing
o Testing must be carried out throughout the development
process. Solutions that are well designed and implemented
11 | P a g e

SDD 2007 ABHS - JSK

doesnt require as much time as a solution that has been


hastily prepared solution.
Careful design of a solution and the use of debugging tools in
the implementation and coding of the program will make the
program easy to test.

Standard modules (library routines) used in software solutions


Structured programming results in programs that are modular. Most
programming languages have basic functions or library routines that can
be accessed in a program. Requirements for generating or subsequent use
include:
Identification of Appropriate Modules
o Programmers would only use modules or libraries that are
necessary to perform tasks required; it would be a waste of
resources to include redundant libraries that are not accessed
by the programmer.
o The standard packages (library routines) contain precompiled commands that allow a range of operations to be
carried out.
Consideration of local and global variables
o Subprograms that include a declaration of variables are
called local variables because the variable can be only used
in its local environment i.e. the subprogram. If the local
variable is referred to another part of the program the
compiler would not recognise the variable.
o Variables defined in the main programs may be global
variables which mean that they can be accessed throughout
the whole program. Some program e.g. BASIC requires an
explicit section where global are defined, if not variables are
not global.
o Scope of a variable is the portion of the program in which the
variable can be used.
Appropriate use of parameters (arguments)
o Subprograms often require an argument or parameter to be
included with the subprograms call. Parameters are data
items which can be passed from one part of the program to
the subprogram where the values can be used.
o The values passed to the subprogram are given new identifier
names.
Appropriate testing using drivers
o A driver is a temporary section of code that is created to test
an individual module by calling it up and executing it. The
driver substitutes the main program in calling the
subprogram and supplying the necessary values for any
variables.
o Difference between a stub and a driver is that a stub is a
false module of code that allows testing of a calling program
and a driver starts module to be allowed to be tested.
Thorough documentation
o Any modules of code should be documented. This
documentation should specify inputs, processing, and outputs
that should be part of the program. This allows the module to
be used and quickly understood.
12 | P a g e
SDD 2007 ABHS - JSK

Customisation of existing software solutions


Identification of relevant products
o Many programming languages that are purchased come with
sample programs which can be customised to be used for
their own program.
Customisation
o Determining the portions of the program which are relevant
to your solution and making modifications to perform
required tasks.
Cost effectiveness
o Customisation results in fast development time and therefore
lowers costs, with the trade of if the original program
performs tasks inefficiently the new program will too.
Documentation of the overall software solution
Tools for representing a complex software solution include:
Algorithm descriptions
o Provides a detailed description of the logic that is carried out
by the program.
o But they do not indicate the data that is manipulated by the
program.
System flowcharts (refer to page 8)
Data flow diagrams (refer to page 8)
Structure Diagrams
o Models the hierarchy of processes within a system together
with the sequence in which these processes take place.
Symbols:
Task or

Control
Paramete
Datar dictionary
o

Paramete
r

Decision

Repetitio
n

proces
s

Call
line
Describes the nature and type of data used in a program (on
a table).

Selection of language to be used


Event-driven software.
An event is an action that has been carried out by the
user. Events include mouse clicks, selecting menu
options and keyboard commands.
o Driven by the user
Empowers the user to determine the execution order.
Events may occur in any order
Typically involves a GUI.
o Program logic
During execution the computers os continually pools
the hardware to generate a stream of events.
Polling is the process if checking the status of each of
the devices connected to the system.
An even driven program will act upon the even
detected during this polling process.
13 | P a g e
SDD 2007 ABHS - JSK

Event parsing is the process of executing modules of a


program depending upon the events that have been
detected.
Sequential approach
o Defined by the programmer
Sequential programs must follow a predetermined
order of events.
When a program is waiting for an input it cannot react
to any other input.
Relevant language features
o The programmer must carefully consider the nature of the
problem before choosing a programming language.
o Each programming languages has its weaknesses and
specific attributes.
o It is the responsibility of the programmer to analyse the
problem and choose the computer language which is most
appropriate to the implementation of a solution.
Hardware ramifications
o The language selected will be influenced by the type of
hardware its going to be run on.
o Commonly computers are based on the von Neumann
hardware architecture, using the fetch-execute cycle
o Hardware specifications e.g., processor speeds and memory
available will also affect the program execution.
Graphical User Interface (GUI)
o Early computers used text and keyboard based command line
interface. As processor speeds and memory capabilities
increased GUI has developed.
o GUI are made up of Windows, Icons, Menus and Pointers
(WIMP interfaces)
o GUIs display information on the monitor the way it would be
printed called WYISWYG What You See Is What You Get

9.2.3 Implementation of software solution


Interface design in software solutions
The design of individual screens , including:
o Identification of data required
Individual screens must display data, a good design
will enhance the ability of the user to view or enter
data.
Layout techniques include:
Appropriate use of graphics
Position of text on screen
Alignment and justification
Appropriate use of upper and lower case
Colour of text and background
o Current popular approaches
Early computer programs relied heavily on command
line interfaces.
Graphic User Interfaces (GUIs) that use the following
elements are now usually used:
14 | P a g e
SDD 2007 ABHS - JSK

Menus
Window
Icon
Scroll bar
Radio Button
Dialogue boxes
Design of help screens
Help screens should be simple, non-threatening and
guide the user in a positive manner.
Context sensitive, procedural and conceptual help as
well as tours and tutorials can be used.
Audience identification
Language should be clear and unambiguous.
The program must use language appropriate for its
target group.
Consistency in approach
It is important to keep fonts, colours and placement
consistent throughout the program so that it is easier
to use to for the user.

Language syntax required for software solutions


use of BNF, EBNF and railroad diagrams to describe the syntax of
new statements in the chosen language
Meaning
Back-Naur form
Extended BackNaur
form
Is defined as
::=
=
Or indicates a
choice between
alternates
Non-terminal
symbol a symbol
defined elsewhere
Repetition (0 or
more times)

Optional (no
repetition)
Terminal symbol
something just there
with no <> around
it
Grouping groups
elements together

<>

<>

Recursion

{}

(i.e. word::=<letter><letter>|
<word>)
N/A

[]

Use as written

Use as written

N/A

()

15 | P a g e
SDD 2007 ABHS - JSK

commands incorporating the definition and use of:


o multi-dimensional arrays
o arrays of records
o files (sequential and relative/random)
o random number generators
(Text book please :D)
The Role of the CPU in the Operation of Software
Machine code and CPU operation
o Instruction format
Before a computer can use a program, it must be
converted into binary digits.
The instruction is the binary command given to the
CPU by a computer program.
o Use of registers and accumulators
Registers are temporary storage locations that can
hold one instruction.
The accumulator is one of these registers.
o Use of program counter and fetch-execute cycle
The program counter is a register that stores the
address of the next executable instruction. It is
automatically incremented when an instruction is
executed.
The fetch-execute cycle involves the following steps:
The processor reads an instruction from memory
(fetch).
The control unit decodes the instruction to
determine the action to be taken. The operation
code is also decoded according to the instruction
set in the computer's ROM. (decode)
The action is then carried out by the ALU
(execute).
The results of the action are stored in memory.
(store)
o Addresses of called routines
Commands to be executed are stored with the
operation code in the computer's RAM.
Each memory address is accessed sequentially unless
the instruction is to jump to another part of the
program.
o Linking, including the use of DLLs
Linking allows a machine code program to combine
with other machine code programs.
Dynamic link libraries (DLLs) are collections of
programs in machine code which can be accessed by
other programs to perform specific tasks.
To be executed, machine code must be loaded into the
computers main memory (RAM). With the use of a
linker, only the modules being used at any one time

16 | P a g e
SDD 2007 ABHS - JSK

must be loaded into the RAM. This saves on resources


required to execute a program
DLL files are often called device driven because they
control a specific device connected to the computers
CPU

Translation Methods in Software Solutions


Different methods include:
o Compilation
Taking the source code and converting it into
executable code that can be executed independently
and without the need for a translator.
o Incremental Compilation
Compiling fragments of source code at a time. Only the
code that has changed since the last compile needs recompilation.
o Interpretation
Each line of the source code is translated into machine
code and executed immediately. An interpreter
(translator) must be present on the computer the code
is to be executed on.
o The translation process
Source code is translated into machine executable
code.
High level languages cannot be directly understood by
computers so they must be converted into a form that
can be understood by the processor.
Advantages and disadvantages of each method
o Compilation - translating the whole program at once and
storing it

Advantages
Is executed very quickly
Security of code (harder to
change binary the high level
code)
Allows optimisation of object
code
Permits sharing of resources
and reduces redundancy by
using run-time libraries

Disadvantages
Modification of the problem
means that it has to be
compiled completely
Compiling stops when a
syntax error is encountered
Object code duplicates space

Incremental compilation translates common routines, and


interprets the rest
Advantages
Programs will run faster than
those of an interpreter
Both runtime and syntax
errors can be fixed as they

Disadvantages
Programs are not executed as
quickly as they are for
compiled programs
Code is still accessible to
17 | P a g e

SDD 2007 ABHS - JSK

are reached
o

users and others.

The interpretaton process translate each line of code


when it is executed

Advantages
Simple, rapid production of
source code
Immediate detection of
syntax errors
No stored object code, so no
duplication of resources
Run-time errors are detected
and corrected quickly
Interactive programming

Disadvantages
Slow execution speed
Poor efficiency the same
lines will be reinterpreted
each pass of a repetition
No reusable object code is
produced

The translation process


o Delimiter is a symbol sch as a colon or carriage return that
indicated the end of a syntactical unit.
o Lexeme individual language elements at the lowest level
o Lexical analysis (scanning) the source code is read one
character at a time, so to recognise syntactic elements and
to get rid off spaces and comments.
The different type of elements are assigned a token or
numeric code. If a set of characters do not match the
syntax of the language an error will be generated
o Syntactic analysis (parsing) 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.
Having then as a variable will be syntactically
incorrect as then is a reserved words
o Type checking tests the validity and integrity of data types
(i.e. makes sure strings arent added to integers) appropriate
storage locations are also allocated.
o Production of source code made into code
Reserved words are replaced by calls to the function
library and everything is linked

Program Development Techniques in Software Solutions


Structured approach to complex solution, including:
o One logical task per subroutine
Coding a subroutine that performs only one task, but
performs it efficiently.
Allows it to be low maintenance and reusable.
o Stubs
Dummy procedures/modules that supply either/both:
Some data to allow the calling module to
continue working.
18 | P a g e
SDD 2007 ABHS - JSK


o
o

An output statement indicating the stub


modules has been called correctly.

Flags
Boolean variable that indicates that an event has
occurred.
Isolation of errors
Errors can often be located by:
Using debugging output statements.
Commenting out sections of code to determine
which part is causing the error.
Setting break points to exit the program if a
certain event occurs.
Debugging output statements
Debugging output statements, such as variable traces,
are used to print the value of a variable at a certain
point of the code to test if the algorithm is operating
correctly.
Elegance of solution
Being able to solve a problem with the minimum
amount of code. It often requires lateral thinking so
that unnecessary steps can be skipped.
Writing for subsequent maintenance
Taking the source code and converting it into
executable code that can be executed independently
and without the need for a translator.

The process of detecting and correcting errors, including:


o Syntax errors
Easily corrected errors in the coding of the solution.
Occur when you do not follow the syntax rules of a
language correctly.
o Logic errors
When a program performs an incorrect action or gives
out the wrong output due to flawed logic.
Must be corrected by testing and debugging through
use of good test data.
o Peer checking
When programmers not involved with the original
design are asked to check the logic of an algorithm or
program.
o Desk checking
Stepping through the code of a program on paper with
pre-determined test data to ensure that the desirable
output is achieved.
o Use of expected output
Inputting the expected variable value manually to test
whether the program manipulates that data correctly.
o Runtime errors, including:
Occur as the object code is being executed. Usually
due to an error in the program's logic.
Arithmetic overflow

19 | P a g e
SDD 2007 ABHS - JSK

Occurs when a result cannot be stored in the


nominated memory location due to incorrect use
of data types and structures.
Division by zero
Occurs when an undefined arithmetic operation
is carried out usually when the program
attempts to divide a number by zero.
Accessing inappropriate memory locations
Occurs if inappropriate memory locations are
accessed.
Use of software debugging tools including:
o Use of breakpoints
Stopping the execution of code at certain points so
that the value of variables at that point can be
observed.
o Resetting variable contents
The values of a variable can be changed as the
program is executed to determine if the processes
being carried out are accurate.
o Program traces
As the program is run, the actual line of code being
executed is displayed on screen. Variable values can
also be viewed.
o Single line stepping
Stepping through the code one line at a time to see
how the program operates and manipulates variables.

Documentation of a Software Solution


Forms of documentation, including:
o Process diary
Design or specification documentation used to
describe the development process.
Includes: Screen layout designs, Data and processing
specifications, Descriptions of input and output
Also known as a logbook.
o User documentation
Documentation that helps people work/use the
products.
Often include screenshots, step-by-step instructions,
contents, index, etc.
Examples of user documentation include: User manual,
Installation guide, Tutorials, Online help
o Self-documentation of the code
Commenting of the code makes it easier to understand
the processes involved for both the original developer
and any other developers who wish to maintain the
code in the future.
o Technical documentation, including:
Needed by programmers and developers to allow the
program to be modified.
Source code

20 | P a g e
SDD 2007 ABHS - JSK

The actual programming code that makes up a


program.
Should be well commented to explain any
obscure areas of the code.
Code should be indented to make it easier to
read.
Meaningful variable names should be used.
Algorithms
Used to provide a clear description of the steps
carried out to solve a problem.
Simplifies any program code so it can be
understood.
Common methods of algorithm description
include: Pseudocode, Flowcharts
Data dictionary
Used to describe the nature and form of any
input data.
Systems documentation
Provides a description of the operating system,
including the use of subprograms and any
special features of the code.
o Documentation for subsequent maintenance of the source
Technical documentation should assist programmers in
modifying the code in the future.
Changes made during maintenance should be
documented for future reference.
Use of application software to assist in the documentation process
o Use of CASE tools
CASE tools that help generate user and technical
documentation exist to make the job of the
programmer easier.

Hardware Environment to Enable Implementation of the Software


Solutions
Hardware requirements
o Minimum configuration
Commercial software often specifies the minimum
hardware configuration needed to run.
Includes aspects such as:
CPU type/speed
Amount of hard drive storage
Amount of RAM
Operating system version
o Possible additional hardware
If a program is too complex for a system, additional
hardware may need to be purchased or current
hardware upgraded.
o Appropriate drivers or extensions
Drivers provide a means of accessing input or output
hardware devices.

21 | P a g e
SDD 2007 ABHS - JSK

Extensions enable a program to interact with other


programs.

Emerging Technologies
Hardware
o Quantum Computers Will vastly increase the speed at which
computers can operate.
o Nanotechnology Will allow for the sizes of computers to
decrease so they can be embedded in more places.
o Holographic Storage Expand storage devices to a three
dimensional level to increase the amount of data that can be
stored greatly.
Software
o Java Allows for the development of cross-platform
applications. Becoming increasingly popular as a
programming language.
o Dylan A programming language which extends upon other
object oriented languages by introducing new data structures
such as dynamic inheritance and parametric polymorphism.
Their effect on:
o Human environment
As new technologies emerge, many people strive to
incorporate them into their lives.
Most technological items are designed to assist
humans in particular tasks.
There can be both positive and negative effects due to
technological advance, these should be determined
before a technology is accepted by society.
o Development process
Software is becoming increasingly cross-platform as
the line between PCs, PDAs, mobile phones, etc.
becomes blurred.
CASE tools as well as Visual IDEs are assisting
programmers to develop applications more quickly and
more easily.
9.2.4 Testing and evaluation of software solutions
Testing the software solution
Comparison of the solution with the original design specifications
o Validation: comparison with the solution with the design
specification
o

Design specifications should be written for a software solution


in a form that provides a set of performance criteria, as they
help both the developer and client to evaluate to
performance of the end project.
Guide lines for project specifications include:
Ensure that the specifications are written in terms of
measurable outcomes
22 | P a g e

SDD 2007 ABHS - JSK

Clarify any vague terms (i.e. most, some,


sometimes and usually)
Avoid the use of vague terms such as processed,
eliminated and handled as they can be interpreted
in more than one way
Look and clarify ambiguous statements
Incomplete lists of items should be avoided
Question the use of persuasive terms such as
certainly, clearly and obviously
Calculations should be accompanied by examples
Pictures and diagrams should be used to clarify
structure, rather than relying on description.
If guide lines like these are followed, validation is made
easier.
Validation involves the use of real data so that its
performance can be measured under real situation
conditions.

o
o

Generating relevant test data for complex Solutions


o

o
o
o
o
o

Many operational factors may be outside the programmers


control, or unforseen such as
Inappropriate inputs the OS picks intercepts key
combinations or the users enters in inappropriate
values.
Hardware variations because of different
manufactures, modified chips or other reason that
cause the machine to operate slightly different
Changes or differences in operating systems compatibility
Changing technologies - newer systems are often
backward compatible in most respects, however minor
difference can cause errors on execution.
All these errors can limit the reliability of testing, as the
programmer can only test with the bounds that are set during
the analysis stage of development
Increasing size of applications means that it is harder to test
everything. Modularisation as each module can be tested
individually
In small modules it may be possible to generate data that
checks every path in the application
However, as modules become more complex, or sub-modules
are joined this is not a viable option.
White box testing examines all the data paths in a module.
The ultimate aim is to test how a module achieves its results.
The most common testing procedures are:
Statement covering testing involves the execution of
every statement in the module. i.e. each statement in
the code would be executed at least once.
Decision-condition coverage testing involves full
statement coverage as in the previous method, but
23 | P a g e

SDD 2007 ABHS - JSK

also tests the execution of each decision in control


structures with its true and false at least once.
Multiple-decision-condition coverage testing extends
the process of decision-condition coverage testing to
all possible combinations within multiple conditions.
(i.e. tests every possible combination of conditions)
Exhaustive condition decision-condition testing
involves creating sets of test data that examine what
happens with al possible combinations of true and
dales of each condition.
Black box testing only the inputs and outputs are tested.
The process that achieves these results is ignored. The most
common testing procedures are:
Boundary analysis involves choosing data elements
that are representative of either side of boundary
where the effects of processing are different.
Equivalence partitioning involves breaking up the input
data into groups that have the same properties. i.e.
testing data that is legal, illegal and illegal for a
different reason.

Levels of testing
o Units or module
o Program
o System
o Unit/module testing treats each module as a stand alone
application that does need any of the other component of the
program to function
o Program - testing programs are normally done in two ways:
Top-down approach the program driver is first tested
with stubs, and then the modules are gradually added
and tested. Modules keep on being gradually added
and tested until the whole program woks
Bottom-up approach lower level modules are first
tested and one by one more modules are added on
with the driver module being the last one.
o When all the modules have been put together users become
actively involved in the testing. This is known as function
testing
o Acceptance testing is used for custom built software and is
carried out to determine if the software is capable of being
used in a fully functional system. Other aims include how the
human/computer interface works with users and to detect
any errors that may have been missed during the previous
testing stages. It can also serve to train some of the users.
o Alpha testing is used for commercial software titles.
Developers watch a selection of users to see where the errors
are and to properly document them. These errors later
become part of the modification
o Beta testing is nearly the same as alpha testing but the
testers are given the task of trying to break the program and
have to document where it went wrong
24 | P a g e
SDD 2007 ABHS - JSK

System system testing is the combination of a number of


different tests sequences that have been designed to fully
extend the system
Performance testing used to test the quality of the
performance of the software. i.e. the amount of
information it can handle and how well it recovers from
errors
Recovery testing forcing the system to fail and
measure the ability of the computer recovering itself or
a human doing it
Security testing attempting to breach the security of
the system
Stress testing attempting to create situations in
which the system will crash. i.e. rapid reading and
writing to disk

The use of live test data to test the complete solution:


Live data testing allows the tested to see how the system will work in real
situations.
Larger test file sizes programs need to be tested with
varying file sizes and types. The program may work with
small files, but may not work with larger ones or vice versa.
Making test data to test large files is often more time
consuming then it is worth.
o Mix of transaction types most systems will not work if
information is entered in the wrong spot. Live data can
provide such as mix, as the data items are a sample of real
transactions
o Response times live data items are representative of real
processing situations and will, therefore, be subject to the
same processing as is expected during program used. The
software development team can accurately gauge the
expected response time from these data items
o Volume data the sheer volume of data that has to be
processed can also lead to problems. Using live data shows
how much data is expected to be processed
o Interfaces between modules live data provides a good test
of the interfaces between the various modules of the
program.
o Comparison with program test data a comparison between
test data elements and live data can highlight any
shortcomings that the test data or the live data set may have
had. The outputs of live data can be compared with those of
the developer-creator tests data items to gauge the
effectiveness of the test data cases
Benchmarking
o Benchmarking is used to test a program in relation to
expected outcomes and in comparison to similar products.
o A benchmark is a standard against which performance of a
computer program can be assessed.
Quality assurance
o

25 | P a g e
SDD 2007 ABHS - JSK

o
o

One of the goals of a software development team is to


produce a product that is of the highest possible quality.
Attributes that contribute to software quality include:
Clarity
Correctness
Documentatio
n
Economic
Efficient
Flexible
Integrity
Interoperabilit
y (work with
pre-existing
software)
Maintainability
Modifiability
Modularity
Portability
Readability
Reusability
Testability
Understandabi
lity
Useability

26 | P a g e
SDD 2007 ABHS - JSK

Reporting on the testing process


Software test description describes the preparation for the tests, the test
cases and the procedures that followed.
Software test plan describes the test environment. the tests to be
performed and provides a time frame for the tests to be performed
Software test report provides information about the conduct of the tests
and results
CASE tools Computer Aided software engineering (CASE) tools provide a
number of helpful tools to test a computer program as well as told which
simplify the documentation process.
CASE tools that aid in the testing process include:
o Tools that generate or acquire data to be used during testing
o Tools that analyse the source code
o Simulation tools to mimic the roles of hardware of other software
that interacts with the program

Test results sharing test results with those whom the software is being
developed may concern them, but is important so they know what is
happening and can make decision on whether it is worthwhile spending extra
time to fix up problems
Comparison with the original design specifications if the program meets all
the requirements of the original design specifications the client will be happy;
if it does not, the client will expect the program is bought up to that standard.

9.2.5 Maintenance of software solutions


Modification of code to meet changed requirements
Reason for
maintenance
coding
Changing user
requirements
Upgrading the user
interface

Changes in the data


to be processed
Introduction of new
hardware or software
Changing
organisational focus
Changes in
government
requirements
Poorly implemented
code

Example
A doctor currently bills patients as they are seen. The
doctor wishes to change to an account system where the
patients are billed at the end of each week
A website was developed in 1999 to be state of the art.
Communication speeds, processing speeds and storage
capacity have all increased. To remain state of the art, it
can be upgraded to include greater variety of graphics,
animations, sound and video
In France the introduction of the Euro currency would
mean that software used for sales in shops must be able
to process both the French Franc and the Euro
A word processor may work perfectly running on Mac OS
8; however when the OS system is upgraded to system 9,
the word processor does not function properly
A school may be an all girls school that wishes to change
over to be co-educational. The school custom data base
may require alterations to the way reports are printed
The introduction of the GST forces companies to modify
their accounting packages to accommodate the new
government requirements.
A student may develop a computer game at school;
however, he later realises that the game will run on a

27 | P a g e
SDD 2007 ABHS - JSK

very narrow range of machines. This may be due to


several shortcuts taken when developing the software
and the use of non standard routines.

Location of section to be altered


o Once the new requirements are established, the maintenance team
has the task of changing the software so that it meets the new
requirements.
o Some of the new requirements cam be met by the addition of new
modules, whereas other requirements will be fulfilled by the
modification of existing code
o Well structured code source code with thorough documentation
simplifies the process of locating a section of code to be altered
Determining changes to be made
o The new set of requirements is used to determine the nature of the
changes to be made to the program.
o It also needs to be determined to keep updating old software or to
create new software
o Software patch a small piece of code added to the compiled
program to avoid the error in someway
o Once a number of errors in the original program, are detected, a
new version of the program will need to be compiled and released,
as patches are only a makeshift solution to avoid and not correct
the underlying problem.
o Software re-engineering the process of using modern
information technology to redesign and rebuild an out-of-date
program
o For minor problems it is better to update, where with big problems
its better to start from scratch.
Implementing and testing solution
o Modification made to an existing program must be thoroughly
tested ti ensure that the changes made are not going to negatively
affect other parts of the program.
o Modules, or sections of code, which have been modified cannot be
treated in isolation, as other parts of the program are likely to be
dependent upon the processes that they perform
o Regression testing the process of re-testing a program to
ensure that the changes made had not affected a previously
working part of the program.

Documentation of changes
Source code macro and script documentation
o Any changes done made to the source code or script should be
thoroughly documented, as if you would do when making the
solution
o Any changes should be clearly indicated in both internal and
external documentation
o Configuration management (CM) management of software
resources

28 | P a g e
SDD 2007 ABHS - JSK

Modification of associated hard copy documentation and online


help
o Any changes in the program means there has to be changes in the
documentation
o Online documentation is generally updated at the same time as the
changes are made to the software and distributed electronically
over a network or in a medium such as a CD
o With hard copy documentation changes have to be made to the
hard copy which is then printed and distributed to the user. Then
the user has to ensure that the new documentation put in the
appropriate place in the pre-existing documentation. This process
puts the onus on the user to remove any outdated sections of the
documentation
o Release note description of the changes that have been made to
the program, supplied when the program is purchased
o It is more prevalent now for had copy documents to be published in
a portable sections for their use. This ensure that each user has
access to the most recent versions of the document
o Documentation should be accurate and up to date, reflecting the
current functionality of the program
Use of CASE tools to monitor changes and versions
o Versioning tools are often used in the context of a CASE
environment to track changes made to a program.
o Versioning means that a new version of a program can be created,
while an old version is archived in case it needs to be accessed at a
later date.
o These tools provide for the CM team to keep track of version
histories, documentation and change by means of integrated
databases combined with a means of document production.
o A variety of CASE tools simplify the process of modifying program
code, particularly for the purpose of re-engineering.
9.1 Historical Reasons for the Development of the Different Paradigms

Every language includes the concepts of sequence, selection and


repetition. A Paradigm is a pattern, a model or method of doing
something. In choosing a paradigm or method, we are also supporting a
particular philosophy. The Nature of the Problem to be solved is the
greatest influence on the choice of the type of programming language.
This task itself is the most important factor to be remembered when
determining which language is best for a give situation.

Machine
o Machine Language is the only language that the computer can
directly understand without need of translation. Machine languages
consists of binary digits grouped into Operation Codes (op-codes)
and memory locations 8, 16, 32 or 64 bits. The operation codes
correspond to actions in the fetch-execute cycle of the CPU.
o The Accumulator is one of the registers in the CPU. It stores a
single data item which is about to be used in a computation. It then
29 | P a g e

SDD 2007 ABHS - JSK

replaces this with the data item produced as the result of the
computation.
Machine code is often written in Octal or Hexadecimal rather then
Binary because:
There are fewer digits required to represent a numeral
There is less likelihood of mistakes with the place
values of digits
Each number is easier to recognise and remember
Programmers using machine code need to fully understand the CPU
operation, as the code is totally dependent on the architecture of
the individual machine.

Assembly
o Assembly Language relives the programmer of some of the
tedium associated with programming in machine code. It uses the
processing power of the computer to translate decimal numbers
and letters into binary code.
o Assembly language programs are converted to machine language
by an assembler. An Assembler takes the original source code and
converts into object code. This translating of programs slows their
execution but the trade-off in accuracy and ease of use is more then
worthwhile.
o In assembly language, operation codes are replaced by symbolic
groups of alphanumeric characters called Mnemonics. A
mnemonic is a word or string which is easier to remember then the
binary patterns it stands for. Non- printing ASCII (American
Standard Code for Information Interchange) characters also
have mnemonics like ESC and DEL intended to evoke their meaning
on certain systems.
o Assembly language is like machine languages in that one line of
code corresponds to one action by the computer.
o A Jump allows the program to branch or jump to an instruction that
is not next in the order.
o Assembly language introduced the concept of Labels or Variables.
Using a label makes it easier for the programmer to keep track of
the memory locations and instructions.
o Assembly language is machine dependent and so programs are not
transportable.
o Macro Instructions or routines of operation codes which could be
accessed by a single mnemonic code further simplified the process
of programming in assembly language. Creating a Library of
Macros for use in future programs greatly improved productivity.
o When an assembler translates the source code into machine
language, it substitutes the predefined sequence of instructions for
the macro instruction.

Third Generation Languages


Third and subsequent generation of language are referred to as HighLevel Languages because the user can write programs without worrying
about the low-level details of how the computer hardware will carry out
the instructions.

30 | P a g e
SDD 2007 ABHS - JSK

High-level languages permit the programmers to devise problemorientated solutions which are independent of the operation of the
computer itself.
Most third generation languages are Procedural Languages where the
programmer must define the in detail the steps and the exact order in
which these steps are to be performed in order to accomplish a task.

Fourth Generation Languages


The Fourth Generation of programming languages are referred to as Very
High-Level Languages. The majority of fourth generation languages are
Query and Retrieval languages.

One of the major applications of fourth generation languages is to extract


information from databases and spreadsheets.
Very high-level languages are Non-Procedural languages. This means
the programmer is not required to specify the steps that a computer must
follow to solve a problem, allowing the user to describe what the computer
system is required to do without actually providing detailed instructions on
how this is to be done.
A programmer using a fourth generation language can produce
much greater code in a given time than with a third generation
language, as the syntax is much freer and the structures are much more
like everyday English.
Errors are also easier to detect and correct because it is much easier to
examine logic of a fourth generation program without being
distracted by the limitations of syntax.
Fourth Generation Languages may not run as efficiently as comparable
code written in a lower-level language.

Fifth Generation Languages


The Fifth Generation of languages are termed Natural Languages.
Natural languages are Knowledge Based and use structures that are
very close to everyday spoken English.

Complex Tasks require a significant number of machine language


instructions.
Process Abstraction is a feature of high-level languages whereby
complex instructions, require many machine language steps, are reduced
to a single command or a small number of commands.
A Sequential Program is the traditional approach to programming and is
closely related to the structure of the computer itself.
The sequential methodology is used by the majority of languages from the
first three generations.
In an Event-Driven Program, the order of the operation of the program
is not sequential but is controlled but the events within the program.
A Procedural Language is one in which the sequence of events to be
carried out is controlled by the programmer. They instruct the computer
how to carry out a particular task.
All procedural languages use the concept of a Variable to symbolically
represent the contents of a particular store location.

31 | P a g e
SDD 2007 ABHS - JSK

The majority of languages in the first three generations are procedural


languages.

Assignment Statements are used to allocate storage locations to each


piece of data.
Non-Procedural Languages do not state how the result is to be
computed but rather describe the form of the result required. NonProcedural languages rely on logic or inference to determine a result.

Basic Building Blocks

Variables and Control Structures (Imperative)


o An Imperative Programming Language is based on the
traditional von Neumann computer architecture.
o This is the traditional design of a single central processing unit
which implements a fetch-execute cycle to process data.
Instructions are fetched from RAM and decoded by the control unit.
They are then executed by the ALU and the result is stored in the
memory location.
o Imperative languages use the basic control structures of Sequence,
Selection and Repetition. Tasks are carried out in a sequence
defined by the programmer.
o Imperative programming is relatively low-level programming as
there is dependence upon machine details such as memory
allocation.

Functions (Functional)
o Function Programs consist of the definition and application of
functions. The execution of a program consists of evaluating these
functions using parameters given.
o Functional programming languages may use Recursion and
Conditional Values for evaluation of functions and in many cases
simple functions are combined to form more complex and more
powerful functions.
o Concurrent Programming permits a single processor to perform
several tasks or aspects of a program. This is distinct from parallel
processing which involves several tasks on several processors.
Functional programs are suited to concurrent programming.

Facts and Rules (Logic)


o Logic Language consist of declarations of facts, rules and goals
rather then variables, assignment statements and mechanics to
control program flow.
o Problems are solved by specifying a set of inputs or facts.
o The aim of a logic program is to determine if a goal is true or false,
based on the facts and rules known. Logic languages declare
relationships in terms of logic rules and do not use variables or
assignment values, they are also called Declarative Languages.

Objects with Data and Methods or Operations (Object Orientated)


o Object-Orientated Languages make use of the concept of
objects and messages passing between objects rather then relying
on operators and operands.
32 | P a g e

SDD 2007 ABHS - JSK

In pure object-orientated languages all computation is based on


Message Passing, and the language uses objects and classes.
Hybrid object-orientated languages use Procedural Calls rather
then message passing.

Effect on Programmers Productivity


Speed of Code Generation
o High-level languages provide programmers with a lot more flexibility
then low-level languages.
o No one language is the answer to every programming problem.
o The ability the reuse portions of code significantly speeds up
development.
Approach to Testing
o Functional languages have a very simple syntax, reducing the
likelihood of errors.
o Object-orientated languages are by nature modular. Modules can
be tested individually through the use of drivers.
o Imperative languages are structured logically using the basic control
structures; subprograms which can be tested individually are widely
used.
o Logic programs often involve less code then an equivalent program
using a different paradigm.
Effect on Maintenance
o Proponents of the Prolog Language believe that because it is
based on logic, programs are less likely to contain errors.
o Modular programs are much simpler to maintain than programs
which have not been separated into different modules.
o The most effective way to reduce maintenance is to ensure the
program specifications are clearly understood before software
development commences.
Efficiency of Solution Once Coded
o Imperative languages often run efficiently, however they may be
slow to develop.
o Functional programs can dynamically be split into different parts to
make use of multiple processors.
o The programmer does not specify the steps involved in obtaining a
result in logic programs.
Learning Curve (Training Required)
o Computer languages have to be used to be understood.
o The semantics of a declarative (logic) language are simpler then the
semantics of an imperative program.
o Semantics refers to the meaning behind a particular language
statement.
Paradigm Specific Concepts

Logic Paradigm (eg Prolog, Expert System Shells)


o Logic programming is well suited to deal with the inconsistencies
and incompleteness of expert systems and natural language
processing.

33 | P a g e
SDD 2007 ABHS - JSK

o
o
o
o
o
o
o
o
o

Many declarative languages make use of Recursion. This is a


powerful problem-solving tool in which a function makes a call to
itself.
Heuristics are criteria or principles for deciding which, among
several alternative courses of action, promises to be the most
effective in order to achieve some goal.
Fuzzy Logic enables decisions to be made according to the
probability of the concept being true.
Goals are the statements which the program will determine using
the rules and facts. The goals are the desired output of the
program.
An Expert System is a computer program which is performs a
specialised task at the level of a human expert.
An Inference Engine is a mechanism for bringing relevant items of
knowledge to bear on a particular problem.
Resolution is the process of using given information to deduce
further information or to access the validity of a further statement.
Forward Chaining starts with the facts and rules and tries to
establish a series of matches that lead to a resolvent statement.
Backward Chaining starts with the goal or resolvent statement
and then works backwards to try to prove the validity of each
element in the goal.

Object-Orientated Programming (eg C++ =, Delphi, Java)


o An Object is any item which can be described by specifying its
attributes or fields and the procedures that can be performed on
these attributes.
o An object contains data and then instructions that are used to
process the data. These instructions are called Methods,
Operations or Services. A method is performed by an object
when it is sent a message.
o A class of objects share some common characteristics and perform
similar processes.
o A class of an object determines the set of operations that can be
performed on an object.
o Inheritance is where objects which share many of the same
properties can be created from a parent or ancestor. It is the ability
to create a new object (a descendent) that includes attributes and
procedures which are the same as those of an existing object (an
ancestor).
o Polymorphism allows many different objects to use a particular
behaviour or method. Polymorphic routines can be applied to
objects of many different types. The routines are encapsulated
within a class of objects and as such can be used by each of the
objects.
o Encapsulation is the process of including all the attributes and
procedures that an object needs within the object itself.
o The concept of Abstraction allows programmers to concentrate on
the program structure without being concerned with the underlying
detail. Abstraction involves representing a complex task in a
simple or symbolic way.

Functional Programming (eg LISP, APL)


34 | P a g e

SDD 2007 ABHS - JSK

o
o
o

Function al languages are not restricted by the type of data that can
be returned by a function.
Functional programs use recursion rather then repetition (loops).
Many modern versions of functional languages allow for the use of
variables and a range of data structures.

35 | P a g e
SDD 2007 ABHS - JSK

Das könnte Ihnen auch gefallen