Introduction To OOAD
Introduction To OOAD
Textbook:
<Applying UML and Patterns, An Introduction to Object-Oriented Analysis and Design and Iterative Development>, Criag Larman,3nd Ed., 2006
Reference:
[1] <Applying Use Case Driven Object Modeling with UML, an Annotated ECommerce Example>, Doug Rosenberg, 2001, < >
[2] <Object Oritented Software Engineering Using UML,Patterns, and Java>, Bernd Bruegge, 2010, < >
[3] <Use Case Driven Object Modeling with UML/Theory and Practice>,Doug Rosenberg and Matt Stephens, Apress Jan 2007
Software Engineering
Theory (Abstract)
OOAD
Implementation (Concrete)
Lab Project
An OOAD for a library management system for our school Finish the project in a group of two people Functional requirements Record new library book Borrow a book Return a book Search a book Deliverablesa MS Word design document, and a zipped eclipse project file 1. File Name: OS_OOAD_GroupLeadName.zip 2. Use JUDE tool to draw UML diagramscopy & paste into a word doc. Team member names and responsibilities Use case diagram, use case (text) Class diagram (domain model & design class diagram) Sequence diagram State chat diagram 3. A zipped eclipse project file Deadline: 28-JUN-2013. Email the project file to: [email protected], or [email protected]
5
Patterns
UML notation
Requirements analysis
What is OOAD?
The essence of OOAD is to consider a problem domain and logical solution from the perspective of objects (things, concepts, or entities)
OO Analysis emphasizes finding and describing the objects or concepts- in the problem domain
OO Design emphasizes defining logical software objects (things, concepts, or entities) that have attributes and methods
OO Analysis
OOA requires domain knowledge and OOA expertise
Hence, there is a need for both a domain expert and an OO analysis expert Domain expert is always right about decisions relating to problem domain If you are lucky, these two experts are the same person
OOA identifies
Concepts in the problem domain Relationships among those concepts Attributes of those concepts
OO Design
OOD defines a logical software solution for the problem
Solution is defined based on findings of OOA phase It includes definition of class methods that represent a logical software solution New concepts, attributes or relationship among concepts are often discovered during design phase. They are iteratively reflected back into analysis phase
O-O A&D
Structured A&D
System
Catalog
Librarian
Book
Library
Record Loans
Add Resource
Report Fines
OOAD
Larman
Requirements Analysis
Use Cases
Conceptual Model
System Behavior
Collaboration Diagrams
Requirements Study
OO Analysis
OO Design
Construction
public class Plane { private String tailNumber; public List getFlightHistory() {...} }
We decompose the problem by identifying things and concepts, the attributes, and their associations; the result is a model of the problem domain which we are dealing with.
created to explore difficult parts of the problem or solution space, exploiting the power of visual languages.
UML as blueprint
Relatively detailed design diagrams used either for
1. reverse engineering to visualize and better understanding existing code in UML diagrams 2. code generation (forward engineering).
UML Diagrams
Use Case Diagrams Class Diagrams Interaction Diagrams State Diagrams Activity Diagrams Package Diagrams Deployment Diagrams
Nodes: Links: Nodes: Links: Nodes: Links: Nodes: Links: Nodes: Links: Nodes: Links: Nodes: Links: Actor, Use (case) Involvement, Extension, Inclusion, Generalization Class Association, Generalization Object Message, Lifeline State, Sub-State Transition Activity Guard, Synchronization Package Dependency Processor, Node Dependency
UML Diagrams
w flo k or s
Use Case
sc en a
rio s
Activity
s r-cla Inte
structures
Interaction
Class
ing tur c u str
Package
State
ors h avi s be
Introduction
Iterative development lies at the heart of how OOAD is best practiced Agile Modeling are key to applying the UML in an effective way
sequential or waterfall lifecycle promoted big upfront speculative requirements and design steps before programming.
Requirements Design Implementation & Test & Integration & More Design Final Integration & System Test Time
Requirements Design Implementation & Test & Integration & More Design Final Integration & System Test
Feedback from iteration N leads to refinement and adaptation of the requirements and design in iteration N+1.
3 weeks (for example) Iterations are fixed in length, or timeboxed. The system grows incrementally.
Requirements change
...
20
requirements workshops Imagine this will ultimately be a 20iteration project. In evolutionary iterative development, the requirements evolve over a set of the early iterations, through a series of requirements workshops (for example). Perhaps after four iterations and workshops, 90% of the requirements are defined and refined. Nevertheless, only 10% of the software is built.
requirements
requirements
software
software
90%
90%
50% 20% 2% Iteration 1 30% 5% Iteration 2 a 3-week iteration 8% Iteration 3 10% Iteration 4 20% Iteration 5
week 1 M T W Th F
week 2 M T W Th F
week 3 M T W Th F
final check-in and codefreeze for the iteration baseline Use-case modeling during the workshop
inc.
elaboration
construction
transition
release A stable executable subset of the final product. The end of each iteration is a minor release.
final production release At this point, the system is released for production use.
Iteration 1 Iteration 2 Introduces just those analysis and design Additional analysis and skills related to design skills introduced. iteration one. Iteration 3 Likewise.
Overview
Inception
Object-Oriented Analysis
Object-Oriented Design
Topics such as OO analysis and OO design are incrementally introduced in iteration 1, 2, and 3.
minor focus
User Interface
explore how to connect to other layers
primary focus of case studies Sale Payment explore how to design objects
Logging ...
secondary focus
Increasingly must support multiple and varied terminals and interfaces A commercial POS system that will serve different clients with disparate needs in terms of business rule processing