SlideShare a Scribd company logo
1 of 61
ITS 66404
Principles of Software
Engineering
Nur Haifa
Chapter 4- Agile
Software
Development
Agenda
Plan Driven & Agile
Agile Methods & Principles
Agile Developmental Techniques
Extreme Programming (XP)
Class diagram
Chapter 1 – Intro to Software Engineering 2
Rapid software development
+ Rapid development and delivery is now often the
most important requirement for software systems
Businesses operate in a fast –changing requirement and it is
practically impossible to produce a set of stable software
requirements
Software has to evolve quickly to reflect changing business needs.
+ Plan-driven development is essential for some types
of system but does not meet these business needs.
+ Agile development methods emerged in the late
1990s whose aim was to radically reduce the delivery
time for working software systems
Chapter 4 Agile Software Development 3
Agile development
+ Program specification, design and implementation are inter-leaved
+ The system is developed as a series of versions or increments with
stakeholders involved in version specification and evaluation
+ Frequent delivery of new versions for evaluation
+ Extensive tool support (e.g. automated testing tools) used to support
development.
+ Minimal documentation – focus on working code
Chapter 4 Agile Software Development 4
Plan-driven and agile development
Chapter 4 Agile Software Development 5
Plan-driven and agile development
+ Plan-driven development
A plan-driven approach to software engineering is based around separate development
stages with the outputs to be produced at each of these stages planned in advance.
Not necessarily waterfall model – plan-driven, incremental development is possible
Iteration occurs within activities.
+ Agile development
Specification, design, implementation and testing are inter-leaved and the outputs from
the development process are decided through a process of negotiation during the
software development process.
Chapter 4 Agile Software Development 6
Agile methods
Chapter 4 Agile Software Development 7
Agile methods
+ Dissatisfaction with the overheads involved in software design methods of
the 1980s and 1990s led to the creation of agile methods. These methods:
Focus on the code rather than the design
Are based on an iterative approach to software development
Are intended to deliver working software quickly and evolve this quickly to meet changing
requirements.
+ The aim of agile methods is to reduce overheads in the software process
(e.g. by limiting documentation) and to be able to respond quickly to
changing requirements without excessive rework.
Chapter 4 Agile Software Development 8
Agile manifesto
+ We are uncovering better ways of developing software by
doing it and helping others do it. Through this work we have
come to value:
Individuals and interactions over processes and tools
Working software over comprehensive documentation
Customer collaboration over contract negotiation
Responding to change over following a plan
+ That is, while there is value in the items on the right, we value
the items on the left more.
Chapter 4 Agile Software Development 9
The principles of agile methods
Chapter 4 Agile Software Development 10
Principle Description
Customer involvement Customers should be closely involved throughout the
development process. Their role is provide and prioritize new
system requirements and to evaluate the iterations of the
system.
Incremental delivery The software is developed in increments with the customer
specifying the requirements to be included in each increment.
People not process The skills of the development team should be recognized and
exploited. Team members should be left to develop their own
ways of working without prescriptive processes.
Embrace change Expect the system requirements to change and so design the
system to accommodate these changes.
Maintain simplicity Focus on simplicity in both the software being developed and
in the development process. Wherever possible, actively work
to eliminate complexity from the system.
Agile method applicability
+ Product development where a software company is developing
a small or medium-sized product for sale.
Virtually all software products and apps are now developed using an agile
approach
+ Custom system development within an organization, where
there is a clear commitment from the customer to become
involved in the development process and where there are few
external rules and regulations that affect the software.
Chapter 4 Agile Software Development 11
Agile development techniques
Chapter 4 Agile Software Development 12
Extreme programming
+ A very influential agile method, developed in the late
1990s, that introduced a range of agile development
techniques.
+ Extreme Programming (XP) takes an ‘extreme’ approach
to iterative development.
New versions may be built several times per day;
Increments are delivered to customers every 2 weeks;
All tests must be run for every build and the build is only accepted if tests run
successfully.
Chapter 4 Agile Software Development 13
The extreme programming release
cycle
Chapter 4 Agile Software Development 14
Extreme programming practices (a)
Chapter 4 Agile Software Development 15
Principle or practice Description
Incremental planning Requirements are recorded on story cards and the stories to be
included in a release are determined by the time available and
their relative priority. The developers break these stories into
development ‘Tasks’.
Small releases The minimal useful set of functionality that provides business
value is developed first. Releases of the system are frequent
and incrementally add functionality to the first release.
Simple design Enough design is carried out to meet the current requirements
and no more.
Test-first development An automated unit test framework is used to write tests for a
new piece of functionality before that functionality itself is
implemented.
Refactoring All developers are expected to refactor the code continuously as
soon as possible code improvements are found. This keeps the
code simple and maintainable.
Extreme programming practices (b)
Chapter 4 Agile Software Development 16
Pair programming Developers work in pairs, checking each other’s work and
providing the support to always do a good job.
Collective ownership The pairs of developers work on all areas of the system, so that
no islands of expertise develop and all the developers take
responsibility for all of the code. Anyone can change anything.
Continuous integration As soon as the work on a task is complete, it is integrated into
the whole system. After any such integration, all the unit tests in
the system must pass.
Sustainable pace Large amounts of overtime are not considered acceptable as
the net effect is often to reduce code quality and medium term
productivity
On-site customer A representative of the end-user of the system (the customer)
should be available full time for the use of the XP team. In an
extreme programming process, the customer is a member of
the development team and is responsible for bringing system
requirements to the team for implementation.
XP and agile principles
+ Incremental development is supported through small, frequent
system releases.
+ Customer involvement means full-time customer engagement with
the team.
+ People not process through pair programming, collective ownership
and a process that avoids long working hours.
+ Change supported through regular system releases.
+ Maintaining simplicity through constant refactoring of code.
Chapter 4 Agile Software Development 17
Influential XP practices
+ Extreme programming has a technical focus and is not easy to
integrate with management practice in most organizations.
+ Consequently, while agile development uses practices from XP,
the method as originally defined is not widely used.
+ Key practices
User stories for specification
Test-first development
Pair programming
Chapter 4 Agile Software Development 18
User stories for requirements
+ In XP, a customer or user is part of the XP team and is
responsible for making decisions on requirements.
+ User requirements are expressed as user stories or scenarios.
+ These are written on cards and the development team break
them down into implementation tasks. These tasks are the
basis of schedule and cost estimates.
+ The customer chooses the stories for inclusion in the next
release based on their priorities and the schedule estimates.
Chapter 4 Agile Software Development 19
A ‘prescribing medication’ story
Chapter 4 Agile Software Development 20
Examples of task cards for prescribing
medication
Chapter 4 Agile Software Development 21
Test-first development
+ Testing is central to XP and XP has developed an approach where
the program is tested after every change has been made.
+ XP testing features:
Test-first development.
Incremental test development from scenarios.
User involvement in test development and validation.
Automated test harnesses are used to run all component tests each time that a new
release is built.
Chapter 4 Agile Software Development 22
Test-driven development
+ Writing tests before code clarifies the requirements to be
implemented.
+ Tests are written as programs rather than data so that they can
be executed automatically. The test includes a check that it has
executed correctly.
Usually relies on a testing framework such as Junit.
+ All previous and new tests are run automatically when new
functionality is added, thus checking that the new functionality
has not introduced errors.
Chapter 4 Agile Software Development 23
Customer involvement
+ The role of the customer in the testing process is to help develop
acceptance tests for the stories that are to be implemented in the next
release of the system.
+ The customer who is part of the team writes tests as development proceeds.
All new code is therefore validated to ensure that it is what the customer
needs.
+ However, people adopting the customer role have limited time available and
so cannot work full-time with the development team. They may feel that
providing the requirements was enough of a contribution and so may be
reluctant to get involved in the testing process.
Chapter 4 Agile Software Development 24
Test case description for dose checking
Chapter 4 Agile Software Development 25
Test automation
+ Test automation means that tests are written as executable
components before the task is implemented
These testing components should be stand-alone, should simulate the submission of input to be
tested and should check that the result meets the output specification. An automated test
framework (e.g. JUnit) is a system that makes it easy to write executable tests and submit a set
of tests for execution.
https://www.simplilearn.com/tutorials/java-tutorial/what-is-
junit#:~:text=JUnit%20is%20a%20unit%20testing,in%20the%20code%20is%20broken.
+ As testing is automated, there is always a set of tests that can
be quickly and easily executed
Whenever any functionality is added to the system, the tests can be run and problems that the
new code has introduced can be caught immediately.
Chapter 4 Agile Software Development 26
Pair programming
+ Pair programming involves programmers working in pairs,
developing code together.
+ This helps develop common ownership of code and spreads
knowledge across the team.
+ It serves as an informal review process as each line of code is
looked at by more than 1 person.
Chapter 4 Agile Software Development 27
Pair programming
+ In pair programming, programmers sit together at the same computer to
develop the software.
+ Pairs are created dynamically so that all team members work with each
other during the development process.
+ The sharing of knowledge that happens during pair programming is very
important as it reduces the overall risks to a project when team members
leave.
+ Pair programming is not necessarily inefficient and there is some evidence
that suggests that a pair working together is more efficient than 2
programmers working separately.
Chapter 4 Agile Software Development 28
Agile maintenance
+ Key problems are:
Lack of product documentation
Keeping customers involved in the development process
Maintaining the continuity of the development team
+ Agile development relies on the development team
knowing and understanding what has to be done.
+ For long-lifetime systems, this is a real problem as the
original developers will not always work on the system.
Chapter 4 Agile Software Development 29
Class Diagram
Chapter 4 Agile Software Development 30
Illustrate a system’s structure in a detailed way.
CLASS
DIAGRAMS
Sample footer text 3/1/20XX
31
What is a Class?
+ A general template that we use to create
specific instances or objects in the
application domain
+ Represents a kind of person, place, or
thing about which the system will need to
capture and store information
+ Abstractions that specify the attributes and
behaviors of a set of objects
Class
Chapter 4 Agile Software Development 33
A description of a group of objects all
with similar roles in the system, which
consists of: attributes and operations
REMEMBER THIS ABOUT CLASS
Chapter 4 Agile Software Development 34
PERSON
PLACE
THING
student
Form
system admin
lecturer
Admin office
University
Computer
Timetable
coordinator
Lecture clsss
Types of Classes
+ Ones found during analysis:
people, places, events, and things about
which the system will capture information
ones found in application domain
+ Ones found during design
specific objects like windows and forms that
are used to build the system
Attributes in a Class
+ Properties of the class about which
we want to capture information
+ Represents a piece of information that
is relevant to the description of the
class within the application domain
Attributes in a Class
+ Only add attributes that are primitive or
atomic types
+ Derived attribute
attributes that are calculated or derived
from other attributes
denoted by placing slash (/) before name
Operations in a Class
+ Represents the actions or functions that a
class can perform
+ Describes the actions to which the
instances of the class will be capable of
responding
+ Can be classified as a constructor, query,
or update operation
UML Representation of Class
Class Name
(ie person, place or thing)
Attributes of Class
Operations/methods of Class
Example of a Class Diagram
Video Rental System
methods
class name
Video
+rentMovie()
Customer
-CID: int
-name: String
+authenticateCustomer ()
relationship
rents
1..*
1..*
multiplicity
visibility
attributes
-cassetteID : int
-cassetteVolumeNo: int
What Is a Class Diagram?
CloseRegistrationForm
+ open()
+ close registration()
Student
+ get tuition()
+ add schedule()
+ get schedule()
+ delete schedule()
+ has pre-requisites()
Schedule
- semester
+ commit()
+ select alternate()
+ remove offering()
+ level()
+ cancel()
+ get cost()
+ delete()
+ submit()
+ save()
+ any conflicts?()
+ create with offerings()
+ update with new selections()
Professor
- name
- employeeID : UniqueId
- hireDate
- status
- discipline
- maxLoad
+ submitFinalGrade()
+ acceptCourseOffering()
+ setMaxLoad()
+ takeSabbatical()
+ teachClass()
CloseRegistrationController
+ is registration open?()
+ close registration()
Class Diagram Usage
+ When modeling the static view of a system, class
diagrams are typically used in one of three ways, to model:
The vocabulary of a system
Collaborations
A logical database schema
Example: Class Diagram
+ Is there a better way to organize class diagrams?
CloseRegistrationForm
LoginForm
Professor
BillingSystem
CloseRegistrationController
RegisterForCoursesForm
Course
CourseCatalogSystem
Student
RegistrationController
CourseOffering
Schedule
What Is an Association?
+ The semantic relationship (logic relationship)
between two or more classifiers that specifies
connections among their instances.
+ A structural relationship specifying that objects
of one thing are connected to objects of
another thing.
Course
Student Schedule
Example: What Associations Can You
Find?
: CourseOffering
: RegistrationController
: Schedule
: Student
: PrimaryScheduleOfferingInfo
8: any conflicts?( )
: RegisterForCoursesForm
2: submit schedule( )
4: submit( )
3: save( )
7: still open?( )
9: add student(Schedule)
5: is selected?( )
10: mark as enrolled in( )
6: has pre-requisites(CourseOffering)
1: submit schedule( )
: Student
What Is Multiplicity?
+ Multiplicity is the number of instances one class relates to ONE
instance of another class.
+ For each association, there are two multiplicity decisions to make,
one for each end of the association.
For each instance of Professor, many Course Offerings may be
taught.
For each instance of Course Offering, there may be either one or
zero Professor as the instructor.
Professor CourseOffering
0..1 0..*
0..1 0..*
instructor
Multiplicity Indicators
1
2..4
0..1
1..*
0..*
1
*
2, 4..6
Unspecified
Exactly One
Zero or More
Zero or One (optional value)
One or More
Specified Range
Multiple, Disjoint Ranges
Example: Multiplicity
RegisterForCoursesForm
CourseOffering
Schedule
0..4
0..*
Student
0..*
1
RegistrationController
1
1
1
1
0..1
0..1
0..1
49
Class diagrams - Multiplicity
+ When you examine an object diagram (or the underlying problem you are modeling) you can determine how many
objects are involved in each type of associations.
+ We include this information which is known as Cardinality or Multiplicity on a class diagram.
+ These document the constraints on the associations that we expect a program to enforce.
+ Cardinality is:
* - 0 .. infinity
2..4 - a restricted range
1, 3..4, 6..* - comma separated lists
<empty> - implies 1, i.e. a mandatory connection, but it’s better
to explicitly specify a 1. For all assessment, all
multiplicities must be explicitly specified
and not left as empty.
50
Class diagrams - Multiplicity
+ Consider the following order form that may be collected
during requirements.
+ It shows an order system for a business/customers
each order consists of several lines e.g.
51
Class diagrams - Multiplicity
+ The multiplicity constraints state that…
every OrderLine object must be associated with an Order
every Order must be associated with at least one, but potentially infinite
OrderLines.
52
Class diagrams - Multiplicity
+ To identify the multiplicity, you can examine an object
diagram.
53
Class diagrams - Self association
+ Self associations is when a class has an association with
itself
Associations with other objects of the same class
+ A Parent/Child self association on class Person
Associations between one object and itself.
+ A Doctor/Patient association, where a doctor treats herself.
54
Class diagrams - Self association
+ An object diagram shows the difficulty of trying to enforce mandatory self
associations.
+ The Parent cardinality should be 0..2 to reflect that fact that a person’s parents
may not be known.
55
Generalisation/Specialisation/Inheritance
+ Represents a particular ordering/taxonomy
How do you classify trees?
+ Softwood/Hardwood?
+ Deciduous/Evergreen?
Neither classification is correct or incorrect. How you
classify depends on the problem being solved.
We use generalisation to highlight common features in two
or more classes.
Common features could be
+ Attributes
+ Behaviour (more common reason for generalisation)
56
Generalisation/Specialisation/Inheritance
+ The parent class contains features common to all
subclasses
These include attributes, methods, associations
Class Attributes Methods
A a, b X, Y
B a, b, d X, Y, W
C a, b, e, f X, Y, Z
57
Class diagrams - Self association
+ A class can have an association with itself…
Self associations have subtle semantics.
The example above requires that we always record two parents for every
person in our system.
At some point we will not know someone’s parent.
58
Generalisation
+ Inheritance also extends to associations.
+ If a parent class can take part in an association, then child
classes can also take part in the same associations.
+ The object diagrams (below right) are valid.
59
Conventions for class diagrams
+ Class-Name: Each class is unique within a system.
+ Attributes: A data value held by objects in a class. Each attribute has
a value for each object instance.
+ Operations and Methods: An operation is a function or transformation
that may be applied to or by objects in the class. All objects in the
class share the same operations. A method is the implementation of
an operation for the class.
THE END
Question?
Components of Software Engineering
61
A framework for
the tasks required
to build high-
quality software.
An agreed, common
language used to
communicate all
aspects of the system,
from requirements to
final design.
Tools to make
working through the
process less difficult
for all involved
The actual software
product or system
built and put into
operation
Tools
Visual
Paradigm
Eclipse
Poseidon
Process
RUP
XP
Notation
UML
Product
eCommerc
e System
Mobile
App

More Related Content

Similar to SE-Lecture 4 - Agile Software Development.pptx

Chapter 3 software engineering.pptx
Chapter 3 software engineering.pptxChapter 3 software engineering.pptx
Chapter 3 software engineering.pptx02LabiqaIslam
 
Agile Method - Lec 1-2-3
Agile Method - Lec 1-2-3Agile Method - Lec 1-2-3
Agile Method - Lec 1-2-3Ahmed Alageed
 
Agile - Software - Development Powerpoint
Agile - Software - Development PowerpointAgile - Software - Development Powerpoint
Agile - Software - Development Powerpointjohncalebtan
 
Agile development
Agile developmentAgile development
Agile developmentJoshuaU1
 
ch3-150102101842-conversion-gate02.pdf
ch3-150102101842-conversion-gate02.pdfch3-150102101842-conversion-gate02.pdf
ch3-150102101842-conversion-gate02.pdfabdallhelkahlout1
 
LU 3 Agile SW Dev.pptx
LU 3 Agile SW Dev.pptxLU 3 Agile SW Dev.pptx
LU 3 Agile SW Dev.pptxTAISEEREISA
 
Ch3-Software Engineering 9
Ch3-Software Engineering 9Ch3-Software Engineering 9
Ch3-Software Engineering 9Ian Sommerville
 
Flavours of agile software engineering
Flavours of agile software engineeringFlavours of agile software engineering
Flavours of agile software engineeringZeeshan Masood S
 
Flavours of agile software engineering
Flavours of agile software engineeringFlavours of agile software engineering
Flavours of agile software engineeringZeeshan Masood S
 
Puppet + Diaxon: Getting to the next stage of DevOps evolution
Puppet + Diaxon: Getting to the next stage of DevOps evolutionPuppet + Diaxon: Getting to the next stage of DevOps evolution
Puppet + Diaxon: Getting to the next stage of DevOps evolutionPuppet
 
Introduction to Agile and Lean Software Development
Introduction to Agile and Lean Software DevelopmentIntroduction to Agile and Lean Software Development
Introduction to Agile and Lean Software DevelopmentThanh Nguyen
 
AGILE METHODOLOGIES PRESENTATION BY OLIVER TORRES
AGILE  METHODOLOGIES PRESENTATION BY OLIVER TORRESAGILE  METHODOLOGIES PRESENTATION BY OLIVER TORRES
AGILE METHODOLOGIES PRESENTATION BY OLIVER TORRES1410166
 
Top 50 Agile Interview Questions and Answers.pdf
Top 50 Agile Interview Questions and Answers.pdfTop 50 Agile Interview Questions and Answers.pdf
Top 50 Agile Interview Questions and Answers.pdfJazmine Brown
 
Chapter 5 Agile Software development
Chapter 5 Agile Software developmentChapter 5 Agile Software development
Chapter 5 Agile Software developmentDidarul Amin
 
Lecture - 16-19.pptx
Lecture - 16-19.pptxLecture - 16-19.pptx
Lecture - 16-19.pptxFarHana74914
 

Similar to SE-Lecture 4 - Agile Software Development.pptx (20)

Chapter 3 software engineering.pptx
Chapter 3 software engineering.pptxChapter 3 software engineering.pptx
Chapter 3 software engineering.pptx
 
Ch3
Ch3Ch3
Ch3
 
Agile Method - Lec 1-2-3
Agile Method - Lec 1-2-3Agile Method - Lec 1-2-3
Agile Method - Lec 1-2-3
 
Lecture 3 se
Lecture 3 seLecture 3 se
Lecture 3 se
 
Agile - Software - Development Powerpoint
Agile - Software - Development PowerpointAgile - Software - Development Powerpoint
Agile - Software - Development Powerpoint
 
Agile development
Agile developmentAgile development
Agile development
 
ch3-150102101842-conversion-gate02.pdf
ch3-150102101842-conversion-gate02.pdfch3-150102101842-conversion-gate02.pdf
ch3-150102101842-conversion-gate02.pdf
 
LU 3 Agile SW Dev.pptx
LU 3 Agile SW Dev.pptxLU 3 Agile SW Dev.pptx
LU 3 Agile SW Dev.pptx
 
Ch3 - Agile SW Dev
Ch3 - Agile SW DevCh3 - Agile SW Dev
Ch3 - Agile SW Dev
 
Dev ops lpi-701
Dev ops lpi-701Dev ops lpi-701
Dev ops lpi-701
 
Ch3-Software Engineering 9
Ch3-Software Engineering 9Ch3-Software Engineering 9
Ch3-Software Engineering 9
 
Flavours of agile software engineering
Flavours of agile software engineeringFlavours of agile software engineering
Flavours of agile software engineering
 
Flavours of agile software engineering
Flavours of agile software engineeringFlavours of agile software engineering
Flavours of agile software engineering
 
Ch17
Ch17Ch17
Ch17
 
Puppet + Diaxon: Getting to the next stage of DevOps evolution
Puppet + Diaxon: Getting to the next stage of DevOps evolutionPuppet + Diaxon: Getting to the next stage of DevOps evolution
Puppet + Diaxon: Getting to the next stage of DevOps evolution
 
Introduction to Agile and Lean Software Development
Introduction to Agile and Lean Software DevelopmentIntroduction to Agile and Lean Software Development
Introduction to Agile and Lean Software Development
 
AGILE METHODOLOGIES PRESENTATION BY OLIVER TORRES
AGILE  METHODOLOGIES PRESENTATION BY OLIVER TORRESAGILE  METHODOLOGIES PRESENTATION BY OLIVER TORRES
AGILE METHODOLOGIES PRESENTATION BY OLIVER TORRES
 
Top 50 Agile Interview Questions and Answers.pdf
Top 50 Agile Interview Questions and Answers.pdfTop 50 Agile Interview Questions and Answers.pdf
Top 50 Agile Interview Questions and Answers.pdf
 
Chapter 5 Agile Software development
Chapter 5 Agile Software developmentChapter 5 Agile Software development
Chapter 5 Agile Software development
 
Lecture - 16-19.pptx
Lecture - 16-19.pptxLecture - 16-19.pptx
Lecture - 16-19.pptx
 

More from TangZhiSiang

SE - Lecture 13 - Software Evolution and Tech Trends.pptx
SE - Lecture 13 - Software Evolution and Tech Trends.pptxSE - Lecture 13 - Software Evolution and Tech Trends.pptx
SE - Lecture 13 - Software Evolution and Tech Trends.pptxTangZhiSiang
 
SE - Lecture 12 - Software Project Management (1).pptx
SE - Lecture 12 - Software Project Management (1).pptxSE - Lecture 12 - Software Project Management (1).pptx
SE - Lecture 12 - Software Project Management (1).pptxTangZhiSiang
 
SE - Lecture 11 - Software Project Estimation.pptx
SE - Lecture 11 - Software Project Estimation.pptxSE - Lecture 11 - Software Project Estimation.pptx
SE - Lecture 11 - Software Project Estimation.pptxTangZhiSiang
 
SE - Lecture 9 n 10 Intro Robotic Process Automation.pptx
SE - Lecture 9 n 10 Intro Robotic Process Automation.pptxSE - Lecture 9 n 10 Intro Robotic Process Automation.pptx
SE - Lecture 9 n 10 Intro Robotic Process Automation.pptxTangZhiSiang
 
SE - Lecture 8 - Software Testing State Diagram.pptx
SE - Lecture 8 - Software Testing  State Diagram.pptxSE - Lecture 8 - Software Testing  State Diagram.pptx
SE - Lecture 8 - Software Testing State Diagram.pptxTangZhiSiang
 
SE - Lecture 7 - Software Quality Reliability Mgmt - in lecture.pptx
SE - Lecture 7 - Software Quality  Reliability Mgmt - in lecture.pptxSE - Lecture 7 - Software Quality  Reliability Mgmt - in lecture.pptx
SE - Lecture 7 - Software Quality Reliability Mgmt - in lecture.pptxTangZhiSiang
 
SE - Lecture 6 - Software Design n Construction.pptx
SE - Lecture 6 - Software Design n Construction.pptxSE - Lecture 6 - Software Design n Construction.pptx
SE - Lecture 6 - Software Design n Construction.pptxTangZhiSiang
 
SE - Lecture 5 - Requirements Engineering.pptx
SE - Lecture 5 - Requirements Engineering.pptxSE - Lecture 5 - Requirements Engineering.pptx
SE - Lecture 5 - Requirements Engineering.pptxTangZhiSiang
 
SE - Lecture 3 - Software Tools n Environment.pptx
SE - Lecture 3 - Software Tools n Environment.pptxSE - Lecture 3 - Software Tools n Environment.pptx
SE - Lecture 3 - Software Tools n Environment.pptxTangZhiSiang
 
SE-Lecture 2A-Requirements.pptx
SE-Lecture 2A-Requirements.pptxSE-Lecture 2A-Requirements.pptx
SE-Lecture 2A-Requirements.pptxTangZhiSiang
 
SE - Lecture 2 - SW Devl Process.pptx
SE - Lecture 2 - SW Devl Process.pptxSE - Lecture 2 - SW Devl Process.pptx
SE - Lecture 2 - SW Devl Process.pptxTangZhiSiang
 
SE - Lecture 1 - Introduction to S Engineering.pptx
SE - Lecture 1 - Introduction to S Engineering.pptxSE - Lecture 1 - Introduction to S Engineering.pptx
SE - Lecture 1 - Introduction to S Engineering.pptxTangZhiSiang
 

More from TangZhiSiang (12)

SE - Lecture 13 - Software Evolution and Tech Trends.pptx
SE - Lecture 13 - Software Evolution and Tech Trends.pptxSE - Lecture 13 - Software Evolution and Tech Trends.pptx
SE - Lecture 13 - Software Evolution and Tech Trends.pptx
 
SE - Lecture 12 - Software Project Management (1).pptx
SE - Lecture 12 - Software Project Management (1).pptxSE - Lecture 12 - Software Project Management (1).pptx
SE - Lecture 12 - Software Project Management (1).pptx
 
SE - Lecture 11 - Software Project Estimation.pptx
SE - Lecture 11 - Software Project Estimation.pptxSE - Lecture 11 - Software Project Estimation.pptx
SE - Lecture 11 - Software Project Estimation.pptx
 
SE - Lecture 9 n 10 Intro Robotic Process Automation.pptx
SE - Lecture 9 n 10 Intro Robotic Process Automation.pptxSE - Lecture 9 n 10 Intro Robotic Process Automation.pptx
SE - Lecture 9 n 10 Intro Robotic Process Automation.pptx
 
SE - Lecture 8 - Software Testing State Diagram.pptx
SE - Lecture 8 - Software Testing  State Diagram.pptxSE - Lecture 8 - Software Testing  State Diagram.pptx
SE - Lecture 8 - Software Testing State Diagram.pptx
 
SE - Lecture 7 - Software Quality Reliability Mgmt - in lecture.pptx
SE - Lecture 7 - Software Quality  Reliability Mgmt - in lecture.pptxSE - Lecture 7 - Software Quality  Reliability Mgmt - in lecture.pptx
SE - Lecture 7 - Software Quality Reliability Mgmt - in lecture.pptx
 
SE - Lecture 6 - Software Design n Construction.pptx
SE - Lecture 6 - Software Design n Construction.pptxSE - Lecture 6 - Software Design n Construction.pptx
SE - Lecture 6 - Software Design n Construction.pptx
 
SE - Lecture 5 - Requirements Engineering.pptx
SE - Lecture 5 - Requirements Engineering.pptxSE - Lecture 5 - Requirements Engineering.pptx
SE - Lecture 5 - Requirements Engineering.pptx
 
SE - Lecture 3 - Software Tools n Environment.pptx
SE - Lecture 3 - Software Tools n Environment.pptxSE - Lecture 3 - Software Tools n Environment.pptx
SE - Lecture 3 - Software Tools n Environment.pptx
 
SE-Lecture 2A-Requirements.pptx
SE-Lecture 2A-Requirements.pptxSE-Lecture 2A-Requirements.pptx
SE-Lecture 2A-Requirements.pptx
 
SE - Lecture 2 - SW Devl Process.pptx
SE - Lecture 2 - SW Devl Process.pptxSE - Lecture 2 - SW Devl Process.pptx
SE - Lecture 2 - SW Devl Process.pptx
 
SE - Lecture 1 - Introduction to S Engineering.pptx
SE - Lecture 1 - Introduction to S Engineering.pptxSE - Lecture 1 - Introduction to S Engineering.pptx
SE - Lecture 1 - Introduction to S Engineering.pptx
 

Recently uploaded

Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsKarinaGenton
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...M56BOOKSTORE PRODUCT/SERVICE
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docxPoojaSen20
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 

Recently uploaded (20)

Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its Characteristics
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docx
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 

SE-Lecture 4 - Agile Software Development.pptx

  • 1. ITS 66404 Principles of Software Engineering Nur Haifa Chapter 4- Agile Software Development
  • 2. Agenda Plan Driven & Agile Agile Methods & Principles Agile Developmental Techniques Extreme Programming (XP) Class diagram Chapter 1 – Intro to Software Engineering 2
  • 3. Rapid software development + Rapid development and delivery is now often the most important requirement for software systems Businesses operate in a fast –changing requirement and it is practically impossible to produce a set of stable software requirements Software has to evolve quickly to reflect changing business needs. + Plan-driven development is essential for some types of system but does not meet these business needs. + Agile development methods emerged in the late 1990s whose aim was to radically reduce the delivery time for working software systems Chapter 4 Agile Software Development 3
  • 4. Agile development + Program specification, design and implementation are inter-leaved + The system is developed as a series of versions or increments with stakeholders involved in version specification and evaluation + Frequent delivery of new versions for evaluation + Extensive tool support (e.g. automated testing tools) used to support development. + Minimal documentation – focus on working code Chapter 4 Agile Software Development 4
  • 5. Plan-driven and agile development Chapter 4 Agile Software Development 5
  • 6. Plan-driven and agile development + Plan-driven development A plan-driven approach to software engineering is based around separate development stages with the outputs to be produced at each of these stages planned in advance. Not necessarily waterfall model – plan-driven, incremental development is possible Iteration occurs within activities. + Agile development Specification, design, implementation and testing are inter-leaved and the outputs from the development process are decided through a process of negotiation during the software development process. Chapter 4 Agile Software Development 6
  • 7. Agile methods Chapter 4 Agile Software Development 7
  • 8. Agile methods + Dissatisfaction with the overheads involved in software design methods of the 1980s and 1990s led to the creation of agile methods. These methods: Focus on the code rather than the design Are based on an iterative approach to software development Are intended to deliver working software quickly and evolve this quickly to meet changing requirements. + The aim of agile methods is to reduce overheads in the software process (e.g. by limiting documentation) and to be able to respond quickly to changing requirements without excessive rework. Chapter 4 Agile Software Development 8
  • 9. Agile manifesto + We are uncovering better ways of developing software by doing it and helping others do it. Through this work we have come to value: Individuals and interactions over processes and tools Working software over comprehensive documentation Customer collaboration over contract negotiation Responding to change over following a plan + That is, while there is value in the items on the right, we value the items on the left more. Chapter 4 Agile Software Development 9
  • 10. The principles of agile methods Chapter 4 Agile Software Development 10 Principle Description Customer involvement Customers should be closely involved throughout the development process. Their role is provide and prioritize new system requirements and to evaluate the iterations of the system. Incremental delivery The software is developed in increments with the customer specifying the requirements to be included in each increment. People not process The skills of the development team should be recognized and exploited. Team members should be left to develop their own ways of working without prescriptive processes. Embrace change Expect the system requirements to change and so design the system to accommodate these changes. Maintain simplicity Focus on simplicity in both the software being developed and in the development process. Wherever possible, actively work to eliminate complexity from the system.
  • 11. Agile method applicability + Product development where a software company is developing a small or medium-sized product for sale. Virtually all software products and apps are now developed using an agile approach + Custom system development within an organization, where there is a clear commitment from the customer to become involved in the development process and where there are few external rules and regulations that affect the software. Chapter 4 Agile Software Development 11
  • 12. Agile development techniques Chapter 4 Agile Software Development 12
  • 13. Extreme programming + A very influential agile method, developed in the late 1990s, that introduced a range of agile development techniques. + Extreme Programming (XP) takes an ‘extreme’ approach to iterative development. New versions may be built several times per day; Increments are delivered to customers every 2 weeks; All tests must be run for every build and the build is only accepted if tests run successfully. Chapter 4 Agile Software Development 13
  • 14. The extreme programming release cycle Chapter 4 Agile Software Development 14
  • 15. Extreme programming practices (a) Chapter 4 Agile Software Development 15 Principle or practice Description Incremental planning Requirements are recorded on story cards and the stories to be included in a release are determined by the time available and their relative priority. The developers break these stories into development ‘Tasks’. Small releases The minimal useful set of functionality that provides business value is developed first. Releases of the system are frequent and incrementally add functionality to the first release. Simple design Enough design is carried out to meet the current requirements and no more. Test-first development An automated unit test framework is used to write tests for a new piece of functionality before that functionality itself is implemented. Refactoring All developers are expected to refactor the code continuously as soon as possible code improvements are found. This keeps the code simple and maintainable.
  • 16. Extreme programming practices (b) Chapter 4 Agile Software Development 16 Pair programming Developers work in pairs, checking each other’s work and providing the support to always do a good job. Collective ownership The pairs of developers work on all areas of the system, so that no islands of expertise develop and all the developers take responsibility for all of the code. Anyone can change anything. Continuous integration As soon as the work on a task is complete, it is integrated into the whole system. After any such integration, all the unit tests in the system must pass. Sustainable pace Large amounts of overtime are not considered acceptable as the net effect is often to reduce code quality and medium term productivity On-site customer A representative of the end-user of the system (the customer) should be available full time for the use of the XP team. In an extreme programming process, the customer is a member of the development team and is responsible for bringing system requirements to the team for implementation.
  • 17. XP and agile principles + Incremental development is supported through small, frequent system releases. + Customer involvement means full-time customer engagement with the team. + People not process through pair programming, collective ownership and a process that avoids long working hours. + Change supported through regular system releases. + Maintaining simplicity through constant refactoring of code. Chapter 4 Agile Software Development 17
  • 18. Influential XP practices + Extreme programming has a technical focus and is not easy to integrate with management practice in most organizations. + Consequently, while agile development uses practices from XP, the method as originally defined is not widely used. + Key practices User stories for specification Test-first development Pair programming Chapter 4 Agile Software Development 18
  • 19. User stories for requirements + In XP, a customer or user is part of the XP team and is responsible for making decisions on requirements. + User requirements are expressed as user stories or scenarios. + These are written on cards and the development team break them down into implementation tasks. These tasks are the basis of schedule and cost estimates. + The customer chooses the stories for inclusion in the next release based on their priorities and the schedule estimates. Chapter 4 Agile Software Development 19
  • 20. A ‘prescribing medication’ story Chapter 4 Agile Software Development 20
  • 21. Examples of task cards for prescribing medication Chapter 4 Agile Software Development 21
  • 22. Test-first development + Testing is central to XP and XP has developed an approach where the program is tested after every change has been made. + XP testing features: Test-first development. Incremental test development from scenarios. User involvement in test development and validation. Automated test harnesses are used to run all component tests each time that a new release is built. Chapter 4 Agile Software Development 22
  • 23. Test-driven development + Writing tests before code clarifies the requirements to be implemented. + Tests are written as programs rather than data so that they can be executed automatically. The test includes a check that it has executed correctly. Usually relies on a testing framework such as Junit. + All previous and new tests are run automatically when new functionality is added, thus checking that the new functionality has not introduced errors. Chapter 4 Agile Software Development 23
  • 24. Customer involvement + The role of the customer in the testing process is to help develop acceptance tests for the stories that are to be implemented in the next release of the system. + The customer who is part of the team writes tests as development proceeds. All new code is therefore validated to ensure that it is what the customer needs. + However, people adopting the customer role have limited time available and so cannot work full-time with the development team. They may feel that providing the requirements was enough of a contribution and so may be reluctant to get involved in the testing process. Chapter 4 Agile Software Development 24
  • 25. Test case description for dose checking Chapter 4 Agile Software Development 25
  • 26. Test automation + Test automation means that tests are written as executable components before the task is implemented These testing components should be stand-alone, should simulate the submission of input to be tested and should check that the result meets the output specification. An automated test framework (e.g. JUnit) is a system that makes it easy to write executable tests and submit a set of tests for execution. https://www.simplilearn.com/tutorials/java-tutorial/what-is- junit#:~:text=JUnit%20is%20a%20unit%20testing,in%20the%20code%20is%20broken. + As testing is automated, there is always a set of tests that can be quickly and easily executed Whenever any functionality is added to the system, the tests can be run and problems that the new code has introduced can be caught immediately. Chapter 4 Agile Software Development 26
  • 27. Pair programming + Pair programming involves programmers working in pairs, developing code together. + This helps develop common ownership of code and spreads knowledge across the team. + It serves as an informal review process as each line of code is looked at by more than 1 person. Chapter 4 Agile Software Development 27
  • 28. Pair programming + In pair programming, programmers sit together at the same computer to develop the software. + Pairs are created dynamically so that all team members work with each other during the development process. + The sharing of knowledge that happens during pair programming is very important as it reduces the overall risks to a project when team members leave. + Pair programming is not necessarily inefficient and there is some evidence that suggests that a pair working together is more efficient than 2 programmers working separately. Chapter 4 Agile Software Development 28
  • 29. Agile maintenance + Key problems are: Lack of product documentation Keeping customers involved in the development process Maintaining the continuity of the development team + Agile development relies on the development team knowing and understanding what has to be done. + For long-lifetime systems, this is a real problem as the original developers will not always work on the system. Chapter 4 Agile Software Development 29
  • 30. Class Diagram Chapter 4 Agile Software Development 30 Illustrate a system’s structure in a detailed way.
  • 32. What is a Class? + A general template that we use to create specific instances or objects in the application domain + Represents a kind of person, place, or thing about which the system will need to capture and store information + Abstractions that specify the attributes and behaviors of a set of objects
  • 33. Class Chapter 4 Agile Software Development 33 A description of a group of objects all with similar roles in the system, which consists of: attributes and operations
  • 34. REMEMBER THIS ABOUT CLASS Chapter 4 Agile Software Development 34 PERSON PLACE THING student Form system admin lecturer Admin office University Computer Timetable coordinator Lecture clsss
  • 35. Types of Classes + Ones found during analysis: people, places, events, and things about which the system will capture information ones found in application domain + Ones found during design specific objects like windows and forms that are used to build the system
  • 36. Attributes in a Class + Properties of the class about which we want to capture information + Represents a piece of information that is relevant to the description of the class within the application domain
  • 37. Attributes in a Class + Only add attributes that are primitive or atomic types + Derived attribute attributes that are calculated or derived from other attributes denoted by placing slash (/) before name
  • 38. Operations in a Class + Represents the actions or functions that a class can perform + Describes the actions to which the instances of the class will be capable of responding + Can be classified as a constructor, query, or update operation
  • 39. UML Representation of Class Class Name (ie person, place or thing) Attributes of Class Operations/methods of Class
  • 40. Example of a Class Diagram Video Rental System methods class name Video +rentMovie() Customer -CID: int -name: String +authenticateCustomer () relationship rents 1..* 1..* multiplicity visibility attributes -cassetteID : int -cassetteVolumeNo: int
  • 41. What Is a Class Diagram? CloseRegistrationForm + open() + close registration() Student + get tuition() + add schedule() + get schedule() + delete schedule() + has pre-requisites() Schedule - semester + commit() + select alternate() + remove offering() + level() + cancel() + get cost() + delete() + submit() + save() + any conflicts?() + create with offerings() + update with new selections() Professor - name - employeeID : UniqueId - hireDate - status - discipline - maxLoad + submitFinalGrade() + acceptCourseOffering() + setMaxLoad() + takeSabbatical() + teachClass() CloseRegistrationController + is registration open?() + close registration()
  • 42. Class Diagram Usage + When modeling the static view of a system, class diagrams are typically used in one of three ways, to model: The vocabulary of a system Collaborations A logical database schema
  • 43. Example: Class Diagram + Is there a better way to organize class diagrams? CloseRegistrationForm LoginForm Professor BillingSystem CloseRegistrationController RegisterForCoursesForm Course CourseCatalogSystem Student RegistrationController CourseOffering Schedule
  • 44. What Is an Association? + The semantic relationship (logic relationship) between two or more classifiers that specifies connections among their instances. + A structural relationship specifying that objects of one thing are connected to objects of another thing. Course Student Schedule
  • 45. Example: What Associations Can You Find? : CourseOffering : RegistrationController : Schedule : Student : PrimaryScheduleOfferingInfo 8: any conflicts?( ) : RegisterForCoursesForm 2: submit schedule( ) 4: submit( ) 3: save( ) 7: still open?( ) 9: add student(Schedule) 5: is selected?( ) 10: mark as enrolled in( ) 6: has pre-requisites(CourseOffering) 1: submit schedule( ) : Student
  • 46. What Is Multiplicity? + Multiplicity is the number of instances one class relates to ONE instance of another class. + For each association, there are two multiplicity decisions to make, one for each end of the association. For each instance of Professor, many Course Offerings may be taught. For each instance of Course Offering, there may be either one or zero Professor as the instructor. Professor CourseOffering 0..1 0..* 0..1 0..* instructor
  • 47. Multiplicity Indicators 1 2..4 0..1 1..* 0..* 1 * 2, 4..6 Unspecified Exactly One Zero or More Zero or One (optional value) One or More Specified Range Multiple, Disjoint Ranges
  • 49. 49 Class diagrams - Multiplicity + When you examine an object diagram (or the underlying problem you are modeling) you can determine how many objects are involved in each type of associations. + We include this information which is known as Cardinality or Multiplicity on a class diagram. + These document the constraints on the associations that we expect a program to enforce. + Cardinality is: * - 0 .. infinity 2..4 - a restricted range 1, 3..4, 6..* - comma separated lists <empty> - implies 1, i.e. a mandatory connection, but it’s better to explicitly specify a 1. For all assessment, all multiplicities must be explicitly specified and not left as empty.
  • 50. 50 Class diagrams - Multiplicity + Consider the following order form that may be collected during requirements. + It shows an order system for a business/customers each order consists of several lines e.g.
  • 51. 51 Class diagrams - Multiplicity + The multiplicity constraints state that… every OrderLine object must be associated with an Order every Order must be associated with at least one, but potentially infinite OrderLines.
  • 52. 52 Class diagrams - Multiplicity + To identify the multiplicity, you can examine an object diagram.
  • 53. 53 Class diagrams - Self association + Self associations is when a class has an association with itself Associations with other objects of the same class + A Parent/Child self association on class Person Associations between one object and itself. + A Doctor/Patient association, where a doctor treats herself.
  • 54. 54 Class diagrams - Self association + An object diagram shows the difficulty of trying to enforce mandatory self associations. + The Parent cardinality should be 0..2 to reflect that fact that a person’s parents may not be known.
  • 55. 55 Generalisation/Specialisation/Inheritance + Represents a particular ordering/taxonomy How do you classify trees? + Softwood/Hardwood? + Deciduous/Evergreen? Neither classification is correct or incorrect. How you classify depends on the problem being solved. We use generalisation to highlight common features in two or more classes. Common features could be + Attributes + Behaviour (more common reason for generalisation)
  • 56. 56 Generalisation/Specialisation/Inheritance + The parent class contains features common to all subclasses These include attributes, methods, associations Class Attributes Methods A a, b X, Y B a, b, d X, Y, W C a, b, e, f X, Y, Z
  • 57. 57 Class diagrams - Self association + A class can have an association with itself… Self associations have subtle semantics. The example above requires that we always record two parents for every person in our system. At some point we will not know someone’s parent.
  • 58. 58 Generalisation + Inheritance also extends to associations. + If a parent class can take part in an association, then child classes can also take part in the same associations. + The object diagrams (below right) are valid.
  • 59. 59 Conventions for class diagrams + Class-Name: Each class is unique within a system. + Attributes: A data value held by objects in a class. Each attribute has a value for each object instance. + Operations and Methods: An operation is a function or transformation that may be applied to or by objects in the class. All objects in the class share the same operations. A method is the implementation of an operation for the class.
  • 61. Components of Software Engineering 61 A framework for the tasks required to build high- quality software. An agreed, common language used to communicate all aspects of the system, from requirements to final design. Tools to make working through the process less difficult for all involved The actual software product or system built and put into operation Tools Visual Paradigm Eclipse Poseidon Process RUP XP Notation UML Product eCommerc e System Mobile App