0% found this document useful (0 votes)
6 views80 pages

Lecture 1

Uploaded by

irtizazaidi2003
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views80 pages

Lecture 1

Uploaded by

irtizazaidi2003
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 80

Software Engineering

Lecture 1
Unit # 1

[These slides are adapted from Software Engineering: A Practitioner’s Approach, Roger S.
Pressman © 2021 & Software Engineering, Ian Somerville © 2021]
Introduction
Lecture Outcomes
• Understanding of:
– what software engineering is and why it is important;
– the development of different types of software system may require
different software engineering techniques;
– ethical and professional issues that are important for software
engineers;
Unit 1.1
What is a Software?
Topics

03 Why software is important?

04 Software Applications
What is Software?
The product that software professionals build and then support over the long term.
Software encompasses:
(1)instructions (computer programs) that when executed provide desired features,
function, and performance;
(2)data structures that enable the programs to adequately store and manipulate
information and
(3)documentation that describes the operation and use of the programs.
What is Engineering?
Engineering is the use of scientific principles to design and build machines, structures, and other items,
including bridges, tunnels, roads, vehicles, and buildings [1].

[1] https://en.wikipedia.org/wiki/Engineering
Hypothesis: A supposition or proposed explanation made on the basis of limited evidence as a starting point
for further investigation.
What is Software Engineering?
Software engineering is a process of analyzing user requirements and then designing, building, and testing
software application which will satisfy those requirements. It deals with creating new software that would be
used in the real world.

Software engineering is an engineering discipline that is concerned with all aspects of software production
from initial conception to operation and maintenance.
Software Products
• Generic products
– Stand-alone systems that are marketed and sold to any customer who wishes to buy
them.
– Examples – PC software such as editing, graphics programs, project management
tools; CAD software; software for specific markets such as appointments systems for
dentists.
• Customized products
– Software that is commissioned by a specific customer to meet their own needs.
– Examples – embedded control systems, air traffic control software, traffic monitoring
systems.
Why need Software Engineering?
Here, are reasons for using software engineering method:
•It allows you to improve the quality of the software products.

•To increase productivity & provide job satisfaction to software professionals.

•It will enable you to control software schedules and to plan effectively.

•It helps to reduce the cost of software development.

•Allow you to meet the customers' needs and requirements.

•It helps you to support the engineers' activities systematically and efficiently.
Hardware vs. Software
Hardware Software

 Manufactured  Developed/ engineered


 wear out  deteriorate
 Built using components  Custom built
 Relatively simple  Complex
Manufacturing vs. Development
• Once a hardware product has been manufactured, it is difficult or impossible to
modify. In contrast, software products are routinely modified and upgraded.
• In hardware, hiring more people allows you to accomplish more work, but the
same does not necessarily hold true in software engineering.
• Unlike hardware, software costs are concentrated in design rather than
production.
Wear vs. Deterioration
• When a hardware component wears out, it is replaced by a spare part.
• There are no software spare parts. Every software failure indicates an error in design or in
the process through which design was translated into machine executable code.
Therefore, software maintenance involves considerably more complexity
Component Based v/s Custom Built
• Hardware products typically employ many standardized design components.
• Most software continues to be custom built.
• The software industry does seem to be moving (slowly) toward component
based construction.
Software is Complex
• Complex  complicated
• Complex = composed of many simple parts related to one another

• Complicated = not well understood, or explained


Complexity Example: Scheduling Fence Construction Tasks

Nailing Painting
Setting posts Cutting wood
[ 2 time units for unpainted; [ 5 time units for uncut wood;
[ 3 time units ] [ 2 time units ]
3 time units otherwise ] 4 time units otherwise ]

Cutting  Nailing Setting posts  Nailing, Painting …shortest possible completion time = ?
[  “simple” problem, but hard to solve without a pen and paper ]
More Complexity

Suppose today is Tuesday, November 29

What day will be on January 3?

[ To answer, we need to bring the day names and the day numbers into coordination,
and for that we may need again a pen and paper ]
Why Software is Important?
• The economies of ALL developed nations are dependent on software.
• More and more systems are software controlled ( transportation, medical,
telecommunications, military, industrial, entertainment,)
• Software engineering is concerned with theories, methods and tools for
professional software development.
Software costs

• Software costs often dominate computer system costs. The costs of software on a
PC are often greater than the hardware cost.
• Software costs more to maintain than it does to develop. For systems with a long
life, maintenance costs may be several times development costs.
• Software engineering is concerned with cost-effective software development.
Software Characteristics
• Its characteristics that make it different from other things human being build.
– Software is developed or engineered, it is not manufactured in the classical sense which has
quality problem.
– Software doesn't "wear out.” but it deteriorates (due to change). Hardware has bathtub curve
of failure rate ( high failure rate in the beginning, then drop to steady state, then cumulative
effects of dust, vibration, abuse occurs).
– Although the industry is moving toward component-based construction (e.g. standard
screws and off-the-shelf integrated circuits), most software continues to be custom-built.
Modern reusable components encapsulate data and processing into software parts to be
reused by different programs. E.g. graphical user interface, window, pull-down menus in
library etc.
Software Applications
1. System software: such as compilers, editors, file management utilities
2. Application software: stand-alone programs for specific needs.
3.Engineering/scientific software: Characterized by “number crunching”algorithms. such as
automotive stress analysis, molecular biology, orbital dynamics etc.
4. Embedded software resides within a product or system. (key pad control of a microwave oven,
digital function of dashboard display in a car)
5. Product-line software focus on a limited marketplace to address mass consumer market. (word
processing, graphics, database management)
6. WebApps (Web applications) network centric software. As web 2.0 emerges, more sophisticated
computing environments is supported integrated with remote database and business applications.
7. AI software uses non-numerical algorithm to solve complex problem. Robotics, expert system,
pattern recognition game playing
Unit 1.2
Software Engineering
Topics

03 Four P’s of Software Engineering


Software Engineering Definition
The seminal definition:
[Software engineering is] the establishment and use of sound engineering
principles in order to obtain economically software that is reliable and works
efficiently on real machines.

The IEEE definition:


Software Engineering: (1) The application of a systematic, disciplined,
quantifiable approach to the development, operation, and maintenance of
software; that is, the application of engineering to software. (2) The study of
approaches as in (1).
Why Software Engineering?
Here, are reasons for using software engineering method:
•It allows you to improve the quality of the software products.

•To increase productivity & provide job satisfaction to software professionals.

•It will enable you to control software schedules and to plan effectively.

•It helps to reduce the cost of software development.

•Allow you to meet the customers' needs and requirements.

•It helps you to support the engineers' activities systematically and efficiently.
Why Software Engineering?
• Creation of software systems that are
• Reliable
• Efficient
• Maintainable
• Meet the needs of customers

• Production of system meets


• Schedule
• Budget
Software Disasters (Research Assignment)

• Numerous examples of software disasters


– Ariane Project
– 1990 AT&T Disaster
– Radiation Overdose
Software Failure
• What is it?
– Failure to meet expectations

• What expectations are not achieved? The market window is defined, as the
– Over budget best time to launch a product into the
market. It's the point at which the product
– Exceeds schedule and/or misses market window is strategically positioned as sufficiently
– Doesn’t meet stated customer requirements unique or differentiated versus the
competition
– Lower quality than expected
– Performance doesn’t meet expectations
– Too difficult to use
Software

Failure (cont.)
Reasons for failure:
– Unrealistic project goals
– Poor project management
– Inaccurate estimates of needed resources
– Badly defined system requirements
– Poor reporting of the project's status
– Unmanaged risks
– Poor communication among customers, developers, and users
– Inability to handle the project's complexity
– Poor software design methodology
– Wrong or inefficient set of development tools
– Inadequate test coverage
– Inappropriate (or lack of) software process
3
0

Software Engineering contd.


A bridge from customer needs to programming implementation

Customer
Customer
Programmer
Overall Software Development
• Feasibility and planning
• Requirements
• User Interface Design
• System and Program Design These steps may be repeated many times
• Implementation (Coding) during the development cycle
• Acceptance and release
• Operation and maintenance
It is essential to distinguish among these aspects and to be clear which you are are
doing at any given moment.
Note
Considerations of testing, security and performance are part of many of these steps.
Software Development Life Cycle (SDLC)
Software Development Life Cycle (SDLC)
The Software Development Life Cycle (SDLC) is a structured process that enables the
production of high-quality, low-cost software, in the shortest possible production time.
The goal of the SDLC is to produce superior software that meets and exceeds all
customer expectations and demands.
3
6

The Role of Software Engineering


Customer:
First law of software engineering Requires a computer system to achieve some business goals
by user interaction or interaction with the environment

•Software engineer is willing to learn the in a specified manner

problem domain (problem cannot be System-to-be


solved without understanding it first)
Environment
Software-to-be
User

Second law of software engineering


•Software should be written for people
Software Engineer’s task:
first To understand how the system-to-be needs to interact with
– ( Computers run software, but hardware the user or the environment so that customer’s requirement is met
and design the software-to-be
quickly becomes outdated)
– Useful + good software lives long May be the Programmer’s task:
same person To implement the software-to-be
– To nurture software, people must be able designed by the software engineer
to understand it
3
7

Example: ATM Machine


Understanding the money-machine problem:

Communication link
1
4 2
7 5 3
8 6
0 9

Bank’s
remote
ATM machine
datacenter
Bank
customer
38

Problem-solving Strategy
• Identify logical parts of the system that each solves a part of the problem
• Easiest done with the help of a domain expert who already knows the steps in the
process (“how it is currently done”)
• Result:
– A Model of the Problem Domain (or “domain model”)
3
9

How ATM Machine Might Work


Domain Model

Transaction
How may I record
help you? Cash

Bookkeeper
Speakerphone Safe
Safe keeper
Phone

Window clerk

Datacenter
liaison

Dispenser

Bank’s
remote
datacenter
Customer
Cartoon Strip: How ATM Machine Works
A Enter B C Verify
account
D
your PIN
XYZ
Verify
this
account

Typing in XYZ valid. Account


PIN number Balance: valid.
… $100 Balance:
$100

E How may F Release


G Record
I help $60 $60 less
you?

Withdraw Dispense
H Dispensing!

$60 $60
Please take
your cash
41

Software Engineering Blueprints


• Specifying software problems and solutions is like cartoon strip writing
• Unfortunately, most of us are not artists, so we will use something less exciting:
UML symbols
• However …
Software Engineering Activities
• Four P’s of Software Engineering
People Are Crucial
• The most important element of any software project are people that includes:
• Architects,
• Developers,
• Testers, and their supporting management, plus
• Users,
• Customers,
• Other stakeholders

• People are considered as the prime movers in a software project.


Projects Make the Product
• Software project is the organizational element through which software development is managed. The outcome of
a project is a released product. The activities of a software project includes:
• Planning
– Plan, monitor and control the software project
• Requirement Analysis
– Define what to build
• Design
– How to build the software
• Implementation
– Program the software
• Testing & Maintenance
– Validates software meets the requirements
– Resolve problem; adapt software to meet new requirements
Product Is More Than Code
• Product is defined as the arti-facts that are created during the life of the project, such as models,
source code, executables, and documentation. The activities of a software product includes:
• Project documentation
– Documents produced during software definition and development
• Code
– Source and object
• Test documents
– Plans, cases, and results An artifact is a byproduct of software development that helps
• Customer documents describe the architecture, design and function of software.
– Artifacts
Documents explaining how to use and operate are like roadmaps that software developers can use to
product
• Productivity measurements trace the entire software development process. Artifacts might
– be databases, data models, printed documents or scripts.
Analyze project productivity
Process Directs Projects
• A software engineering process is a definition of the complete set of activities
needed to transform users’ requirements into a product. A process is a template for
creating projects.
• In other words, it’s a framework for carrying out the activities of a project in an
organized and disciplined manner.
• Imposes structure
• Models
– Waterfall or Iterative
– Agile etc.
4
7

Waterfall Method
Requirements
• Simplest process
• Sequential
Design • Basis for others

Implementation
• Each activity
confined to its
“phase”.
Testing
Waterfall • Unidirectional,
method Deployment & no way back;
Maintenance finish this phase
before moving
to the next
Iterative Method
• Develop increment of functionality, repeat in a feedback loop
• Software projects rarely follow strict waterfall
• Some iteration between specifications, design, implementation and test
• Requires discipline
– e.g. update specifications when design changes
49

Agile Method
• Continuous user feedback essential; feedback loops on several levels of granularity
Importance of Software Engineering
• More and more, individuals and society rely on advanced software systems. We
need to be able to produce reliable and trustworthy systems economically and
quickly.
• It is usually cheaper, in the long run, to use software engineering methods and
techniques for software systems rather than just write the programs as if it was a
personal programming project. For most types of system, the majority of costs are
the costs of changing the software after it has gone into use.
Unit 1.3
Essence & Ethics of
Software Engineering
Topics

Hooker’s General Principles

03 Software Engineering Ethics


The Essence of Practice
• How does the practice of software engineering fit in the process activities
mentioned above? Namely, communication, planning, modeling,
construction and deployment.
• George Polya outlines the essence of problem solving, suggests:
1. Understand the problem (communication and analysis).
2. Plan a solution (modeling and software design).
3. Carry out the plan (code generation).
4. Examine the result for accuracy (testing and quality assurance).
Understand the Problem
• Who has a stake in the solution to the problem? (Actors)
– That is, who are the stakeholders?
• What are the unknowns? (Concept/Objects)
– What data, functions, and features are required to properly solve the
problem?
• Can the problem be compartmentalized?
– Is it possible to represent smaller problems that may be easier to
understand?
• Can the problem be represented graphically? (Use-case)
– Can an analysis model be created?
ATM: Gallery of Players

1
4 2
7 5 3
8 6
0 9

Bank customer System Bank’s remote


(ATM machine) datacenter

(Easy to identify because they are visible!)


Gallery of Workers + Tools

Window clerk Datacenter Bookkeeper Safe keeper Dispenser


liaison

Speakerphone Telephone Transaction Safe Cash


record

(Hard to identify because they are invisible/imaginary!)


Use Case: Withdraw Cash
A Enter
B Verify
account C How may
your PIN XYZ I help
you?

Typing in XYZ valid. Withdraw


PIN number Balance: $60
… $100

D E XYZ
Please take
your cash withdrew
$60

Collecting
cash …
Acknowledged
How ATM Machine Works
Domain Model (2)
Alternative Solution
modification
solution
Transaction
How may I record
help you?

Bookkeeper
Speakerphone

Draftsman
Window clerk

Dispenser

Customer
How ATM Machine Works
Domain Model (3) Solution
Alternative modification
solution Transaction
How may I record
help you?

Bookkeeper
Speakerphone
Courier

Window clerk

Dispenser

Remote
bank
Customer

Which solution is the best or even feasible?


Plan the Solution
• Have you seen similar problems before?
– Are there patterns that are recognizable in a potential solution?
– Is there existing software that implements the data, functions, and features that are
required?
• Has a similar problem been solved?
– If so, are elements of the solution reusable?
• Can subproblems be defined?
– If so, are solutions readily apparent for the subproblems?
• Can you represent a solution in a manner that leads to effective implementation?
– Can a design model be created?
Carry Out the Plan
• Does the solutions conform to the plan?
– Is source code traceable to the design model?
• Is each component part of the solution provably correct?
– Has the design and code been reviewed, or better, have correctness proofs
been applied to algorithm?
Examine the Result
• Is it possible to test each component part of the solution?
– Has a reasonable testing strategy been implemented?
• Does the solution produce results that conform to the data, functions, and features
that are required?
– Has the software been validated against all stakeholder requirements?
Hooker’s General Principles for Software
Engg. Practice (David Hooker 96).
• Help you establish mind-set for solid software engineering practice.
1: The Reason It All Exists: provide values to users
2: KISS (Keep It Simple, Stupid! As simple as possible)
3: Maintain the Vision (otherwise, incompatible design)
4: What You Produce, Others Will Consume (code with concern for those that must maintain
and extend the system)
5: Be Open to the Future (never design yourself into a corner as specification and hardware
changes)
6: Plan Ahead for Reuse
7: Think! Place clear complete thought before action produces better results.
Software Engineering Ethics
• Most disciplines operate under a strict set of ethical standards
• The Merriam-Webster online dictionary defines ethics as:
1: the discipline dealing with what is good and bad and with moral duty
and obligation
2: a set of moral principles

64
Software Engineering Ethics (cont.)
• ACM/IEEE-CS Joint Task Force - Software Engineering Code of Ethics
and Professional Practices (Version 5.1):
– “Software engineers shall commit themselves to making the analysis,
specification, design, development, testing and maintenance of software a
beneficial and respected profession. In accordance with their commitment to
the health, safety and welfare of the public, software engineers shall
adhere to the following Eight Principles:

65
Software Engineering Ethics (cont.)
PREAMBLE

The short version of the code summarizes aspirations at a high l evel of the abstraction; the clauses that are included in the fu ll
version give examples and details of how these aspirations chang e the way we act as software engineering professionals.
Without the aspirations, the details can become legalistic and t edious; without the details, the aspirations can become high
sounding but empty; together, the aspirations and the details fo rm a cohesive code.

Software engineers shall commit themselves to making the analysi s, specification, design, development, testing and
maintenance of software a beneficial and respected profession. I n accordance with their commitment to the health, safety and
welfare of the public, software engineers shall adhere to the fo llowing Eight Principles:

1. PUBLIC - Software engineers shall act consistently with the public inter est.

2. CLIENT AND EMPLOYER - Software engineers shall act in a manner that is in the best in terests of their client and
employer consistent with the public interest.

3. PRODUCT - Software engineers shall ensure that their products and related modifications meet the highest professional
standards possible.

4. JUDGMENT - Software engineers shall maintain integrity and independence in their professional judgment.

5. MANAGEMENT - Software engineering managers and leaders shall subscribe to an d promote an ethical approach to the
management of software development and maintenance.

6. PROFESSION - Software engineers shall advance the integrity and reputation o f the profession consistent with the public
interest.

7. COLLEAGUES - Software engineers shall be fair to and supportive of their col leagues.

8. SELF - Software engineers shall participate in lifelong learning regar ding the practice of their profession and shall promote
an ethical approach to the practice of the profession.
Unit 1.4
Case Studies
Topics
Case Studies
• A personal insulin pump
– An embedded system in an insulin pump used by diabetics to maintain blood
glucose control.
• A mental health case patient management system
– A system used to maintain records of people receiving care for mental health
problems.
Insulin Pump Control System
• Collects data from a blood sugar sensor and calculates the amount of insulin
required to be injected.
• Calculation based on the rate of change of blood sugar levels.
• Sends signals to a micro-pump to deliver the correct dose of insulin.
• Safety-critical system as low blood sugars can lead to brain malfunctioning, coma
and death; high-blood sugar levels have long-term consequences such as eye and
kidney damage.
Insulin Pump Hardware Architecture
Activity Model of the Insulin Pump
Essential High-level Requirements
• The system shall be available to deliver insulin when required.
• The system shall perform reliably and deliver the correct amount of insulin to
counteract the current level of blood sugar.
• The system must therefore be designed and implemented to ensure that the
system always meets these requirements.
A Patient Information System For Mental
Health Care
• A patient information system to support mental health care is a medical information
system that maintains information about patients suffering from mental health
problems and the treatments that they have received.
• Most mental health patients do not require dedicated hospital treatment but need to
attend specialist clinics regularly where they can meet a doctor who has detailed
knowledge of their problems.
• To make it easier for patients to attend, these clinics are not just run in hospitals.
They may also be held in local medical practices or community centres.
MHC-PMS
• The MHC-PMS (Mental Health Care-Patient Management System) is an
information system that is intended for use in clinics.
• It makes use of a centralized database of patient information but has also been
designed to run on a PC, so that it may be accessed and used from sites that do
not have secure network connectivity.
• When the local systems have secure network access, they use patient information
in the database but they can download and use local copies of patient records
when they are disconnected.
MHC-PMS Goals
• To generate management information that allows health service managers to assess
performance against local and government targets.
• To provide medical staff with timely information to support the treatment of
patients.
The Organization of the MHC-PMS
MHC-PMS Key Features
• Individual care management
– Clinicians can create records for patients, edit the information in the system,
view patient history, etc. The system supports data summaries so that doctors
can quickly learn about the key problems and treatments that have been
prescribed.
• Patient monitoring
– The system monitors the records of patients that are involved in treatment and
issues warnings if possible problems are detected.
• Administrative reporting
– The system generates monthly management reports showing the number of
patients treated at each clinic, the number of patients who have entered and
left the care system, number of patients sectioned, the drugs prescribed and
their costs, etc.
MHC-PMS Concerns
• Privacy
– It is essential that patient information is confidential and is never disclosed to
anyone apart from authorised medical staff and the patient themselves.
• Safety
– Some mental illnesses cause patients to become suicidal or a danger to other
people. Wherever possible, the system should warn medical staff about
potentially suicidal or dangerous patients.
– The system must be available when needed otherwise safety may be
compromised and it may be impossible to prescribe the correct medication to
patients.
Thank you

You might also like