2 Workflows in the Unified Process RequirementsAnalysisDesignImplementationTest
3 Analysis WorkflowAnalyze and refine requirements for detailed understandingWritten in language of developer – more precise.Specifications produced are essential for testing and maintenanceOO Architectural Design: UML diagrams and descriptions are given to client for confirmation (Use Cases and Class Diagrams)Detailed planning and estimating: Software Project Management Plan with deliverables, milestones and budgetGOAL: Spell out what the project is to do
4 Functional ModelingPresent scenarios of all the use cases
5 Use CasesModel interaction between the software product and the users of the software (actors)Figure 10.1
6 Use Case DiagramsA use case is description of a scenario in which the system to be developed interacts with the users of the systemCreate several use case diagrams with annotated descriptions to represent all of the acceptance criteria listed in the specification report.Each Use Case diagram should be label with the corresponding Acceptance Criteria Number(s).
7 Use Case: Withdraw Money UC1Reference: AC101Banking Software ProductWithdraw MoneyCustomerATM
8 Use Case Description: Withdraw Money UC1Reference: AC101Brief Description:The Withdraw Money use case enables a customer to withdraw money.Step by Step Description:The Customer inputs ATM card that contains the account number.The customer inputs pin number.The software product responds with the current balance in the account.The customer enters the withdrawal amount.The software product produces the desired cash.The software product updates the account balance.
9 Scenarios Normal Scenario Exception Scenario Users interact with systems as plannedNormal flow of eventsException ScenarioDesigning for user errorsExceptional flow of events
10 Object-Oriented Programming Instead of writing a program in one long file, separate code into classes each with their own data and logic.AbstractionPolymorphismInheritanceEncapsulation
11 Object-Oriented Programming Abstraction:Focus on the essential qualities rather than the details.This is what we are doing when we are making a class.We don’t create a separate bank account class for Joe and Mary -- just one bank account class that contains common attributes (name, address, account number)
12 Object-Oriented Programming Encapsulation:Taking attributes and behaviors and bundling them together.Data hiding: We are able to make things private and users to use our public methods. Attributes can’t be directly changed from outside object.Reduce dependencies on different parts of the application. An object is responsible for changing itself.
14 Object-Oriented Programming Polymorphism: “Many forms”A SavingsAccount subclass may override as super class, BankAccount withdraw method.When you create an array of BankAccount objects, you determine at runtime which method is called.BankAccount+ name+ balance+ accountNumber+widthraw()CheckingAccount+ lastCheckNumSavings Account+ interest+widthraw()
15 Object-Oriented Programming Polymorphism:BankAccount myAccounts = new BankAccount;myAccounts = new SavingsAccount();myAccounts = new CheckingAccount();for (myAccounts: BankAccount)acct.withdraw(50);
16 Entity class modeling Determine entity classes and attributes Determine interrelationship and interaction between the classesCreate class diagram
17 Class Diagrams Model the composition of classes Static perspective of the systemObjective: portray the elements that are a part of the class and the essential relationships that exist between classes
18 Class DiagramsA class may be portrayed in various class diagrams with varying levels of detailAnalysis Phase: specify the class nameDesign Phase: specify the class name, attributes and methods
19 UML Class DiagramModels the classes needed and relationship associations, inheritance, compositions and dependencies
20 Classes Chapter 12 describes 3 types of classes Entity Class Models Information that is long lived.Boundary ClassModels the interaction between the software product and actors (input and output)Control ClassModels complex computations and algorithms
21 Identifying ClassesCreate a list of all nouns from the requirement specification
22 Is This a Class? Retained information Potential classes require information to be stored about themAre there certain attributes that must be stored in the system?Class System User – Does the system allow for multiple concurrent users or does it maintain a history of individual user?
23 Is This a Class? Needed Services Does the potential class have a set of operations that provide services to other classes?Is there a set of information to be manipulated or retrieved by methods in order to protect the integrity of this data?Game class: In a game you allow each user to inquire the current score of opposing player, amount of time elapsed.
24 Is This a Class? Multiple Attributes Does the potential class have more than a single attribute?If not, this noun should be an attribute of another classBalance is more likely an attributeAccount is more likely a class
25 Is This a Class? Common Attributes Do all instances of this noun share the same attributes?If not, this noun should probably not be a class
26 Is This a Class? Common operations Do the operations defined for this noun apply to all other instances of the noun?Customer class has a common set of a methods like getName, getAddress
27 Is This a Class? Essential Requirements Are there external entities known to the system that produce or consume informationA Database class, has a set of easy to learn methods so developer would not need to be familiar with the technical details utilizing the database.The type of underlying database could be switched and the methods of the Database class need not change
28 Relationships Between Classes AssociationLabeled relationship between classes
29 Relationships Between Classes DependencyOne class depends on anotherChanging one class might require the second class also change.Dashed arrow
30 Relationships Between Classes GeneralizationInheritance: a class is the parent of another
31 Relationships Between Classes AggregationComposition: a class is made up of another
32 UML Class DiagramModels the classes needed and relationship associations, inheritance, compositions and dependencies