Presentation is loading. Please wait.

Presentation is loading. Please wait.

Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview Introduction to Domain Analysis.

Similar presentations


Presentation on theme: "Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview Introduction to Domain Analysis."— Presentation transcript:

1 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview Introduction to Domain Analysis

2 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview 2 Chapter 12 Domain Analysis

3 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview Introduction Overview of Analysis Domain Class Model Domain State Model Domain Interaction Model Topic Covered

4 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview During analysis, we build models and begin to understand the requirements deeply. To build a domain model, you must interview business expert, examine requirements statements, and study related requirements. Successful analysis model states what must be done, without restricting how it is done and avoid implementation decisions. Introduction

5 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview Overview of Analysis

6 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview As fig. shows, analysis begin with problem statement during system conception. Problem statement can be incomplete or informal but analysis makes it more precise and expose ambiguities. You must understand real-world system described by the problem statement, and abstract its essential features into a model. Sequence can be problem statement  build model (Domain)  build model(application). Overview of Analysis

7 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview Analysis model addresses the three aspects of objects. – Static structure of objects (Class Model) – Interaction among objects ( Interaction Model) – Life-cycle histories of objects (State Model) Overview of Analysis

8 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview First step in analyzing the requirements is to construct a domain model. Static structure of the real world system is captured. The domain model describes real-world classes and their relationships to each other. 8 Overview of Analysis

9 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview Information for the domain model comes from the – Problem statement, – Artifacts from related systems, – Expert knowledge of the application domain and – General knowledge of the real world. The steps to be performed to construct a domain class model: 1.Find Classes. 2.Prepare a data dictionary. 9 Domain Class Model

10 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview 3.Find associations. 4.Find attributes of objects and links. 5.Organize and simplify classes using inheritance. 6.Verify that access paths exist for likely queries. 7.Iterate and refine the model. 8.Reconsider the level of abstraction. 9.Group classes into packages 10 Domain Class Model

11 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview 1. Finding Classes First Step, find relevant classes for objects from application domain. – It includes houses, person, machines etc. Classes often correspond to nouns. Eg- ” a reservation system sell tickets to performances at various theater”- – Tentative classes would be Reservation, System, Tickets, Performance and Theaters. 11 Domain Class Model

12 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview Idea is to capture concepts. not all nouns are concepts, and concepts are also expressed in other parts of speech. For the Case study of the ATM: The following are the classes extracted from problem statement nouns. 12 Domain Class Model

13 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview 13 Domain Class Model

14 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview Additional classes that do not appear directly in the statement but can be identified from our knowledge of the problem domain 14 Domain Class Model

15 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview 2.Keeping the Right classes Discard unnecessary and incorrect classes according to the following criteria. Redundant classes: If two classes express the same concept, you should keep the most descriptive name. – ATM example. Customer and user are redundant; we retain customer because it is more descriptive. 15 Domain Class Model

16 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview Irrelevant classes: If class has little or nothing do with application, eliminate it. – ATM Ex. cost is outside the scope of the ATM software. Vague classes: class should be specific. – ATM Example, System, Security provision, Banking network etc are not specific thing. Attributes: Names that primarily describe individual objects should be restated as attributes. 16 Domain Class Model

17 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview ATM Example, Account Data, Cash, Transaction data are purely indicating attributes not a class. Operations: If a name describes an operation that is applied to objects and not manipulated in its own right, then it is not a class. – Eg-if we are simply building telephones, then call is part of the state model and not a class 17 Domain Class Model

18 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview – But Billings system for telephone calls a Call would be important class with attributes date, time, origin and destination. Roles: The name of a class should reflect its intrinsic nature and not a role that it plays in an association. – Ex.Owner of a car in a car manufacturing database, not correct as a class. It can be a person( owner, driver, lessee) 18 Domain Class Model

19 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview Implementation Constructs: Eliminate constructs from the analysis model that are irrelevant to the real world. – We may need them during design and not now. – Ex. Transaction Log class. Derived classes: As a general rule, omit classes that can be derived from other classes. – Mark all derived classes with a preceding slash(‘/’)in the class name. 19 Domain Class Model

20 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview 20

21 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview 3. Preparing a Data Dictionary Prepare a data dictionary for all modeling elements. Describe the scope of the class within the current problem, including all assumptions or restrictions on its use. It also describes associations, attributes, operations and enumeration values. 21 Domain Class Model

22 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview Account, ATM, Bank, BankComputer, CashCard, Cashier, CashierStation CentralComputer, Consortium, Customer, Transaction 22 Data Dictionary for the ATM classes Domain Class Model

23 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview 4. Finding Associations Find A structural relationship between two or more classes is an association. A reference from one class to another is an association. Associations often correspond to verbs or verb phrases. – Ex. Physical Location ( part of, NextTo) – Directed Actions (Drives) – Communication (Talks To) 23 Domain Class Model

24 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview – Ownership ( Has, Part of) – Satisfaction of condition ( WorksFor, Manages). Idea here is to capture relationships 24 Domain Class Model

25 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview 25 Domain Class Model

26 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview 26 Domain Class Model

27 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview 5. Keeping the Right Associations Discard unnecessary and incorrect associations, using the following criteria: Associations between eliminated classes: If you have eliminated one of classes then either you eliminate association or restate it. – Ex. Banking Network includes cashier stations and ATMs. – ATM dispenses cash 27 Domain Class Model

28 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview – ATM prints receipts – Bank provide software – Cost apportioned to banks – System provides record keeping and – System provides security. Irrelevant or implementation associations: Eliminate any association that deals with implementation or outer problem statement. – Ex. System handles concurrent access (Implementation) 28 Domain Class Model

29 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview Actions: An association should describe a structural property of the application domain not a transient event. – Ex. ATM accepts Cash card (Interaction cycle) It is not a permanent relationship between ATM and Cash. – Eliminate ATM interact with user. Central computer clears transactions with bank. 29 Domain Class Model

30 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview Ternary associations: You can decompose most association among three or more classes into binary associations. Always decomposed without losing information. Ex. Bank computer processes transaction against account can be convert into Bank computer processes transaction and transaction concern accounts. 30 Domain Class Model

31 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview Derived associations : Omit association and attributes, they may be redundant. – Ex. GrandParentOf can be defined in terms of pair of ParentOf. – Ex. youngerThan expresses condition on the birthdate of two person, not additional information. Derived association don’t add information, they useful for understanding. 31 Domain Class Model

32 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview Semantics of Association Misnamed Association: Name are important to understanding and should be chosen with care. – Ex. Bank computer maintain accounts. Rephrase as Bank hold account. Association End name: Add association end name where appropriate. – Ex. Person manages person. It would be appropriate to give end names boss and worker 32 Domain Class Model

33 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview Qualified Associations: Most names are not globally unique. So context combines with the name to uniquely identify the object. – Ex. Company name unique within one state but may be duplicated in other state. – So combining State + Company name will uniquely identify company. – Ex. bankCode differentiate bank in a consortium. 33 Domain Class Model

34 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview Multiplicity: Don’t put much effort as it is often changes during analysis. Missing Association: Add any missing association that are found during analysis. – Transaction entered on cashier station, Customers have accounts and transaction authorized by cash cards. – To perform above, we need to introduce relationship from Cashier to cashier station. So association Cashier authorized on cashier station needed 34 Domain Class Model

35 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview Aggregation: it is specially for mechanical parts or bills of material. – Don’t spend much time trying to defer between association and aggregation. – Ex. Bank is part of Consortium and indicate the relationship with aggregation. Now combining all things together, class diagram prepare. 35 Domain Class Model

36 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview 36 Domain Class Model

37 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview 6. Finding Attributes: Attributes are data properties of objects like colour, weight etc. Attributes usually correspond to nouns followed by possessive phrases, such as “the color of the car” Attributes are less likely to be fully described in problem statement. Only consider attributes directly relevant to application. Get important attributes then add details to it. 37 Domain Class Model

38 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview Avoid derived attributes. – EX. Age is derived from birthdate and currentTime Looks for attributes on associations. – Ex. Workfor association attribute can be salary, title etc. 38 Domain Class Model

39 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview 7. Keeping the Right Attributes Eliminate unnecessary and incorrect attributed with the following criteria: Objects: if element is important rather than just its value, then it is an object. – Ex. Boss refers to a class and Salary is an attributes. Name: Name often refer as Qualifier rather than attributes. Name is an attribute when its use does not depend on context, 39 Domain Class Model

40 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview – Ex. Names of person are not unique therefore its attributes. Identifiers: it mean referencing objects used for some work. – Ex. ATM transaction always generate Transaction ID for each operation. So you can count Transaction ID as attributes. Attributes on Association: – If value require the presence of link then attributes of the association should derived. 40 Domain Class Model

41 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview – Ex. Workfor association attribute can be salary, title etc Internal Values: if an attributes describes internal state of an object then eliminate it. Fine Detail: Omit minor attributes that are unlikely to affect most operation. Discordant attributes :- an attribute that seems completely different from and unrelated to all other attributes then remove it. 41 Domain Class Model

42 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview Boolean Attributes: Convert Boolean attributes into enumeration. 42 Domain Class Model

43 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview 43 Domain Class Model

44 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview 8. Refining with Inheritance Next step, to share common structure. Apply in two directions: – Bottom Up By Generalizing common aspects of existing classes into a superclass. – Top Down By Specializing existing classes into multiple classes 44 Domain Class Model

45 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview Bottom Up Generalization: – Searching for classes(from bottom up) with similar attributes, associations and operation. – For each generalization, define a superclass to share common features. – May have to slightly redefine some attributes or classes to fit in. But don’t push too hard it create wrong generalization. – Ex. RemoteTransactiona and CashierTransaction are similar and can be generalized by Transaction. 45 Domain Class Model

46 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview Top-Down Specialization: – It main derived from application domain itself. – Look for noun phrases composed of adjectives: Fixed menu, sliding menu and text menu. – Avoid excessive refinement. 46 Domain Class Model

47 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview Generalization Vs. enumeration :- – Generalization is all about common structure – Enumeration is all about list of values. – Ex. CurrentAccount and SavingAccount share common structure but it does not affect behavior within the ATM application. So Type can introduces as attributes of account and enumerate it. Multiple Inheritance: if require then apply because it increasing both conceptual and implementation complexity 47 Domain Class Model

48 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview Similar association: – when the same association name appears more than once with the same meaning, try to generalize the associated class. – Ex. EntryStation generalizes CashierStation and ATM. Adjusting inheritance Level – Assign attributes and association to specific classes in the class hierarchy. – You may need some adjustment to get everything right. 48 Domain Class Model

49 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview 49

50 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview 9.Testing Access Paths Verify that access paths exist for likely queries. Trace access paths through the class model to see if they yield sensible results. Make sure you have not overlooked any associations. 50 Domain Class Model

51 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview 10. Iterating a Class model A class model is rarely correct after a single pass. If you find any deficiency, go back to an earlier stage if necessary to correct it. So iterate and refine the model. There are some sing of missing classes. – Asymmetries in association and generalization. – Disparate attributes and operation on a class. – Difficulty in generalizing cleanly. 51 Domain Class Model

52 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview – Duplicate association with same name and purpose. – A role that substantially shapes the semantics of a class. Ex. It mean converting association into a class. Look out for missing associations – Missing access paths for operations – Lack of attributes, operations and association on a class. – Redundant information: Adjust the placement of attributes and associations 52 Domain Class Model

53 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview 53

54 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview 11.Shifting the level of abstraction Abstraction makes a model more complex but can increase flexibility and reduce the number of classes. In case of abstraction, we need to think in terms of pattern. A pattern distills the knowledge of experts and provide a proven solutions to a general problem. – Ex. Management hierarchy. 54 Domain Class Model

55 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview 55 Domain Class Model

56 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview 12.Group classes into packages. The last step of class modeling is to group classes into packages. A package is a group of elements(classes, association, generalizations and lesser packages) with common theme. When you place classes and association in a package, you are making semantic statement. 56 Domain Class Model

57 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview Therefore, package might be: – Tellers – Cashier, Entry Station, Cashier Station, ATM – Accounts – Account, cash card, card authorization, customer, transactions, update, cashier transaction, remote transaction. – Bank- consortium, bank Each package can add details to it. 57 Domain Class Model

58 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview The Following steps are performed in constructing a domain state model – Identifying classes with states – Finding states – Finding Events – Building state diagrams – Evaluating state diagrams 58 Domain State Model

59 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview 1. Identifying Classes with states Study list of domain classes. Look for classes that can be characterized by a progressive history or represent cyclic behavior. Identify significant states in the life cycle of an Object. Not every state occurs in every cycle. – ATM Example, Account is appropriate behavior for ATM. Life cycle of Account is progressive and cycling to and from problem states. 59 Domain State Model

60 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview Finding States List the state for each class. Characterized the object by their – Attributes Values – Associations that may participants – Attributes and association that are meaningful in certain states only. Avoid names that indicate how the state came. 60 Domain State Model

61 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview By looking at events and considering transitions among states, missing states will become clear. Ex. Some states for Account – Normal (Normal access) – Closed ( Closed by customer) – Overdrawn ( withdrawal exceeds the balance) – Suspended ( blocked for some reason) 61 Domain State Model

62 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview Finding Events Now find events that cause transitions among states. Think about stimuli (input) that cause a state to change. Find other events that takes object into a specific states – Ex. Pickup receiver on telephone, it enters into Dialing State. – But many telephone has pushbuttons that invoke specific functions. 62 Domain State Model

63 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview So there are some additional event that occur within a state and don’t cause a transitions. For Domain State model, make focus on events that cause transition among states. Ex. Event includes: close account, withdraw excess funds, repeated incorrect PIN, suspected fraud and Administrative action. 63 Domain State Model

64 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview Building State diagrams Determine for which state, each event applies. Add transitions to show the change in state caused by the occurrence of an event when an object is in particular state. Once you have specified the transitions, check does it represent an error or not? If yes then add transitions to error state. 64 Domain State Model

65 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview 65 Domain State Model

66 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview Evaluating State Diagram Examine each state model. Are all states connected? Path from initial state to the final state? Are the expected variations represent it? Are there any dead states that terminate the cycle? Find missing path and states from it. When complete, it should indicate life cycle of the class. 66 Domain State Model

67 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview 67 Chapter Process Overview

68 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview Development Stages – System Conception – Analysis – System Design & Class Design – Implementation & Testing – Training, Deployment and Maintenance Development Life Cycle – Waterfall Development – Iterative Development Topic Covered

69 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview System Conception System Conception deals with origin of the system or application. S/W development begins with - business analyst or users conceiving an application & formulating tentative requirement. Development Stages

70 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview Analysis Focuses on creation of models. It specify What must be done, not how it should be done. Task of Analyst -Must work with the requester (client) to understand the problem, because problem statement are rarely complete or correct. There are two stages of analysis: – Domain Analysis & Application Analysis Development Stages

71 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview Domain Analysis – Focus on real-world things whose semantics the application captures – Ex. Airplane Flight is real-world object, Flight reservation system must represent it. Domain model is mainly to decide which information to capture and how to represent it. Development Stages

72 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview Application analysis – Focuses the computer aspects of the application that are visible to users. – Ex. Flight reservation screen is part of flight reservation system. – It does describes the application appears from the outside. – It does not describe the implementation of the application Development Stages

73 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview System Design During system design, developer makes strategic decisions relevant to system architecture. Architecture is high level plan or strategy for solving application problem. Architecture is depend on requirement and based on past experience. Must understand how a new system interacts with other systems. Development Stages

74 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview Class Designer Task of class designer – Add details to analysis model – They determine data structures & algorithm for each of the operation of window class. – They elaborate both domain & application objects using same OO concept & notation. Development Stages

75 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview Implementation It is the stage of writing code. Translating design elements into programming language and database code. Tools can used to generate code. Development Stages

76 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview Testing Now system is ready but it must be carefully tested before delivered to customer. Tester once again revisit the original requirement and verify the proper functionality. Can discover errors or bugs. Tester perform testing on all hardware and software platform Development Stages

77 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview Training Organization must train users so that they can get full benefit from an application. Team should prepared separate user documentation(i.e. Help file or user manual) Development Stages

78 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview Deployment Deployment mean, product release Once training is over, system is ready to install. System must work on various platform and on various configuration. It should support multiple languages. Development Stages

79 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview Maintenance Bugs that remain in the original system will gradually appear during use and must be fixed. Preserve the long-term viability of the application. 79 Development Stages

80 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview Waterfall Development – In this approach, developer has to follow strictly linear sequence with no backtracking. – First, capture requirement, construct analysis model then prepare system design, class design and followed by implementation, testing, deployment. – Suitable for well understood applications with predictable outputs from analysis and design, such systems seldom occur. 80 Software Development Life Cycle

81 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview A waterfall approach also does not deliver a useful system until completion. Drawback : This makes it difficult to assess progress and correct a project that has gone wrong. 81 Software Development Life Cycle

82 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview 82 Software Development Life Cycle

83 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview Iterative Development More flexible. There are multiple iterations as the system evolves to final deliverable. Each iteration includes a full complement of stages: analysis, design, Implementation and testing. This is the best choice for most applications because it gracefully responds to changes and minimizes risk of failure. 83 Software Development Life Cycle

84 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview 84 Management and business users get early feedback about progress. Software Development Life Cycle

85 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview Enumeration An enumeration is a data type that has finite set of values: For ex. Enumeration often occur and are important to users. – i.e. it display only the possible values or users are restricted to access only allowed values or data. Do not use generalization to capture the values of an enumerated attributes Calendar week: Week > week Sunday Monday Tuesday ……. Saturday

86 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview An enumeration  list of values Generalization  Structuring the description of objects. – Ex. We are not introducing generalization for “Card” Class because most games do not differentiate the behavior of “Suit”. Card suit:suit rank: rank > Suit Spades Clubs Hearts diamonds

87 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview UML notation Top section: Write keyword enumeration in between “ >” above enumeration name. Second section : List the enumeration values.

88 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview Multiplicity Multiplicity is a constraint on the cardinality of a set. Multiplicity for an attribute specifies the number of possible values for each representation of attributes. Common specifications are – Mandatory single value [1] – An optional single value [0..1] – Many[*] It specify whether an attribute is mandatory or optional It indicates if an attribute is single valued or can be a collection.

89 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview If not specified, it is assumed to be a mandatory single value[1] Person name: string[1] address:string[1..*] birthdate:date[1]

90 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview Scope It indicates if a feature applies to an object or a class. You should avoid attributes with class scope because they can lead inferior model. It is better to model group explicitly and assign attributes to them. Person name PhoneMailBox maxMessageCount phoneNumber password PhoneMessage maximumDuration maxDaysRetained dateRecorded timeRecorded priority 1 * * * 0..1 source owner 1 {ordered}

91 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview Upper model is inferior because the maximum duration, maximum day retained and maximum message count have a single value for the entire phone mail system. It is acceptable to use an attribute with class scope to hold the extent of a class ( Set of objects for a class) Person name PhoneMailBox phoneNumber password PhoneMessage dateRecorded timeRecorded priority 1* * * 0..1 source owner 1 {ordered} MailCategory maxMessageCount maximumDuration maxDaysRetained 1 * owner

92 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview It is also acceptable to define operations of class scope. It is convenient to define class scoped operations to provide summary data.

93 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview Visibility Visibility refers to the ability of a method to reference a feature from another class and has the possible values of – Public, – Protected – Private – Package Public features: Any method freely access Protected features: only methods of the containing class and its descendant via inheritance can access Private features: only methods of the containing class can access. Package features: Methods of classes defined in the same package as the target class can access.

94 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview UML denotes visibility with a prefix. – Character “+” precedes public – Character “-” precedes private – Character “#” precedes protected – Character “~” precedes package Several issues when choosing visibility – Comprehension You must understand all public features to understand the capabilities of a class. Others are merely an implementation convenience.

95 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview Extensibility – Many classes can depend on public methods, so it can be highly disruptive to change their signature. – Fewer classes depend on private, protected, and package methods, there is more latitude to change them. Context – Private, protected and package methods may rely on preconditions or state information created by other methods in the class. – A private method may calculate incorrect results or cause the object to fail.

96 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview Association ends A binary association has two ends, a ternary association has three ends and so forth. Few properties: Association end name: – An association end may have meaningful name. – Names clarifies multiple references to a class and facilitate navigation Multiplicity: – Can specify multiplicity for each association end. Ordering: – Objects for a “many” association end are usually just a set. Bags & Sequences: – Objects for a “many” association end also be a bag or sequence. Qualification: – One or more qualifier attributes can disambiguate the objects for “many” association end

97 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview Additional properties Aggregation: – It may be an aggregate or constituent (element) part. – Only binary association can be a aggregation: One association end must be an aggregate Other must be a constituent Changeability: – It specifies the update status of an association end. Navigability – UML shows navigability with an arrowhead on the association end attached to the target class. – Arrowheads may be attached to zero, one or both ends of an association. Visibility – Similar to attributes and operations, association ends may be public, protected, private or package.

98 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview N-ary Associations Project Person Language * * * programmer N-ary associations mean associations among three or more classes. – Ex. Programmers use computer languages on projects. UML notation: – It is diamond with lines connecting to related classes. – If the association has a name, written in italics next to the diamond. Note: Avoid n-ary associations – most of them can be decomposed into binary associations, with possible qualifiers and attributes.

99 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview N-ary association can have a name for each end just like binary associations. You can not traverse n-ary associations from one end to another as with binary associations. Semester ListedCourse Professor * * * DeliveredCourse roomNumber Textbook **

100 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview Ex. A professor teaches a listed course during a semester. The resulting delivered course has a room number and any number of textbooks. Programming language can not express n-ary associations. So you need to promote (support) n-ary associations to classes. When you promote n-ary associations to a class, might change the meaning of a model. An n-ary associations enforces that there is most one link for each combinations. – Ex. For each combinations of professor, semester and ListedCourse there is one DeliveredCourse So if you were implementing below fig. special application code would have to enforce the uniqueness of Professor + Semester + ListedCourse.

101 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview Semester ListedCourse Professor DeliveredCourse roomNumber Textbook 1 1 * *** * 1

102 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview UML has two forms of part-whole relationships: – Aggregation - A general form – Composition – More restrictive.

103 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview Aggregation Definition: – An aggregation as relating an assembly class to one constituent part class. – An assembly with many kinds of constituent parts corresponds to many aggregations. – For ex. College consists of students, professor, courses etc. Here college is assembly and the others are constituents. Therefore, college to student is one aggregation, college to professor is another aggregation. – We define each individual pairing as an aggregation. – So that we can specify the multiplicity of each constituent part within the assembly.

104 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview Aggregation is an special form of binary associations. Most important property of aggregation: – Transitivity If A is part of B and B is part of C, then A is part of C. – Antisymmetric If A is part of B, then B is not part of A. Aggregate operations imply transitive closure and operate on both direct and indirect parts.

105 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview Aggregation v/s Association Aggregation is not an independent concept, it is a special form of association. If two objects are tightly bound by a part-whole relationship, it is an aggregation. If two objects are usually considered as independent and have linked, it is association. To find whether there is a aggregation or not, some tests includes: – Use the phrase part of – Some operations on the Whole apply to its parts – Some attributes values circulate from whole to all or some parts.

106 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview UML notation: Like association, except a small diamond indicates the assembly end. Decision to use aggregation is – Matter of Judgment – Arbitrary College Professor Student Courses

107 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview Aggregation v/s Composition Composition is a form of aggregation with two additional constraints. – A constituent part can belong to at most one assembly. – Once its assigned, it has coincident lifetime with the assembly. Composition implies ownership of the parts by the whole. Composition is convenient for programming – Ex. Deletion of assembly object triggers deletion of all constituent objects.

108 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview UML notation: Composition is a small solid diamond next to assembly class. EX. A company consists of divisions, which in turn consists of departments. A Company is indirectly a composition of departments. Company Person Division Department 1 * **1 1 WorksFor

109 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview Propagation of operations Propagation is the automatic application of an operation to a network of objects. When the operation is applied to some starting object. Ex. A persons owns multiple documents. Copy operations propagate from document to paragraph to characters. Copying a paragraph copies all the characters in it. Operation does not propagate in the reverse direction: A paragraph can be copied without copying the whole document.

110 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview UML notation: Small arrow indicating the direction and operation name next to the affected association. Note: this notation is not part of the UML and is a special notation.

111 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview Abstract Classes An abstract class is a class that has no direct instances but whose descendant classes have direct instances. A Concrete class is a class that is instantiable; it can have direct instances. Only concrete classes may be leaf classes in an inheritance tree.

112 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview Baker and candelstickMaker are concrete classes because they have direct instances. Worker BakerCandlestickMaker { note: listing of workers is incomplete} Concrete Class: it can have direct instances.

113 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview Abstract Class and Abstract operation: it has not direct instances. FullTimeEmployee and PartTimeEmployee are concrete classes because they can be directly instantiated. UML Notation: Abstract class name listed in italic font or may place keyword {abstract} below or after the name.

114 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview An abstract class can define signature for an operation without supplying corresponding method. An abstract operation defines the signature of an operation for which each concrete subclass must provide its own implementation. A concrete class may not contain abstract operations. UML Notation: An abstract operation is designated by italics or the keyword {abstract}. Note: Abstract nature of a class is always provisional, depending on the point of view or application.

115 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview Multiple Inheritance It permits a class to have more than one superclass and to inherit features from all parents. More complicated form of generalization than single inheritance. Advantage is greater power in specifying classes and an increased opportunity for reuse. Disadvantage is a loss of conceptual and implementation simplicity. Multiple inheritance mean either the conceptual relationship between classes or the languages mechanism that implements that relationship. Distinguish between – Generalization : conceptual relationship – Inheritance : Language mechanism.

116 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview Kinds of multiple Inheritance Common form of multiple inheritance is from sets of disjoint classes. Each subclasses inherits from one class in each set. FullTimeIndividualContributor FullTimeEmpPartTimeEmpManagerIndividualContributor Employee employementStatus managerialStatus

117 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview Here, FullTimeEmp and PartTimeEmp are disjoint; and Manager and IndividualContributor are also disjoint classes. We can also define additional combinations classes here like FullTimeManager, PartTimeContributor, PartTimeManager and FullTimeIndividualContributor. Each generalization should cover a single aspect (A generalization set name). Therefore, here class Employee has two aspect – Employment Status – Managerial Status

118 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview So, FullTimeIndividualContributor inherits Employee features along two paths via employmentStatus and managerialStatus. Conflicts among parallel definitions create ambiguities. You should avoid such conflicts in models or explicitly resolve them. – For Ex. FullTimeEmp and IndividualContributor both have attribute called name. – FullTimeEmp.name could refer as person’s full name and IndividualContributor.name might refer as person’s title. Solution is restating the attributes of classes.

119 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview Multiple inheritance can also occur with overlapping classes. landVehicle watervehicle AmphibiousvehicleboatCar Vehicle {overlapping, incomplete}

120 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview AmphibiousVehicle is both Land and water vehicle. So there is a overlapping. UML uses constraint to indicate an overlapping generalizations set; Notation is a dotted line cutting across affected generalization with keyword in braces.

121 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview Multiple Classification Definition: – One instance happens to participant in two overlapping classes.

122 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview UML permits multiple classification but most OO languages handle it poorly. Fig. show that Person as an object composed of multiple UniversityMember object. This workaround replaces inheritance with delegation. This is not totally satisfactory, there is a loss of identity separates roles.

123 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview Workaround Dealing with multiple inheritance is implementation issue but early restructuring of a model is often the easiest way to work around its absence. Two approaches make use of delegation, which is an implementation mechanism by which object forwards an operation to another object for execution. Restructuring technique – Delegation using composition of parts – Inherit the most important class and delegate the rest. – Nested generalization

124 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview Delegation using composition of parts – You can recast superclass with multiple independent generalization as a composition in which each constituent part replaces a generalization. – Single object having a unique ID by a group of related objects that compose an extended object. – Inheritance of operations across the composition is not automatic. – Composite must capture operations and delegate to appropriate part.

125 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview You need not create various combination as explicit classes. All combinations of subclasses from the different generalizations are possible. Workaround for multiple inheritance - delegation

126 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview Inherit the most important class and delegate the rest. – Maintain identity and inheritance across the most important generalization. – Reduce the remaining generalization to composition and delegate their operations. Workaround for multiple inheritance – inheritance and delegation

127 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview Nested Generalization: – Factor on one generalization first, then the other. – This approaches multiplies out all possible combinations. – This preserves inheritance but duplicates declarations and code and violates the spirit of OO programming.

128 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview There are several issue when selecting the best workaround. – Superclass of equal importance – Dominant superclass – Few subclass – Sequencing generalization sets – Large quantities of code – Identity

129 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview Superclass of equal importance: – If a subclass has several superclasses it may be best to use delegation and preserves symmetry in the model. Dominant superclass: – If one superclass clearly dominate and others are less important, preserve inheritance through this path. Few subclasses: – If the number of combinations is small, consider nested generalization otherwise avoid. Sequencing generalization sets. – In a case of generalization, factor on most important criterion first, then second most and so forth.

130 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview Large quantities of code: – Try to avoid nested generalization, in a case of duplicate large quantities of code. Identity: – Consider the importance of maintaining strict identity. Only nested generalization preserves this.

131 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview Metadata Definition Metadata is data that describes other data. – For ex. A class definition is metadata. Models are inherently metadata, they describe the things being modeled.

132 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview A car model describes many physical cars and holds common data. A car model is metadata relative to a physical car, which is data.

133 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview Constraints Definition A constraint is Boolean condition involving model elements, such as objects, classes, attributes, links, associations and generalizations sets. A constraint restricts the values that elements can assume.

134 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview Constraints on objects Ex-1. No employee’s salary can exceed the salary of the employee’s boss. ( a constraints between two things) Ex-2. No window can have an aspect ratio of less than 0.8 or greater than 1.5 ( a constraint between attributes). Ex-3. Priority of a job may not increase (a constraint on the same object) Employee.salary < boss.salary 0.8< length/width<1.5 Priority never increase

135 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview Constraints on Generalization sets Class models capture many constraints through their structure. – For ex. The semantics of generalization imply certain structural constraints. With single inheritance the subclasses are mutually exclusive UML had few keywords for generalization sets. – Disjoint The subclasses are mutually exclusive. Each object belongs exactly one of subclasses. – Overlapping The subclasses can share some objects. An object may belongs to more than one subclass. – Complete: The generalization lists all the possible subclasses. – Incomplete: The generalization may be missing some subclasses.

136 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview Constraints on Links Multiplicity is a constraint on cardinality set. Multiplicity for an associations restricted the number of objects related to a given object. Qualification also constraints an association. A qualifier attribute does not merely describe the association but also significant in resolving the “many” objects. An association class implies a constraint. An association class has constraint that an ordinary class does not; it derives identity from instances of the related classes.

137 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview There is no particular order on the objects of a “many” end for ordinary association. But, constraint {ordered} indicates that elements of a “many” associations end have explicit order.

138 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview Use of constraints Declaration lets you express a constraint’s intent, without supposing an implementation. That mean, convert constraints to procedural form before implementation. Practically, you can not enforces every constraint with model’s structure, but you should try to enforce the important ones.

139 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview UML notation Two alternative notations of constraints: – Delimit a constraint with braces or – place it in a “dog-eared” comment box. You should try to position constraint near affected elements. A dashed arrow can connect a constrained element to the element on which it depends.

140 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview The subject is not primarily about OO- language or coding. This subject emphasize on initial stages of process development i.e. Requirement Gathering Planning etc. Object-oriented analysis and design (OOAD) is a software engineering approach that models a system as a group of interacting objects.software engineeringobjects OOAD Concept

141 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview OOAD is divided into two parts as follows: OOA (Object Oriented Analysis): – Definition :Object Oriented Analysis (OOA) is concerned with developing requirements and specifications OOD (Object Oriented Design) – Definition: Object Oriented Design (OOD) is concerned with developing object-oriented models of a software/system to implement the requirements identified during OOA OOAD Concept

142 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview What is an object? 1) any concept that represent a single thing 2) a representation of a specific entity in the real world 3) may be tangible (physical entity) or intangible Examples: In the case of LMS, software or system itself is intangible object and student and Library clerk act as tangible objects. What is an object?

143 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview Organize software as a collection of discrete objects that incorporate both data structure and behavior. – Data structure  data pattern or data style or formation of data – Behavior  things that the object can do that are relevant to model OO approach has 4 characteristics: – Identity – Classification – Inheritance – Polymorphism What is Object-Orientation?

144 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview Identity Classification Polymorphism Inheritance Characteristics of Objects

145 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview Definition : Discrete (i.e. unique) & distinguishable entities called objects. Ex. A person is an object. His name is Identify Ex. Ram Note: Objects are uniquely identifiable by name. Each objects has its own inherent identity. In other words, two objects are distinct even if an their attribute values (i.e. name and size) are identical. Ex. Twins are two distinct person by identity Characteristics of Objects - Identity

146 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview Definition: – Objects with the same data structure (attributes) & behavior ( operation) are grouped into a class. In OO systems, class is a set of objects that share common structure and common behavior Classes are important mechanisms for classifying objects. Each class describes a possibly infinite set of individual objects. Characteristics of Objects - Classification

147 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview Each objects is said to be instance of its class. Objects has its own value for each attributes but shares the attributes names & operations. Example : Class Name : Circle Attributes : radius, center Operation : setCenter(), setRadius() Characteristics of Objects - Classification

148 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview Definition: Sharing of attributes & operations (features) among classes based on hierarchical relationship. – A superclass has general information that subclass refine and elaborate. – Each subclass incorporates all the features of its superclass and adds its own features. – In other words, defining new classes from the existing one. Characteristics of Objects - Inheritance

149 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview Note: subclasses need not repeat the features of the superclass. Advantage: common features of several classes into a superclass can reduce repetition within design and programs. Characteristics of Objects - Inheritance

150 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview class Person { String name; String age; void birthday () { age = age + 1; } class Employee extends Person { double salary; void pay () {...} } Every Employee has a name, age, and birthday method as well as a salary and a pay method. Person Employee Inheritance is implied by is-a or kind-of relationship. Characteristics of Objects – Example of Inheritance

151 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview Definition – Same operation may behave differently for different classes. – In simple words, “ One name multiple form” – Here operation mean – it’s a procedure or transformation that an object perform or is subject to. – For example, Class name is POLYGON – Attributes - vertices, border color, fill color. – Operations – Draw, erase, fill – An implementation of an operation by a specific class is called Method Characteristics of Objects – Polymorphism

152 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview OO Development refers to the software life cycle. i.e. Planning, Analysis, Design & Implementation Why OO Development? In essence of OO development is the identification & organization of application concepts, rather than in a programming language. 152 What is OO Development?

153 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview Earlier, OO community focused on implementation part rather than analysis and design. It focuses excessively on implementation mechanisms rather than the underlying thought process that support. An OO development approach encourage software developers to work & thinks in terms of the application throughout software life cycle. 153 OO Dev – Modeling Concept, Not implementation

154 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview OO development is a conceptual process independent of a programming language until the final stage. OO development is fundamentally a way of thinking & not a programming technique. It can serve as a medium for specification, analysis, documentation & interfacing as well as for programming 154 OO Dev – Modeling Concept, Not implementation

155 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview OO Development & Graphical notation represents OO concept. OO process consists of building a model of an application & then adding details to it during design. Same notation is used from – Analysis  Design  Implementation. So information is not lost or translated into the next stage [Reusability]. 155 OO Dev – Modeling Concept, Not implementation

156 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview System Conception Analysis System Design Class Design Implementation 156 OO Development Stages

157 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview System Conception means origin of the system. S/W development begins with - business analyst or users conceiving an application & formulating tentative requirement. 157 System Conception

158 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview System Conception Analysis System Design Class Design Implementation 158 OO Development Stages

159 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview Task of Analyst -Must work with the requester (client) to understand the problem, because problem statement are rarely complete or correct. -To design the Analysis model which demonstrates what the desired system must do, not how it will be done. -Analyst is not concerned about implementation decision. 159 Analysis

160 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview 160 Analysis model Domain model Application model Description of real-world objects reflected Within the system Description of the parts of application system itself that are visible to the user. Ex. Bank account is domain model. Application model includes Saving accounts, current account, demat account etc. Analysis

161 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview System Conception Analysis System Design Class Design Implementation 161 OO Development Stages

162 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview Task of system designer - must decide what performance characteristics to optimize. - choose strategy to attack the problem. - making tentative resource allocation. Ex. Designer might decide to change the window screen for fast & smooth working, even when windows are moved or erased. System Design

163 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview System Conception Analysis System Design Class Design Implementation 163 OO Development Stages

164 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview Task of class designer - add details to analysis model - They determine data structures & algorithm for each of the operation of window class. - They elaborate both domain & application objects using same OO concept & notation. Class Design

165 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview System Conception Analysis System Design Class Design Implementation 165 OO Development Stages

166 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview Task of Implementers :- Translates the classes & relationships developed during class design into particular programming language, database or hardware During implementation, follow good software engineering practice so that traceability to the design is apparent (i.e. clear). Implementation

167 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview OO concepts apply throughout the System Development Life Cycle (SDLC) – i.e. Analysis  design  implementation Use same classes from stage to stage without a change of notation. Some classes are not part of analysis but are introduced during design or implementation. Ex. Data structure such trees, hash table & linked list are not visible to users at the time of analysis. – but designers introduce them to support particular algorithms. Summary of OO Development

168 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview Models Class Model State model Interaction model Objects in the system and their relationship Life history of objects in the system Interaction among objects Three Software Models

169 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview Class model Describe the static structure of the objects in a system & their relationship It define the context for software development. Class model contains class diagram to express it. A class diagram is graph phase. Nodes are classes. Arcs are relationship among classes. BookStore Relationship classes

170 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview State Model Describe aspect of an object that change over time. State model specifies & implement control with state diagram A state diagram is a graph whose Nodes are state Arcs are transitions between state caused by events State 1State 2 State Diagram Event

171 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview Interaction model How the objects in a system co-operate to achieve broader results. Interaction model start with Use case that are elaborate into with sequence and activity diagram. Use Cases Activity Diagram Sequence Diagram

172 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview Use cases: – Focus on functioning of system – Simple mean, what a system does for users Sequence diagram – Shows the object that interact – Time sequence of their interactions Activity diagram – Elaborate important processing steps. – Activity diagrams can be used to describe the business and operational step-by-step workflows of components in a system Interaction Model

173 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview 173 Grady Booch James Rumbaugh Ivar Jacobson Are the man behind Invention of OO Modeling Technique. Object Modeling Technique (OMT) concept evolved in 1991. OO Modeling History

174 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview 174 In 1994 James Rumbaugh joined Rational (now the part of IBM) in 1994 & began working with Grady Booch on UML Notations. In 1995, Ivar Jacobson also joined Rational & added his concept to the unification work. OO modeling History

175 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview 175 In 1996 the Object Management Group issued a request for proposals for standard OO modeling notation. Later Rational led the final proposal team, with Booch, Rumbaugh & Jacobson deeply involved. OO modeling History

176 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview 176 OO modeling History

177 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview OO themes are not unique to OO systems, they are particularly well supported. – Abstraction – Encapsulation – Combining data and behavior – Sharing – Emphasis on the essence of an object – Synergy OO THEME

178 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview Abstraction : – Focus on essential aspects of an application while ignoring details. i.e. focusing on what an object is and does, before deciding how to implement it. – Use of Abstraction: Freedom to make decisions as long as possible by avoiding premature commitment to details. – Ability to abstract is probably the most important skill required for OO development. OO THEME

179 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview Encapsulations ( Information Hiding): – It is separates the external ( accessible to objects) aspects of an objects from the internal ( hidden from other objects) implementation details. – It prevents portions of a program from becoming so interdependent that a small change has massive ripple effects. – For ex. You may want to change the objects to Improve performance, Fix a bug, Consolidate code, Support porting 179 OO THEME

180 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview Encapsulation is not unique to OO language but ability to combine data structure & behavior in a single entity makes encapsulation cleaner & powerful. 180 OO THEME

181 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview Combining data & Behavior In non-OO code, to display the content of a window must distinguish the type of each figure, such as circle, polygon etc & call the appropriate procedure to display it. In OO code, program invoke the “Draw” operations on each figure and each object implicitly decide which procedure to use, based on its class. So caller of an operation need not consider how many implementation exist. 181 OO THEME

182 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview So, maintenance is easier, because the calling code need not be modified when a new class is added. In an OO system, the data structure hierarchy matches the operation inheritance hierarchy. 182 Data structure Hierarchy Procedure Hierarchy Class Hierarchy OO THEME

183 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview Sharing OO technique promote sharing at different levels. Sharing via inheritance is one of the main advantage of OO language. OO development not only lets you share information within an application, but also offers the aspects of reusing designs & code on future projects. OO provides the tools to build libraries ( or collection) of reusable component. 183 OO THEME

184 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview Emphasis on the essence of an object: – In OO technology, focus is on what an objects is rather than how it is used. – Use of an object depend on the details of application and often change during development. – OO development greater emphasis on data structure & lesser emphasis on procedure structure. 184 OO THEME

185 Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview Synergy : OO concepts can be used in isolation but together they complement each other synergistically. 185 OO THEME


Download ppt "Prepared By Jay Dave© RKU 2014 Object-Oriented Analysis and Design Process overview Introduction to Domain Analysis."

Similar presentations


Ads by Google