Lecture 1
Lecture 1
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
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.
•It will enable you to control software schedules and to plan effectively.
•It helps you to support the engineers' activities systematically and efficiently.
Hardware vs. Software
Hardware Software
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
[ 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
•It will enable you to control software schedules and to plan effectively.
•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
• 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
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
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
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
Withdraw Dispense
H Dispensing!
$60 $60
Please take
your cash
41
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
1
4 2
7 5 3
8 6
0 9
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
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