Introduction
•	Analysis
•	Design
•	Artifacts
Preface
•	Object-oriented (OO) programming vs. OO analysis and design
•	Does a program need to be written in an OO language to use OO analysis and design?
•	Goal: well-designed, robust, maintainable software (true for OO and non-OO)
Preface
•	UML help software engineers communicate
•	Does knowing UML mean you know OO analysis and design?
•	Patterns provide solutions for standard design problems
•	You still need to decide whether a pattern applies to your problem
Analysis
•	Focus on problems and requirements
•	Does not define solution
•	Ex: requirements analysis : what should the product do?
•	Ex: data analysis : what data needs to be represented?
Design
•	Conceptual solution
•	Must be able to implement this
•	Still not the code
•	Define the modules, data structures, algorithms, outline components
•	Ex: Compiler -- scan, parse, generate code, link -- include parse trees, symbol table
•	Ex: Relational database -- tables, attributes (include type of attribute, whether it is prime, whether it can be null)
Object-oriented analysis and design
•	Analysis -- what are the objects in the problem domain
•	Ex: operating system object include processes with priorities
•	Design -- what classes to define, data and methods for each class
•	Ex: Process class, priority queue class
•	Main goal of text: help you learn how to assign responsibilities to objects
Analysis and artifacts
•	Artifact -- produced as part of software process
•	Use cases -- "written stories" (Larman)
•	Define how software will be used
•	"story" -- complete use
•	Ex: User inserts ATM card, enters PIN. If verified, user selects "Fast Cash". If enough funds and enough cash in machine, account balance is updated and cash is dispensed. For any failure along the way, return ATM card, logout user.
•	What's "missing"?
Artifacts -- Domain Model
•	Objects related to the problem domain
•	Ex: Dice Game: Player rolls dice. 7 wins, other results lose
•	Player plays DiceGame (1-to-1)
•	Player rolls Die (1-to-2)
•	Player attributes: name
•	DiceGame includes Die (1-to-2)
•	Die attributes: faceValue
Domain Model vs. Implementation
•	How would you implement a program to satisfy the dice game?
•	Would you want a class for each object?
•	Implementation comparison: "rolls" vs. "includes" vs. "plays"?
Design artifact: Sequence diagram
•	How objects work together
•	Ex: DiceGame's play() method (see diagram)
•	calls roll() method in first Die, then getFaceValue()
•	calls roll() method in 2nd Die, then getFaceValue()
DiceGame discussion
•	Notice that DiceGame object rolls the dice, not the Player -- why?
•	Why use 2 Die objects?
•	What about 1 Dice object to model 2 dice? -- Would this option satisfy the use case?
•	What about 1 die with possible results 2-to-12?
•	Why separate roll() and getFaceValue() methods?
•	Is Player object needed?