Presentation is loading. Please wait.

Presentation is loading. Please wait.

Amirkabir University of Technology, Computer Engineering Faculty, Intelligent Systems Laboratory1 Requirements Analysis Section Three Version: 1.0 Mehr.

Similar presentations


Presentation on theme: "Amirkabir University of Technology, Computer Engineering Faculty, Intelligent Systems Laboratory1 Requirements Analysis Section Three Version: 1.0 Mehr."— Presentation transcript:

1 Amirkabir University of Technology, Computer Engineering Faculty, Intelligent Systems Laboratory1 Requirements Analysis Section Three Version: 1.0 Mehr 1386

2 Amirkabir University of Technology, Computer Engineering Faculty, Intelligent Systems Laboratory2 Requirements Analysis: Definition A modeling activity in which system analyst uses and refines elicited requirements and builds models of data, functional and behavioral domains of software system. What

3 Amirkabir University of Technology, Computer Engineering Faculty, Intelligent Systems Laboratory3 Why Requirements Analysis Provides necessary artifacts for customer reviews and understanding the system. Provides appropriate inputs for the Design and Test phases. Provides the developer and the customer with the means to assess quality once software is built. Checks completeness, correctness and consistency of the requirements. Why

4 Amirkabir University of Technology, Computer Engineering Faculty, Intelligent Systems Laboratory4 Systems Thinking System –A system is an interrelated set of business procedures used within one business unit working together for a purpose –A system has nine characteristicsnine characteristics –A system exists within an environment –A boundary separates a system from its environment What

5 Amirkabir University of Technology, Computer Engineering Faculty, Intelligent Systems Laboratory5 Characteristics of a System –Components –Interrelated Components –Boundary –Purpose –Environment –Interfaces –Input –Output –Constraints What

6 Amirkabir University of Technology, Computer Engineering Faculty, Intelligent Systems Laboratory6 Characteristics of a System What

7 Amirkabir University of Technology, Computer Engineering Faculty, Intelligent Systems Laboratory7 Systems Thinking Important System Concepts Decomposition –The process of breaking down a system into smaller components –Allows the systems analyst to: Break a system into small, manageable subsystems Focus on one area at a time Concentrate on component pertinent to one group of users Build different components at independent times What

8 Amirkabir University of Technology, Computer Engineering Faculty, Intelligent Systems Laboratory8 Systems Thinking Important System Concepts Modularity –Process of dividing a system into modules of a relatively uniform size –Modules simplify system design Coupling –Subsystems that are dependent upon each other are coupled Cohesion –Extent to which a subsystem performs a single function Which is better: More or less modularity? High or low coupling? High or low cohesion? What

9 Amirkabir University of Technology, Computer Engineering Faculty, Intelligent Systems Laboratory9 Systems Thinking Important System Concepts Logical vs. Physical Modeling –Logical System Description Portrays the purpose and function of the system Does not tie the description to a specific physical implementation –Physical System Description Focuses on how the system will be materially constructed What

10 Amirkabir University of Technology, Computer Engineering Faculty, Intelligent Systems Laboratory10 Systems Thinking Benefits –Identification of a system leads to abstraction –From abstraction you can think about essential characteristics of specific system –Abstraction allows analyst to gain insights into specific system, to question assumptions, provide documentation and manipulate the system without disrupting the real situation Why

11 Amirkabir University of Technology, Computer Engineering Faculty, Intelligent Systems Laboratory11 Decomposition Example

12 Amirkabir University of Technology, Computer Engineering Faculty, Intelligent Systems Laboratory12 The systems analyst A typical IS department

13 Amirkabir University of Technology, Computer Engineering Faculty, Intelligent Systems Laboratory13 Role of a systems analyst Study problems and needs of an organization Determine best approach to improving organization through use of: –People –Methods –Information technology Help system users and managers define their requirements for new or enhanced systems Why

14 Amirkabir University of Technology, Computer Engineering Faculty, Intelligent Systems Laboratory14 Role of a Systems Analyst Assess options for system implementation –In-house development –Outsourced development –Outsourced development and operations –Commercial application For in-house projects, work with a team of analysts and developers What

15 Amirkabir University of Technology, Computer Engineering Faculty, Intelligent Systems Laboratory15 A Successful Systems Analyst Analytical –Understanding of organizations –Problem solving skills –System thinking Ability to see organizations and information systems as systems Technical –Understanding of potential and limitations of technology Who

16 Amirkabir University of Technology, Computer Engineering Faculty, Intelligent Systems Laboratory16 A Successful Systems Analyst Managerial –Ability to manage projects, resources, risk and change Interpersonal –Effective written and oral communication skills Who

17 Amirkabir University of Technology, Computer Engineering Faculty, Intelligent Systems Laboratory17 A Successful Systems Analyst Works in teams –Project Based –Includes IS Manager Systems analysts Programmers Users Other specialists Who

18 Amirkabir University of Technology, Computer Engineering Faculty, Intelligent Systems Laboratory18 Roles for Business Modeling (RUP) Business-Process Analyst Business Designer

19 Amirkabir University of Technology, Computer Engineering Faculty, Intelligent Systems Laboratory19 Business-Process Analyst (RUP) The business process analyst leads and coordinates business use-case modeling by outlining and delimiting the organization being modeled. The business-process analyst is responsible for the business architecture, outlining and delimiting the organization being modeled.

20 Amirkabir University of Technology, Computer Engineering Faculty, Intelligent Systems Laboratory20 Skills of Business-Process Analyst A good facilitator Excellent communication skills Knowledge of the business domain

21 Amirkabir University of Technology, Computer Engineering Faculty, Intelligent Systems Laboratory21 Tasks of Business-Process Analyst assess the situation of the target organization where the project's end-product will be deployed understand customer and user requirements, their strategies, and their goals facilitate modeling of the target organization discuss and facilitate a business engineering effort, if needed business engineering perform a cost/benefit analysis for any suggested changes in the target organization discuss and support those who market and sell the end-product of the project

22 Amirkabir University of Technology, Computer Engineering Faculty, Intelligent Systems Laboratory22 Role Assignment for Business-Process Analyst Assign the Business-Process Analyst and Business Designer roles to the same person. Assign the Business-Process Analyst and System Analyst roles to the same person. When the business context needs to be understood, but the organization doesn't have existing Business-Process Analyst skills. Assign the Business-Process Analyst and Test Analyst roles to the same person. Where customers are actively involved in the project definition and ongoing assessment.

23 Amirkabir University of Technology, Computer Engineering Faculty, Intelligent Systems Laboratory23 Business Designer Role (RUP) Specifies the workflow of business use cases in terms of business workers and business entities. It also distributes the behavior to these business workers and business entities - defining their responsibilities, operations, attributes, and relationships.

24 Amirkabir University of Technology, Computer Engineering Faculty, Intelligent Systems Laboratory24 Business Designer Skills (RUP) A good facilitator Adequate communication skills Knowledge of the business domain is helpful but not necessary for everyone acting in this role. Needs to be familiar with the tools used to capture the business models.

25 Amirkabir University of Technology, Computer Engineering Faculty, Intelligent Systems Laboratory25 Business Designer Tasks (RUP) understand customer and user requirements, their strategies, and their goals facilitate modeling of the target organization discuss and facilitate a business engineering effort, if needed business engineering take part in defining requirements on the end-product of the project

26 Amirkabir University of Technology, Computer Engineering Faculty, Intelligent Systems Laboratory26 Role Assignment for Business Designer Consider assigning the Business-Process Analyst and Business Designer roles to the same person. These roles interact a lot, so it can be more efficient to have a single person responsible for both roles.

27 Amirkabir University of Technology, Computer Engineering Faculty, Intelligent Systems Laboratory27 Analyst Role Set in RUP System Analyst Requirements Specifier Additional Roles –Reviewer –Reviewer Coordinator –Technical Reviewer –Stakeholder

28 Amirkabir University of Technology, Computer Engineering Faculty, Intelligent Systems Laboratory28 Role of a System Analyst in RUP Leads and coordinates requirements elicitation and use-case modeling by outlining the system's functionality and delimiting the system.

29 Amirkabir University of Technology, Computer Engineering Faculty, Intelligent Systems Laboratory29 Skills of a System Analyst (RUP) An expert in identifying and understanding problems and opportunities. Ability to articulate the needs that are associated with the key problem to be solved or opportunity to be realized. A good facilitator Above-average communication skills. Knowledge of the business and technology domains Ability to absorb and understand new information quickly.

30 Amirkabir University of Technology, Computer Engineering Faculty, Intelligent Systems Laboratory30 System Analyst Role Assignment (RUP) Assign one or more staff member to perform the System Analyst role only: Suitable for large teams or where the requirements are particularly complex, difficult to elicit or where the Vision is particularly challenging to define and manage. Assign one staff member to perform both the System Analyst and Test Manager or Deployment Manager roles: A good option for smaller or resource constrained test teams.

31 Amirkabir University of Technology, Computer Engineering Faculty, Intelligent Systems Laboratory31 Requirements Specifier Role (RUP) Specifies the details of one or more a parts of the system's functionality by describing one or the aspects of the requirements

32 Amirkabir University of Technology, Computer Engineering Faculty, Intelligent Systems Laboratory32 Requirements Specifier Skills (RUP) Good communication skills, both in terms of expressing themselves verbally and in writing. Knowledge of the business and technology domain. Familiar with the productivity tools used to capture the results of the requirements work.

33 Amirkabir University of Technology, Computer Engineering Faculty, Intelligent Systems Laboratory33 Role Assignment for Requirements Specifier Assign one or more staff members to perform the Requirements Specifier role only. –In large teams –Where there are domain experts available who have significant domain knowledge to specify appropriate requirements. Assign one or more staff members to perform both the Requirements Specifier and Test Analyst roles: –Small to mid-sized test teams –Where domain experts are available to play both roles.

34 Amirkabir University of Technology, Computer Engineering Faculty, Intelligent Systems Laboratory34 Additional Analyst Roles (1/2) Reviewer: Responsible for providing timely feedback to project team members on the artifacts they have produced. Review Coordinator: Responsible for facilitating formal reviews and inspections, and ensuring that they occur when required and are conducted to a satisfactory standard.

35 Amirkabir University of Technology, Computer Engineering Faculty, Intelligent Systems Laboratory35 Additional Analyst Roles (2/2) Technical Reviewer: Responsible for contributing feedback to the review process. This role is involved in the category of review that deals with the technical review of project artifacts. Stakeholder: Responsible for representing an interest group whose needs must be satisfied by the project.

36 Amirkabir University of Technology, Computer Engineering Faculty, Intelligent Systems Laboratory36 Technical Reviewer Domain knowledge or subjective matter expertise appropriate to the artifact being reviewed Either: –the skills required to produce the artifact being reviewed –the responsibility for other artifacts, the content of which this artifact is a transformation of or otherwise reflects in some manner. –the responsibility for subsequent activities in which this artifact will be consumed

37 Amirkabir University of Technology, Computer Engineering Faculty, Intelligent Systems Laboratory37 Role Assignment for Technical Reviewer The Technical Reviewer role is assigned to one or more individuals on a case-by- case basis, according to the artifact(s) being reviewed, the teams involved and the availability of staff members to take part in the review.

38 Amirkabir University of Technology, Computer Engineering Faculty, Intelligent Systems Laboratory38 What is Modeling? Model: A simplified representation of reality. Why simplification? – Reality is complex. –Many aspects of complexity are unrelated to our problem solving task. An abstraction of a real-world problem that can be represented and manipulated with a computing system. Modeling is a sound and proven technique in engineering. Modeling is one of the key activities in building high quality systems. What

39 Amirkabir University of Technology, Computer Engineering Faculty, Intelligent Systems Laboratory39 Types of Models Iconic: Like the system in a smaller scale. Analog: Behave like the system like an organization chart, diagram, map,… Mathematical (Quantitative) Which

40 Amirkabir University of Technology, Computer Engineering Faculty, Intelligent Systems Laboratory40 Example of a model

41 Amirkabir University of Technology, Computer Engineering Faculty, Intelligent Systems Laboratory41 Some modeling techniques Sketches and drawings http://www.design4plastics.com/case-study.html

42 Amirkabir University of Technology, Computer Engineering Faculty, Intelligent Systems Laboratory42 Some modeling techniques CAD drawings and models

43 Amirkabir University of Technology, Computer Engineering Faculty, Intelligent Systems Laboratory43 Some modeling techniques Analytic models (equations) Lift Pressure Payload

44 Amirkabir University of Technology, Computer Engineering Faculty, Intelligent Systems Laboratory44 Some modeling techniques Analytical (Matlab)

45 Amirkabir University of Technology, Computer Engineering Faculty, Intelligent Systems Laboratory45 Some modeling techniques Finite Element Analysis / Computational Fluid Dynamics etc

46 Amirkabir University of Technology, Computer Engineering Faculty, Intelligent Systems Laboratory46 Some modeling techniques Discrete event modeling

47 Amirkabir University of Technology, Computer Engineering Faculty, Intelligent Systems Laboratory47 Modeling in Software Engineering? Better understanding of systems Specifying requirements for checking their correctness, completeness and consistency. Creating and comparing alternative designs with low cost (without the need to implement the system) A basis for implementation (Round-trip engineering) Act as a communication tool. What

48 Amirkabir University of Technology, Computer Engineering Faculty, Intelligent Systems Laboratory48 Structured Analysis Methods DeMarco (1979) Yourdon (1980) Gane and Sarson Ward & Mellor (1985) for Real Time Systems Hatley & Pirbhai (1987) for Real Time Systems. How

49 Amirkabir University of Technology, Computer Engineering Faculty, Intelligent Systems Laboratory49 Requirements Analysis Methods Structured Analysis Object Oriented Analysis Formal Methods

50 Amirkabir University of Technology, Computer Engineering Faculty, Intelligent Systems Laboratory50 Object Oriented Analysis Methods About 50 methods, OO Methods War: –RA in Rational Unified Process Framework (1997) –Booch Method (1993): Booch’93 –Jacobson Method (1992): OOSE –Rumbaugh Method (1991): OMT-2 –Coad and Yourdon Method (1991) –Wirfs-Brock method (1990) How

51 Amirkabir University of Technology, Computer Engineering Faculty, Intelligent Systems Laboratory51 Formal methods Requirements specification techniques can be categorised on a “formality” spectrum Semi-formal and informal methods –Use natural language, diagrams, tables and simple notation –Include structured analysis and object-oriented analysis Formal methods include: –Based on mathematically formal syntax and semantics –Include Z, B, VDM, LOTOS How

52 Amirkabir University of Technology, Computer Engineering Faculty, Intelligent Systems Laboratory52 Formal methods (contd.) Provide a means for achieving a high degree of confidence that a system will conform to its specification Do not absolute guarantee of correctness Have little directly to offer to the problems of managing software projects – However, benefits can be gained from gaining a clear understanding of the task at an early stage How

53 Amirkabir University of Technology, Computer Engineering Faculty, Intelligent Systems Laboratory53 Formal methods not widespread Formal methods are not widely used amongst software developers Factors contributing to slow acceptance of formal methods:  Difficulty in understanding the notations  Difficulty in formalising certain aspects of requirements  Payoff is not obvious. How

54 Amirkabir University of Technology, Computer Engineering Faculty, Intelligent Systems Laboratory54 Analysis Operational Principles The information model of a problem must be represented and understood. The functions that the software is to perform must be defined. The behavior of the software must be represented. The models that depict information, function and behavior must be partitioned. The analysis process should move from essential information toward implementation detail. How

55 Amirkabir University of Technology, Computer Engineering Faculty, Intelligent Systems Laboratory55 Object Oriented Concepts OO Systems: Composite, modular constructions, built using abstraction, consisting of components, and organized around data. Abstractions are called objects. Each object has its own properties and functionality. As a group, these objects collaborate to solve the problem they are designed to model Main idea in OO: System construction by using objects, classes, methods as the basic units. Main concepts in OO: Objects, Classes, Attributes, Methods, Operations, Relationships. What

56 Amirkabir University of Technology, Computer Engineering Faculty, Intelligent Systems Laboratory56 Strengths of Object Technology –A single paradigm Single language used by users, analysts, designers, implementers –Facilitates architectural and code reuse –Models more closely reflect the real world More accurately describe corporate data and processes Decomposed based on natural partitioning Easier to understand and maintain –Stability A small change in requirements does not mean massive changes in the system under development What

57 Amirkabir University of Technology, Computer Engineering Faculty, Intelligent Systems Laboratory57 A Simple Sales Order Example Order Item Ship via

58 Amirkabir University of Technology, Computer Engineering Faculty, Intelligent Systems Laboratory58 SalespersonProduct Sale Corporate Customer IndividualTruck Vehicle Train Class Diagram for the Sales Example

59 Amirkabir University of Technology, Computer Engineering Faculty, Intelligent Systems Laboratory59 Effect of Requirements Change Suppose a new trucking company is introduced... Only the Truck class changes SalespersonProduct Sale Corporate Customer IndividualTruck Vehicle Train

60 Amirkabir University of Technology, Computer Engineering Faculty, Intelligent Systems Laboratory60 Where Is OO Being Used? –GUI based systems OO approaches facilitate the design and implementation of systems with graphical user interfaces (GUIs) Where

61 Amirkabir University of Technology, Computer Engineering Faculty, Intelligent Systems Laboratory61 Where Is OO Being Used? –Embedded systems OO methods enable embedded and real-time systems to be developed with higher quality and flexibility Where

62 Amirkabir University of Technology, Computer Engineering Faculty, Intelligent Systems Laboratory62 Where Is OO Being Used? –Client/Server computing OO approaches can encapsulate mainframe information in objects, enabling down-sized applications to be delivered Where

63 Amirkabir University of Technology, Computer Engineering Faculty, Intelligent Systems Laboratory63 Where Is OO Being Used? –Re-engineering OO methods allow parts of a system to be re- engineered, protecting investments in existing software applications Existing Software Re-engineered Software Where

64 Amirkabir University of Technology, Computer Engineering Faculty, Intelligent Systems Laboratory64 Object-Oriented Analysis and Design OOD Add detail and design decisions Developer’s Perspective OOA Develop model of requirements User’s Perspective What

65 Amirkabir University of Technology, Computer Engineering Faculty, Intelligent Systems Laboratory65 Object Oriented Analysis Advantages Increasing productivity. Decreasing analysis activity Decreasing Complexity in Design Easier review and verification by customer Increasing reusability Why

66 Amirkabir University of Technology, Computer Engineering Faculty, Intelligent Systems Laboratory66 OOA Method Modeling activity based on OO concepts. Every method: –Has some steps for performing RA –Produces a set of OO models –Has a modeling language for representing models. What

67 Amirkabir University of Technology, Computer Engineering Faculty, Intelligent Systems Laboratory67 Main OOA Methods Object Oriented Analysis Methods (About 50 methods, OO Methods War) –RA in Rational Unified Process Framework (1997) –Booch Method (1993): Booch’93 –Jacobson Method (1992): OOSE –Rumbaugh Method (1991): OMT-2 –Coad and Yourdon Method (1991) –Wirfs-Brock method (1990) Which

68 Amirkabir University of Technology, Computer Engineering Faculty, Intelligent Systems Laboratory68 A Unified Approach to OOA Use case modeling –Identifying actors –Identifying use cases –Build use case diagram –Describing the use cases Class modeling –Identifying classes using requirements –Identifying attributes and operations for objects –Define class relationships –Build class model Behavioral modeling Review OOA models How

69 Amirkabir University of Technology, Computer Engineering Faculty, Intelligent Systems Laboratory69 Unified Modeling Language: Chosen Modeling Language –The Unified Modeling Language (UML) is described in The Unified Modeling Language for Object-Oriented Development written by Grady Booch, Jim Rumbaugh, and Ivar Jacobson. Available from http:\\www.rational.com –Based on the authors’ personal experiences. –Incorporates contributions from other methodologists. –Co-submitted to the OMG by Rational Software, Microsoft, Hewlett-Packard, Oracle, Texas Instruments, MCI Systemhouse and others. What

70 Amirkabir University of Technology, Computer Engineering Faculty, Intelligent Systems Laboratory70 UML: History The Unified Modelling Language is a standard graphical language for modelling object oriented software –At the end of the 1980s and the beginning of 1990s, the first object-oriented development processes appeared –The proliferation of methods and notations tended to cause considerable confusion –Two important methodologists Rumbaugh and Booch decided to merge their approaches in 1994. They worked together at the Rational Software Corporation –In 1995, another methodologist, Jacobson, joined the team His work focused on use cases –In 1997 the Object Management Group (OMG) started the process of UML standardization What

71 Amirkabir University of Technology, Computer Engineering Faculty, Intelligent Systems Laboratory71 Inputs to UML Fusion Operation descriptions, Message numbering UML Meyer Before and after conditions Harel State charts Wirfs-Brock Responsibilities Embley Singleton classes, High-level view Odell Classification Shlaer - Mellor Object Lifecycles Gamma, et.al Frameworks, patterns, notes Booch Jacobson Rumbaugh

72 Amirkabir University of Technology, Computer Engineering Faculty, Intelligent Systems Laboratory72 Benefits of the Unified Modeling Language –Defines a seamless mapping from analysis to design to implementation –Defines an expressive and consistent notation Makes it easier to communicate with others Helps point out omissions and inconsistencies Supports both small and large-scale analysis and design Why

73 Amirkabir University of Technology, Computer Engineering Faculty, Intelligent Systems Laboratory73 UML features –It has detailed semantics –It has extension mechanisms –It has an associated textual language Object Constraint Language (OCL) The objective of UML is to assist in software development It is not a methodology Why

74 Amirkabir University of Technology, Computer Engineering Faculty, Intelligent Systems Laboratory74 UML diagrams –Class diagramsClass diagrams describe classes and their relationships –Interaction diagrams show the behaviour of systems in terms of how objects interact with each other –State diagrams and activity diagramsState diagrams and activity diagrams show how systems behave internally –Component and deployment diagrams show how the various components of systems are arranged logically and physically What

75 Amirkabir University of Technology, Computer Engineering Faculty, Intelligent Systems Laboratory75 UML Views of a System What

76 Amirkabir University of Technology, Computer Engineering Faculty, Intelligent Systems Laboratory76 What is Use-Case View? It addresses the understandability and usability of the system This view looks at actors and use cases along with their interactions. The diagrams in this view are: 1.use case diagrams 2.sequence diagrams(*) 3.collaboration diagrams(*) (*) they belongs to this view as use case realizations Actor Relationship Use case Use caseSystem What

77 Amirkabir University of Technology, Computer Engineering Faculty, Intelligent Systems Laboratory77 Use Case Modeling Use case modeling is the process of modeling a system’s functions in terms of business events, who initiated the events, and how the system responds to the events. What

78 Amirkabir University of Technology, Computer Engineering Faculty, Intelligent Systems Laboratory78 Use Case Modeling Benefits As a basis to help identify objects and their high-level relationships and responsibilities. A view of system behavior from an external person’s viewpoint. An effective tool for validating requirements. An effective communication tool. As a basis for a test plan. As a basis for a user’s manual. Why

79 Amirkabir University of Technology, Computer Engineering Faculty, Intelligent Systems Laboratory79 Use Case Modeling Process Step 1: Identifying ActorsIdentifying Actors Step 2: Identifying Use CasesIdentifying Use Cases Step 3: Constructing a Use Case ModelConstructing a Use Case Model Step 4: Describe the Use CasesDescribe the Use Cases How

80 Amirkabir University of Technology, Computer Engineering Faculty, Intelligent Systems Laboratory80 Who Reads Use-Case Documentation? –Customer -- approve what the system should do –Users -- provide system understanding –System Developers -- document system behavior –Reviewers --Examine the flow of events –System Analysts (System Designer) -- provide the basis for analysis and design –System Tester -- as a base for test cases –Project Leader -- project planning –Technical Writer -- When writing the user’s guide for the end users Who

81 Amirkabir University of Technology, Computer Engineering Faculty, Intelligent Systems Laboratory81 Essentials of UML Class Diagrams The main symbols shown on class diagrams are: –ClassesClasses –represent the types of data themselves –AssociationsAssociations –represent linkages between instances of classes –Attributes –are simple data found in classes and their instances –Operations –represent the functions performed by the classes and their instances –Generalizations –group classes into inheritance hierarchies What

82 Amirkabir University of Technology, Computer Engineering Faculty, Intelligent Systems Laboratory82 Class Modeling Step 1: Find the Potential ObjectsFind the Potential Objects –Underlining (or highlighting) the use case nouns Step 2: Select the Proposed ObjectsSelect the Proposed Objects –Removing the nouns that represent: Synonyms Nouns outside the scope of the system Nouns that are roles without unique behavior or are external roles Unclear nouns that need focus Nouns that are really actions or attributes How

83 Amirkabir University of Technology, Computer Engineering Faculty, Intelligent Systems Laboratory83 Finding Objects –Objects are identified by examining the nouns and noun phrases in use cases and scenarios –Nouns found may be: Objects Description of the state of an object External entities and/or Actors None of the above How

84 Amirkabir University of Technology, Computer Engineering Faculty, Intelligent Systems Laboratory84 Filtering Nouns –When underlining nouns, be aware that: Several terms may refer to the same object One term may refer to more than one object Natural language is very ambiguous –This approach can identify many unimportant objects The list of nouns must be filtered –A word of caution Any noun can be ‘verb’ed; any verb can be ‘noun’ed –Results are heavily dependent on the writing skill of the author(s) How

85 Amirkabir University of Technology, Computer Engineering Faculty, Intelligent Systems Laboratory85 Looking at the Nouns –The following requirement was written for a banking system q“Legal requirements shall be taken into account” –If ONLY the nouns are considered, what will happen? Bottom line: Each noun must be considered in the context of the problem domain -- it cannot stand by itself Bottom line: Each noun must be considered in the context of the problem domain -- it cannot stand by itself What

86 Amirkabir University of Technology, Computer Engineering Faculty, Intelligent Systems Laboratory86 What is a State Transition Diagram? –A state transition diagram is used to show the life history of a given class, the events that cause a transition from one state to another, and the actions that result from a state change –State space of a given class is the enumeration of all the possible states of an object –The state of an object is one of the possible conditions in which an object may exist It encompasses all of the properties of the object –Usually static Plus the current values of each of these properties –Usually dynamic What

87 Amirkabir University of Technology, Computer Engineering Faculty, Intelligent Systems Laboratory87 Behavioral Modeling Behavior: Reaction to Events Behavioral Model: Used to represent and understand the behavior of the system, a part of a system or system objects. Represented by UML state-machine diagram. Helps in correct implementation. What

88 Amirkabir University of Technology, Computer Engineering Faculty, Intelligent Systems Laboratory88 Where to start Behavioral Modeling? –During analysis, initially concentrate on the behavior of the classes with significant dynamic behavior –For a given class look for possible states by: Evaluating attribute values Evaluating operations Define the rules for each state and Identify the valid transactions between states –Examine message trace or object message diagrams that involve the class being modeled The interval between two operations may be a state Where

89 Amirkabir University of Technology, Computer Engineering Faculty, Intelligent Systems Laboratory89 Building State-machine diagram 1- Identifying entities with complex behavior. In analysis: Business Actors, domain classes with complex behavior and variable states. In design: Boundary and Control classes. 2- Identifying start and stop states. 3- Identifying the events that affects entities. 4- Tracing event effects and identifying internal states. 5- Identifying entry and exit actions of each state 6- Expanding each state into sub-states (if needed) How

90 Amirkabir University of Technology, Computer Engineering Faculty, Intelligent Systems Laboratory90 Introduction to Patterns The recurring aspects of designs are called design patterns. –A pattern is the outline of a reusable solution to a general problem encountered in a particular context –Many of them have been systematically documented for all software developers to use –A good pattern should Be as general as possible Contain a solution that has been proven to effectively solve the problem in the indicated context. Studying patterns is an effective way to learn from the experience of others What

91 Amirkabir University of Technology, Computer Engineering Faculty, Intelligent Systems Laboratory91 Pattern description Context: The general situation in which the pattern applies Problem: A short sentence or two raising the main difficulty. Forces: The issues or concerns to consider when solving the problem Solution: The recommended way to solve the problem in the given context. —‘to balance the forces’ Antipatterns: (Optional) Solutions that are inferior or do not work in this context. Related patterns: (Optional) Patterns that are similar to this pattern. References: Who developed or inspired the pattern. What

92 Amirkabir University of Technology, Computer Engineering Faculty, Intelligent Systems Laboratory92 The Player-Role Pattern –Context: A role is a particular set of properties associated with an object in a particular context. An object may play different roles in different contexts. –Problem: How do you best model players and roles so that a player can change roles or possess multiple roles? What

93 Amirkabir University of Technology, Computer Engineering Faculty, Intelligent Systems Laboratory93 Player-Role –Forces: It is desirable to improve encapsulation by capturing the information associated with each separate role in a class. You want to avoid multiple inheritance. You cannot allow an instance to change class –Solution: «Player» «Role1»«Role2» «AbstractRole» What

94 Amirkabir University of Technology, Computer Engineering Faculty, Intelligent Systems Laboratory94 Player-Role Example 1:

95 Amirkabir University of Technology, Computer Engineering Faculty, Intelligent Systems Laboratory95 Player-Role Example 2:

96 Amirkabir University of Technology, Computer Engineering Faculty, Intelligent Systems Laboratory96 Player-Role Antipatterns: –Merge all the properties and behaviours into a single «Player» class and not have «Role» classes at all. –Create roles as subclasses of the «Player» class. What

97 Amirkabir University of Technology, Computer Engineering Faculty, Intelligent Systems Laboratory97 Difficulties and Risks When Creating Class Diagrams –Patterns are not a panacea: Whenever you see an indication that a pattern should be applied, you might be tempted to blindly apply the pattern. However this can lead to unwise design decisions. –Resolution: Always understand in depth the forces that need to be balanced, and when other patterns better balance the forces. Make sure you justify each design decision carefully. What

98 Amirkabir University of Technology, Computer Engineering Faculty, Intelligent Systems Laboratory98 Difficulties and Risks When Creating Class Diagrams –Developing patterns is hard Writing a good pattern takes considerable work. A poor pattern can be hard to apply correctly –Resolution: Do not write patterns for others to use until you have considerable experience both in software design and in the use of patterns. Take an in-depth course on patterns. Iteratively refine your patterns, and have them peer reviewed at each iteration. What


Download ppt "Amirkabir University of Technology, Computer Engineering Faculty, Intelligent Systems Laboratory1 Requirements Analysis Section Three Version: 1.0 Mehr."

Similar presentations


Ads by Google