CS3212 Software Engineering M2
CS3212 Software Engineering M2
(2-0-2)
CS 3212
Dr. N. Raghu Kisore,
Associate Professor, MEC
Agile Modelling
➢ practice-based methodology for effective modelling
and documentation of software-based systems.
➢ Model With a Purpose
➢ Multiple Models
➢ Quality Work
➢ Aim for rapid feedback
➢ Software Is Your Primary Goal
➢ Travel Light
Model With a Purpose
➢Which is more important Product or Process?
➢Elaboration
➢Construction
➢Transition
Inception
➢The life-cycle objectives of the project are
stated, so that the needs of every stakeholder
are considered. Scope and boundary
conditions, acceptance criteria and some
requirements are established.
Inception - Entry criteria
➢The expression of a need, which can take any of
the following forms:
• an original vision
• a legacy system
• an RFP (request for proposal)
• the previous generation and a list of enhancements
• some assets (software, know-how, financial assets)
• a conceptual prototype, or a mock-up
“an original vision”
➢Every hardware and software feature developed at
Apple will have it’s iMac at the centre. -- in 1998.
CMMI
CMMI
➢ Developed by the Software Engineering Institute of
the Carnegie Mellon University
➢ Framework that describes the key elements of an
effective software process.
➢ Describes an evolutionary improvement path for
software organizations from an ad hoc, immature
process to a mature, disciplined one.
➢ Provides guidance on how to gain control of
processes for developing and maintaining software
and how to evolve toward a culture of software
engineering and management excellence
Process Maturity Concepts
➢Software Process
• set of activities, methods, practices, and
transformations that people use to develop and
maintain software and the associated products (e.g.,
project plans, design documents, code, test cases,
user manuals)
➢Software Process Capability
• describes the range of expected results that can be
achieved by following a software process
• means of predicting the most likely outcomes to be
expected from the next software project the
organization undertakes
Process Maturity Concepts
➢Software Process Performance
• actual results achieved by following a software
process
➢Software Process Maturity
• extent to which a specific process is explicitly
defined, managed, measured, controlled and
effective
• implies potential growth in capability
• indicates richness of process and consistency with
which it is applied in projects throughout the
organization
➢Continuous
• Built on capability levels
CMM Levels
➢Maturity level indicates level of process
capability:
1. Initial
2. Repeatable
3. Defined→ officially labelled as CMMI Level 3
4. Managed
5. Optimizing→ officially labelled as CMMI Level 5
Why measure software and
software process?
➢Obtain data that helps us to better control
• schedule
• cost
• quality of software products
➢ToolKits
• Gnu Toolkit
➢Design Patterns
➢Design Diagrams
➢ The reference for
design patterns
➢ “Gang of four”
➢ Based on Erich
Gamma’s Ph.D. thesis
Design Patterns
➢OO systems exhibit recurring structures that
promote
o abstraction
o flexibility
o modularity
o elegance
Design Pattern
➢abstracts a recurring design structure
➢Comprises class and/or object
• dependencies
• structures
• interactions
• conventions
Four Basic Parts
1. Name
2. Problem (including “forces”)
3. Solution
4. Consequences & trade-offs of application
Association types
➢aggregation: "is part of" aggregation
composition
– stronger version of aggregation
1
– the parts live and die with the whole
*
– symbolized by a black diamond
Page
➢dependency: "uses temporarily"
– symbolized by dotted line
– often is an implementation dependency
detail, not an intrinsic part
of that object's state Lottery Random
Ticket
Observer Object Behavioral
Intent
define a one-to-many dependency between objects so that when
one object changes state, all dependents are notified & updated
Applicability
• an abstraction has two aspects, one dependent on the other
• a change to one object requires changing untold others
• an object should notify unknown other objects
Observer Object Behavioral
Structure
Observer Pattern
Observer Pattern: Sequence Diagram
https://howtodoinjava.com/design-patterns/behavioral/observer-design-pattern/
• ConcereteObserver myobserver(mySubject)
• ConcereteSubject mySubject;
An object registers with it’s subject in the
constructor
myobserver(ConcereteSubject Subj){
Subj.attach(this);
}
Observer Object Behavioral
Consequences
+ modularity: subject & observers may vary independently
+ extensibility: can define & add any number of observers
+ customizability: different observers offer different views of subject
– unexpected updates: observers don’t know about each other
– update overhead: might need hints or filtering
Implementation
– subject-observer mapping
– dangling references
– update protocols: the push & pull models
– registering modifications of interest explicitly
Known Uses
– Smalltalk Model-View-Controller (MVC)
– InterViews (Subjects & Views, Observer/Observable)
– Andrew (Data Objects & Views)
– Pub/sub middleware (e.g., androidOS, CORBA Notification Service, Java Messaging Service)
– Mailing lists
ITERATOR Object Behavioral
Intent
access elements of a container without exposing its representation
Applicability
– require multiple traversal algorithms over a container
– require a uniform traversal interface over different containers
– when container classes & traversal algorithm must vary independently
Structure
Iterator Pattern
Iterator Sample code
(C++ STL)
ITERATOR Object Behavioral
Iterators are used heavily in the C++ Standard
Template Library (STL)
int main (int argc, char *argv[]) {
vector<string> args;
for (int i = 0; i < argc; i++)
args.push_back (string (argv[i]));
for (vector<string>::iterator i (args.begin ()); i != args.end (); i++)
cout << *i;
cout << endl;
return 0;
}
Implementation
– internal versus external iterators
– violating the object structure’s encapsulation
– robust iterators
– synchronization overhead in multi-threaded programs
– batching in distributed & concurrent programs
Known Uses
– C++ STL iterators
– JDK Enumeration, Iterator
– Unidraw Iterator
SINGLETON Object Creational
SINGLETON Object Creational
Consequences
+Controlled access to sole instance
+Reduced name space.
+Permits a variable number of instances
Implementation (Java)
// Classical Java implementation of singleton
// design pattern
class Singleton
{
private static Singleton obj;
➢Difficult to Define.
➢user satisfaction = compliant product + good
quality + delivery within budget and schedule
ISO 9126 Quality Factors
➢ Functionality
– suitability, accuracy, interoperability, compliance, and
security.
➢ Reliability
– maturity, fault tolerance, recoverability.
➢ Usability
– Under standability, learnability, operability.
➢ Efficiency
– time behaviour, resource behaviour.
➢ Maintainability
– analysability, changeability, stability, testability.
➢ Portability
– adaptability, installability, conformance, replaceability.
Software Quality Dilemma
➢ If you produce a software system that has terrible
quality, you lose because no one will want to buy
it.
Vs
➢ on the other hand you spend infinite time,
extremely large effort, and huge sums of money
to build the absolutely perfect piece of software,
then it’s going to take so long to complete and it
will be so expensive to produce that you’ll be out
of business anyway.
“Good Enough” Software ?
Good Enough Software?
➢Automotive Domain
• Autonomous Driving
• Electric Vehicles
➢Aerospace industry
➢Defense Industry
➢Security Risks.
Software Quality Assurance
➢Impact of Management Actions
• Estimation decisions.
• Scheduling decisions.
• Risk-oriented decisions.
Achieving Software Quality
➢Software Engineering Methods
➢Project Management Techniques
➢Quality Control
➢Quality Assurance
Software Reviews
➢Review Metrics:
• Preparation effort, Ep
• Assessment effort, Ea
• Rework effort, Er
• Work product size, WPS
• Minor errors found, Errminor
• Major errors found, Errmajor
Analyzing Metrics
➢Ereview = Ep + Ea + Er
Approx. Value of PI
What does this code do?
Prints “Hello World”
Assuring Software Quality
Challenge:
Software is not a tangible entity to
physically measure quality!!!
• Fucntion1(10,11)
Software Reliability
Software Reliability
Measures of Reliability and Availability:
MTBF = MTTF + MTTR
➢MTBF:
Mean Time between Failure
➢MTTF
Mean Time to Failure
➢MTTR:
Mean Time to Repair
Others
➢failures-in-time (FIT)
• a statistical measure of how many failures a
component will have over 1 billion hours of
operation.
➢Software availability
𝑀𝑇𝑇𝐹
• Availability = * 100
𝑀𝑇𝑇𝐹+𝑀𝑇𝑇𝑅