1 / 29

Introduction to UML

Introduction to UML. Software Engineering BIT-8 April, 16,2008. Agenda. Part 1: Why modeling? Introduction to Unified Modeling Language. Uses of UML Mapping Diagrams. Part 2: Use-Case Diagrams Actors/Use-cases Part 3: Lab-Task: Case Study. Modeling.

macon
Download Presentation

Introduction to UML

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Introduction to UML Software Engineering BIT-8 April, 16,2008

  2. Agenda • Part 1: • Why modeling? • Introduction to Unified Modeling Language. • Uses of UML • Mapping Diagrams. • Part 2: • Use-Case Diagrams • Actors/Use-cases • Part 3: • Lab-Task: Case Study

  3. Modeling • A model is a simplified representation of a complex reality. • Complex systems and software cannot be understood without properly modeling them. • Today, software are getting complex and consequently we need to understand them through modeling.

  4. Modeling • In simple words, we need simpler representations for complex models and modeling is a mean for dealing with complexity. • A modeling method comprises a language and also a procedure for using the language to construct models. • Modeling is the only way to visualize your design and check it against requirements before you start to code. 

  5. Unified Modeling Language (UML) • UML is a notational system which is principally graphical and aims at modeling system using object oriented concepts. • UML is termed as a “Visual Modeling Language’. • Generally UML is used for modeling software systems. • UML consists of : • Views: shows different faces of the system and links with the process • Diagrams: are basically the graphs that explain the contents of view. • Model Elements: are contained within the diagrams.

  6. Unified Modeling Language • UML is a complete language for capturing knowledge about a subject and then expressing that knowledge i.e. gathering requirements and then modeling those requirements. • Such modeling includes two phases : • Analysis • Design

  7. Unified Modeling Language UML • Analysis Phase: • System is described by a set of requirements. • USE-CASE DIAGRAM • Design Phase: • It is tightly connected to the analysis phase, as it starts from the identification of requirements and continues up till the detailed specification of those requirements. • Class Diagrams • Interaction Diagrams • State Chart Diagrams • Deployment Diagrams

  8. USE-CASE DIAGRAMS Software Engineering BIT-8

  9. Use-Case Diagram • Use Case Diagram is used to describe the functionalities provided by a system and the users associated with that system. • The Use case diagram is used to identify the primary elements and processes that form the system. • The primary elements are termed as "actors" and the processes are called "use cases." • The Use case diagram shows which actors interact with each use case.

  10. Use-Case Diagram • The main purpose of the use-case diagram is: • to help development teams visualize the functional requirements of a system • To help identify relationship of "actors" (human beings who will interact with the system) with essential processes • and understand the relationships among different use cases

  11. Elements of a use-case diagram • Use-case diagrams contain the following elements: • Actors, which represent users of a system, including human users and other systems. • Use Cases, which represent functionality or services provided by a system to users.

  12. Actor • Definition: • The outside entity which communicates with the system: • A Person (user) • An external system • Physical Environment • An Actor has a unique name and an optional description • Symbol: UML notation used to represent an actor

  13. Actor (Example) • Consider the following scenario related to a “University Management System” : • In a university management system, a Student can submit the assignments, the instructor marks those assignments and then uploads the result. The Student is allowed to view the Results. • Now, by recalling the definition of actor, can you identify the actors in this System? • Student • Instructor

  14. Actor (Example/2) Student Instructor Student is an external entity which interacts with the system. Student is a user of this system, as some services are used by it. Instructor is another external entity which interacts with the university management system. Student Instructor

  15. Use-case • Represent functionality or services provided by a system to users. • It is a description of set of sequence of actions that a system perform that produces an observable result. • A use case represents a class of functionality provided by the system as an event flow. • Use cases describe the interaction between a primary actor and the system itself

  16. Use-case • The use case technique is used in software and systems engineering to capture the functional requirements of a system. • Each use case describes how the actor will interact with the system to achieve a specific goal. • One or more scenarios may be generated from each use case, corresponding to the detail of each possible way of achieving that goal. • Symbol : UML notation used to represent a use-case

  17. Use-case (Example) • Consider the same example again: • In a university management system, a Student can submit the assignments, the instructor marks those assignments and then uploads the result. The Student is allowed to view the Results. • Now, by recalling the definition of use-case, can you identify the use-cases in this System? • Submit Assignments • Mark Assignments • Upload Results • View Results

  18. Use-case (Example/2) • The use-cases are linked with the functional requirements of this system. In this example : • Student submit the assignments. • Instructor marks the assignments. • Instructor upload the marks. • Student can view the marks. • It is now clear that how actors are interacting with different use-cases of this system. • Now, lets combine actors and use-cases in one diagram? Easy ?

  19. Symbols in Use-Case Diagrams ACTOR USE-CASE INTERACTION: denotes set of messages exchanged among objects NOTES/COMMENTS

  20. Use-Case Diagram (University Management System) SYSTEM BOUNDARY Submit Assignments Mark Assignments Student Upload Results View Results Instructor Package: University Management System

  21. Extending Use-Case Diagram Software Engineering BIT-8

  22. Lab-Exercise (Extracting Use-cases) 1 Hour Exercise

  23. Use-Case Associations • Use case association is the relationship between use cases • Important types: • Extends • A use case extends another use case • Include • A use case uses another use case (“functional decomposition”)

  24. <<Include>>: Functional Decomposition • A function in the original problem statement is too complex to be solved immediately. • What’s the Solution? • Describe the function as the aggregation of a set of simpler functions • The associated use case is decomposed into smaller use cases

  25. <<include>> Example • The include association from Use Case A to Use Case B indicates that an instance of A performs all the behavior described in B • In <<include>> association, the base case cannot exist alone. It is always called with the supplier use case Base (A) <<include>> Supplier (B)

  26. <<Extend>> Association for Use Cases • Problem: • The functionality in the original problem statement needs to be extended. • Solution: • An extend association from Use Case B to Use Case A indicates that B is an extension of A. <<extend>> A B

  27. Example • Example: • The use case “ReportEmergency” is complete by itself , but can be extended by the use case “Help” for a specific scenario in which the user requires help • Note: In an extend association, the base use case can be executed without the use case extension <<extend>> Help ReportEmergency Field Officer

  28. Lab-Exercise • Read the following case : • Identify the actors • Identify (extract ) the use cases • Construct a proper use-case diagram (with proper symbols & notations)

  29. Case-Study • Consider the Library Management System of SEECS. A Student is allowed to issue books for a period of two weeks. Student can read newspapers/magazines in the library and can even access the databases for e-books. The Library Staff is responsible for maintaining the records of students and along with the issued books. The Staff marks an entry in the register whenever a student issue or return a book. A fine is charged on a student if he/she fail to return the book on time. The Librarian is there to manage the staff, check the records and prepare reports for DG/DEAN.

More Related