Presentation is loading. Please wait.

Presentation is loading. Please wait.

Information System Analysis Object-Oriented Analysis & Design.

Similar presentations


Presentation on theme: "Information System Analysis Object-Oriented Analysis & Design."— Presentation transcript:

1 Information System Analysis Object-Oriented Analysis & Design

2 Introduction Object-oriented (o-o) techniques work well in situations where complicated systems are undergoing continuous maintenance, adaptation, and design. The Unified Modeling Language (UML) is an industry standard for modeling object-oriented systems.

3 Introduction The object-Oriented modeling approach provides several benefits, including: Ability to tackle more challenging problem domains. Improved communication among users, analysts, designers, and programmers.

4 Introduction The object-Oriented modeling approach provides several benefits, including: Reusability of analysis, design, and programming results. Maintaining systems Increased consistency among the models developed during object-oriented analysis, design, and programming

5 Object- Oriented\ Definitions and concepts Object: – An object, represents a real-world thing or event. – Objects may be customers, items, and so on. – Objects may be GUI displays or text areas on a display. – Objects are represented by and grouped into classes.

6 Object- Oriented\ Definitions and concepts Object \ Example

7 Object- Oriented\ Definitions and concepts Class: – A class is a group of related objects has a set of shared attributes and behaviors.  Attributes are properties of a class possessed by all objects.  A method (Operation) is an action that can be requested from any object in the class.  Instantiate is a term used when an object is created from a class.  Behavior is a manner that represents how an object acts and reacts

8 Object- Oriented\ Definitions and concepts Class \ Example

9 Object- Oriented\ Definitions and concepts Class:\ Example

10 Object- Oriented\ Definitions and concepts Messages: Information sent by one object to another

11 Object- Oriented\ Definitions and concepts Inheritance: Inheritance is when a new class is created from another class. The original class is the parent or base class. The new class is the child or derived class. The child class receives the attributes and methods of the parent class.

12 Object- Oriented\ Definitions and concepts Inheritance \ Example

13 Object- Oriented\ Definitions and concepts Encapsulation: Encapsulation means objects can be accessed only through their interfaces. The caller has no knowledge of variables inside and how the method is implemented. As long as the interfaces are the same, changes to the internal details can be made without changing the code that uses the objects.

14 Object- Oriented\ Definitions and concepts Encapsulation: In object-oriented, t he technique of hiding the internal implementation details of an object from its external viewobject-oriented The object is said to "publish its interfaces." Other objects adhere to these interfaces to use the object without having to be concerned with how the object accomplishes it. The idea is "don't tell me how you do it; just do it."

15 Object- Oriented\ Definitions and concepts Encapsulation \ Example

16 Object- Oriented\ Definitions and concepts Polymorphism: In object-oriented programming, polymorphism refers to a programming language's ability to process objects differently depending on their data type or class. More specifically, it is the ability to redefine methods for derived classes. For example, given a base class shape, polymorphism enables the programmer to define different area methods for any number of derived classes, such as circles, rectangles and triangles.object-oriented programming language'sdata typeclassprogrammer

17 Object- Oriented\ Definitions and concepts Polymorphism \ Example

18 Unified Modeling Language/ UML The Unified Modeling Language (UML) is a graphical language for visualizing, specifying, constructing, and documenting the artifacts of a software systems.

19 Unified Modeling Language/ UML Visualizing: Explicit model facilitates communication Each symbol has well-defined semantics behind it

20 Unified Modeling Language/ UML Visual Modeling: VISUAL MODELING is a way of thinking about problems using (graphical) models organized around real-world idea. UML is a product of VISUAL MODELING language.

21 Unified Modeling Language/ UML Specifying: UML addresses the specification of all important analysis, design, and implementation decisions.

22 Unified Modeling Language/ UML Constructing: Forward engineering: generation of code from model into programming language Reverse engineering: reconstructing model from implementation Round-trip engineering: going both ways

23 Unified Modeling Language/ UML Documenting: Deliverables, such as requirements documents, functional specifications, and test plans Materials that are critical in controlling, measuring, and communicating about a system during development and after deployment

24 Unified Modeling Language/ UML Models are useful for: understanding problems, communicating with everyone involved with project (customer, analysts, designers, etc.) preparing documentation designing programs and databases

25 Unified Modeling Language/ UML What is a good Model? it is a relevant model it is possible to communicate it fits its purpose it captures the essentials

26 Unified Modeling Language/ UML What does UML give you? The UML gives you a standard way to write a system’s blueprints covering conceptual things, such as business processes and system functions, classes written in a specific programming language, database schemas, and reusable software components.

27 Unified Modeling Language/ UML Note: UML is phase independent and it is a modeling language (NOT a method)

28 Unified Modeling Language/ UML UML Diagrams: – Structural Type Diagrams (Static Representations) Class Diagrams – Behavioral Type Diagrams (Dynamic Representations) Activity Diagrams Use Case Diagrams Sequence Diagrams

29 Unified Modeling Language/ UML Activity Diagram: The easiest way to visualize an Activity diagram is to think of a flowchart of a code. Activity diagrams represent the business and operational workflows of a system An Activity diagram is a dynamic diagram that shows the activity and the event that causes the object to be in the particular state.

30 Unified Modeling Language/ UML How to Draw Activity Diagram: Activity diagrams show the flow of activities through the system Diagrams are read from top to bottom and have branches and forks to describe conditions and parallel activities. A fork is used when multiple activities are occurring at the same time. The branch describes what activities will take place based on a set of conditions All branches at some point are followed by a merge to indicate the end of the conditional behavior started by that branch. After the merge all of the parallel activities must be combined by a join before transitioning into the final activity state

31 Unified Modeling Language/ UML Activity diagram \ Example 1: Manage course information

32 Unified Modeling Language/ UML Activity diagram \ Example 2 : Ordering

33 Unified Modeling Language/ UML Activity diagram \ Example 3 : Prepare Beverage

34 Unified Modeling Language/ UML Use Case Diagram: UML Use Case Diagrams can be used to describe the functionality of a system. Use case diagram is done in the early stages of system development (during the analysis phase) to help developers understand the functional requirements of the system without worrying about how those requirements will be implemented.

35 Unified Modeling Language/ UML Use Case Diagram have the following Elements: 1. Actor:  Is an external entity that interact with the system (similar to EE in DFD).  It is someone or something that exchanges information with the system.  An actor is a role that a user plays in the system  What is the Different between Actor & User? An Actor

36 Unified Modeling Language/ UML Use Case Diagram have the following Elements: 1. Actor: A user of the system may play several different roles through the course of his, her or its job (since an actor may be another system). Examples of actors are salesperson, manager, support person, and web store system. It is possible that the same person may be a sales person and also provide support.

37 Unified Modeling Language/ UML Use Case Diagram have the following Elements: 2. Use Case: Represents a sequence of related actions initiated by an actors, it’s a specific way of using the system A use case is a set of scenarios that describing an interaction between a user and a system. A use case diagram displays the relationship among actors and use cases.

38 Unified Modeling Language/ UML Use Case: Example Print Invoice Correct Invoice Chase Payment Register Bad Debt

39 Unified Modeling Language/ UML Actors and Use Cases: An Actor may use many Use Cases A Use Case may interface with many Actors We draw a simple line to indicate interaction

40 Unified Modeling Language/ UML Relationships between actors and use cases: An Actor A Use Case The direction of the arrow indicates who initiates the interaction.

41 Unified Modeling Language/ UML Relationships between actors and use cases: Sometimes the use case initiates interaction An Actor A Use Case

42 Unified Modeling Language/ UML 3. Relationship between Use cases: One Use Case may use another Use Case Sometimes a Use Case gets too big to manage sensibly and it makes sense to break this down into smaller Use Cases.

43 Unified Modeling Language/ UML There are two ways Use Cases can relate: A. Use Cases include other Use Cases Change InvoiceAdd item to sales menu > In this case the second Use Case is always invoked as part of the execution of the first. \ >

44 Unified Modeling Language/ UML There are two ways Use Cases can relate: B. Use Cases extend other Use Cases A Use Case is only called occasionally from another Use Case Chase Payment Issue Warning Letter >

45 Unified Modeling Language/ UML Use Case Diagram / Guidelines: Use Case Names Begin With a Strong Verb Name Use Cases Using Domain Terminology Place Your Primary Use Cases In The Top-Left Corner Of The Diagram Imply Timing Considerations By Stacking Use Cases.

46 Unified Modeling Language/ UML Use Case Diagram / Example 1:

47 Unified Modeling Language/ UML Example 2

48 Unified Modeling Language/ UML Example 3

49 Unified Modeling Language/ UML Example 3

50 Unified Modeling Language/ UML Example 4

51 Unified Modeling Language/ UML Class Diagram A class diagram describes the types of objects in the system and the various kinds of static relationships that exist among them. – A graphical representation of a static view on static elements

52 Unified Modeling Language/ UML Elements of a Class Diagram: Class Attributes Operations Relationships

53 Unified Modeling Language/ UML Elements of a Class Diagram: A class is the description of a set of objects having similar attributes, operations, relationships and behavior. An object is any person, place, thing, concept, event, screen, or report applicable to your system. Objects both know things (they have attributes) and they do things (they have methods)

54 Unified Modeling Language/ UML Window Size visibility display() hide() Class Name Attributes Operations

55 Unified Modeling Language/ UML Relationships: 1. Associations:  A semantic relationship between two or more classes that specifies connections among their instances.  A structural relationship, specifying that objects of one class are connected to objects of a second (possibly the same) class.  Example: “An Employee works in a department of a Company” CompanyDepartmentEmployee

56 Unified Modeling Language/ UML Multiplicity: An indication of how many objects participate in a given relation ship IndicatorMeaning 0..1 Zero or one (one is optional) 1One only (Mandatory) 0..* Zero or more (more means many and its optional) 1..*One or more nOnly n (where n>1) 0..n0 to n (n>1) 1..n1 to n (n>1)

57 Unified Modeling Language/ UML 2. Aggregation A special form of association that models a whole-part relationship between an aggregate (the whole) and its parts. Whole Part Car Door House 1..*2..*

58 Unified Modeling Language/ UML 2. Aggregation Aggregation is a specialization of association, specifying a whole-part relationship between two objects. employee is part of a team An engine is part of a plane 3. Inheritance Generalization Specialization

59 Unified Modeling Language/ UML

60 Sequence Diagram Definition: Is an interaction diagram that emphasizes the time ordering of messages for a specific use case. A sequence diagram: is a graphical view of a scenario that shows object interaction in a time-based sequence-what happens first, what happens next. What is a UML Sequence Diagram? Diagram used to graphically show the interaction between objects over time.

61 Unified Modeling Language/ UML Sequence Diagram Graphically, it is a 2-dimensional table that shows objects arranged along the X-axis and messages, ordered in increasing time, along the Y-axis. Sequence diagrams have two dimensions:  Horizontal :Represents different objects  Vertical : Represents time

62 Unified Modeling Language/ UML sequence diagrams parts: 1. Actor Actors can also communicate with objects, so they too can be listed as a column. An Actor is modeled using the stick figure. person (or role) that “interacts” with a system by entering input data and receiving output data

63 Unified Modeling Language/ UML sequence diagrams parts: 2. Object Objects are instances of classes, and are arranged horizontally. The pictorial representation for an Object is a class (a rectangle) with the name prefixed by the object name (optional) and a semi-colon. :the ATM

64 Unified Modeling Language/ UML sequence diagrams parts: 3. Lifeline Lifeline – Shows the time of existence of the object – from creation to deletion Activation/Control focus – Shows the time period during which the object performs an operation :the ATM time Lifeline Activation/ Control focus

65 Unified Modeling Language/ UML sequence diagrams parts: 4. Message Objects interact with one another using messages Messages, modeled as horizontal arrows between Activations, indicate the communications between objects.

66 Unified Modeling Language/ UML Types of Message: 1. Simple or sequential: Caller waits for receiving object to finish processing. It’s bi-directional “one-way message” but it may include a response. It’s represented by an ordinary arrow. 2. Response (Return): Shows the objects response of the other objects simple message. Represented by a dashed-line arrow.

67 Unified Modeling Language/ UML Creating a Sequence diagram\Guidelines:- Select Use-case and Scenario Using Scenario 1.Identify Actors 2.Identify Objects  Look for nouns  Already identified in the Class diagram 3.Identify initiating actor 4.Add objects and lifeline to diagram

68 Unified Modeling Language/ UML Creating a Sequence diagram:- 5.Create a controller object  A point of contact created to coordinate the actor’s interaction with the rest of the system  Provides an interface between the actor and the internal system  They are invented objects who mangers other objects  Eg: ATM, GUI window  Usually created (not always necessary) 6.Discover Messages  Look for verbs  Identify the source and destination of the message; 7.Add messages to diagram

69 Unified Modeling Language/ UML Sequence diagram\Example (cellular phone):- Consider your cell phone.when you dial a number you normally pick the person you want to call, the phones software search’s the number in your phonebook, displays it on your screen & sends the request of calling to the company. so….

70 Unified Modeling Language/ UML After analyzing the case: – Actors needed : You “ The owner ”: The one who’s dialing or requesting the call. The company : who receives the call to divert it to the requested person.

71 Unified Modeling Language/ UML The objects are: – The keypad “ the one used to insert the selection” – The phone’s software, or let us call it “controller” : searches the number, displays it & sends the request. - Phone book “ where the numbers are kept” - Screen “ displays the number”

72 Unified Modeling Language/ UML Notes 1.When you dial a number, You first select the name using the keypad. So a message is sent from the actor ”you” to the keypad object. 2.When you dial a number, You first select the name using the keypad. So a message is sent from the actor ”you” to the keypad object. 3.The number is searched and retrieved to the controller.  Two messages are sent:  The one from the controller to the phonebook  Then from the phonebook back to the controller

73 Note 1 Note 2

74 Note 3

75 Unified Modeling Language/ UML 4.The controller displays the number on the screen & the user chooses to call, so the controller sends the request to the company.  Three messages has been sent:  The message from the controller to the screen to display the number  The message from the user to the controller to send the call request  The message from the controller to the company with the call request.

76 Note 4

77 Final diagram


Download ppt "Information System Analysis Object-Oriented Analysis & Design."

Similar presentations


Ads by Google