UML and its Use-Case Modeling Professor Chen School of Business Gonzaga University Spokane, WA 99258

Slides:



Advertisements
Similar presentations
Object-Oriented Application Development Using VB.NET 1 Chapter 5 Object-Oriented Analysis and Design.
Advertisements

Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall A.1.
CS 340 UML Class Diagrams. A model is an abstraction of a system, specifying the modeled system from a certain viewpoint and at a certain level of abstraction.
2008/03/25 Unified Modeling Lanauage 1 Introduction to Unified Modeling Language (UML) – Part One Ku-Yaw Chang Assistant Professor.
Object-Oriented Analysis and Design
Introduction To System Analysis and Design
UML – Class Diagrams.
L4-1-S1 UML Overview © M.E. Fayad SJSU -- CmpE Software Architectures Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I.
Jerry Gao Ph.D.9/2001 The UML: Object-Oriented Modeling The Unified Modeling Language (UML) Instructor: Jerry Gao Ph.D. San Jose State University
Slide 1 Systems Analysis & Design CS183 Spring Semester 2008 Dr. Jonathan Y. Clark Course Website:
Slide 1 Chapter 7 Structural Modeling. Slide 2 Key Ideas A structural or conceptual model describes the structure of the data that supports the business.
Chapter 14 (Web): Object-Oriented Data Modeling
7M701 1 Class Diagram advanced concepts. 7M701 2 Characteristics of Object Oriented Design (OOD) objectData and operations (functions) are combined 
© Copyright Eliyahu Brutman Programming Techniques Course.
Copyright 2004 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Second Edition Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Appendix.
Sharif University of Technology Session # 7.  Contents  Systems Analysis and Design  Planning the approach  Asking questions and collecting data 
PRJ566: PROJECT PLANNING AND MANAGEMENT Class Diagrams.
Chapter 14: Object-Oriented Data Modeling
Unified Modeling Language
Introduction To System Analysis and design
Chapter 13 (Online): Object-Oriented Databases
Systems Analysis and Design in a Changing World, Tuesday, Feb 27
SOFTWARE ENGINEERING BIT-8 APRIL, 16,2008 Introduction to UML.
CS 360 Lecture 6.  A model is a simplification of reality  We build models to better understand the system being developed.  We build models of complex.
Copyright 2001 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Appendix A Object-Oriented.
Copyright 2002 Prentice-Hall, Inc. Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich Chapter 20 Object-Oriented.
Database Management System Prepared by Dr. Ahmed El-Ragal Reviewed & Presented By Mr. Mahmoud Rafeek Alfarra College Of Science & Technology Khan younis.
Chapter 6: Structured Vs. Object Oriented Analysis and Design.
Introduction To System Analysis and Design
Object-Oriented Analysis and Design An Introduction.
An Introduction to Java Chapter 11 Object-Oriented Application Development: Part I.
Programming in Java Unit 3. Learning outcome:  LO2:Be able to design Java solutions  LO3:Be able to implement Java solutions Assessment criteria: 
Faculty of Computer & Information Software Engineering Third year
Requirements Analysis Visual Modeling] Lab 02 Visual Modeling (from Visual Modeling with Rational Rose and UML) A way of thinking about problems using.
Copyright 2002 Prentice-Hall, Inc. Chapter 2 Object-Oriented Analysis and Design Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey.
Slide 1 Structural Modeling Chapter 7. Slide 2 Key Ideas A structural or conceptual model describes the structure of the data that supports the business.
CS3773 Software Engineering Lecture 04 UML Class Diagram.
CHAPTER 13 (ONLINE): OBJECT-ORIENTED DATA MODELING © 2013 Pearson Education, Inc. Publishing as Prentice Hall 1 Modern Database Management 11 th Edition.
1 © Prentice Hall, 2002 Chapter 14: Object-Oriented Data Modeling Modern Database Management 6 th Edition Jeffrey A. Hoffer, Mary B. Prescott, Fred R.
© 2009 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 15: Object-Oriented Data Modeling Modern Database Management 9 h Edition Jeffrey A.
© 2011 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 13 (Online): Object-Oriented Data Modeling Modern Database Management 10 th Edition.
CHAPTER 13: OBJECT-ORIENTED DATA MODELING (OVERVIEW) © 2013 Pearson Education, Inc. Publishing as Prentice Hall 1 Modern Database Management 11 th Edition.
UML diagrams What is UML UML diagrams –Static modeoing –Dynamic modeling 1.
Unified Modeling Language © 2002 by Dietrich and Urban1 ADVANCED DATABASE CONCEPTS Unified Modeling Language Susan D. Urban and Suzanne W. Dietrich Department.
Modeling system requirements. Purpose of Models Models help an analyst clarify and refine a design. Models help simplify the complexity of information.
Fall 2010 CS4310 Requirements Engineering A Brief Review of UML & OO Dr. Guoqiang Hu Department of Computer Science UTEP 1.
L6-S1 UML Overview 2003 SJSU -- CmpE Advanced Object-Oriented Analysis & Design Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I College.
Copyright © 2013 Curt Hill UML Unified Modeling Language.
1 System Analysis and Design Using UML INSTRUCTOR: Jesmin Akhter Lecturer, IIT, JU.
Chapter 1 Applying UML and Patterns. The Need for Software Blueprints Knowing an object-oriented language and having access to a library is necessary.
Object-Oriented Data Modeling
Design Model Lecture p6 T120B pavasario sem.
Object Oriented Analysis: Associations. 2 Object Oriented Modeling BUAD/American University Class Relationships u Classes have relationships between each.
Lecture 14 22/10/15. The Object-Oriented Analysis and Design  Process of progressively developing representation of a system component (or object) through.
Object-Oriented Application Development Using VB.NET 1 Chapter 5 Object-Oriented Analysis and Design.
Copyright © 2009 Pearson Education, Inc. Publishing as Prentice Hall Appendix A Object-Oriented Analysis and Design A.1.
Object Oriented Programming and Data Abstraction Earl Huff Rowan University.
CHAPTER
Unified Modeling Language (UML)
Object-Oriented Analysis and Design
Analysis and Design with UML: Discovering Classes and Relationships
Analysis and Design with UML: Discovering Classes and Relationships
Analysis and Design with UML: Discovering Classes and Relationships
Chapter 20 Object-Oriented Analysis and Design
Appendix A Object-Oriented Analysis and Design
Analysis and Design with UML: Classes and Relationships
Appendix A Object-Oriented Analysis and Design
Appendix A Object-Oriented Analysis and Design
From Class Diagram to Contract Diagram
Presentation transcript:

UML and its Use-Case Modeling Professor Chen School of Business Gonzaga University Spokane, WA

UML (Use-Case Modeling), Dr. Chen TM -2 Methods vs. Modeling Languages n A model has its purpose of structuring our thoughts n A method –is an explicit way of structuring one’s thinking and actions –tells us: What to do How to do it When to do it Why it’s done

UML (Use-Case Modeling), Dr. Chen TM -3 Method, Modeling Language and Process METHOD = + Modeling Language PROCESS

UML (Use-Case Modeling), Dr. Chen TM -4 Process vs. Method n A process is a group of activities that, if done correctly, will achieve an explicit goal. n A method, in contrast, is normally also considered as a set of related activities, but without explicit goals, resources, and rules.

UML (Use-Case Modeling), Dr. Chen TM -5 What is a Process? Process Resources Documentation, Products, Models etc. Humans, computers tools, Information What to do, How to do it, When to do it, Why it should be done Rules > [VALUE]

UML (Use-Case Modeling), Dr. Chen TM -6 What is a Process? Process Resources Documentation, Products, Models etc. Humans, computers tools, Information What to do, How to do it, When to do it, Why it should be done Rules > [VALUE] Software Development: Process CONTEXT, USER, STEPS A process is a group of activities that, if done correctly, will achieve an explicit goal.

UML (Use-Case Modeling), Dr. Chen TM -7 What is the UML? n The Unified Modeling Language (UML) is a graphical language for visualizing, specifying, constructing, and documenting the artifacts of a software-intensive systems. n UML is only a modeling language without a process –it is a lot easier to comprehend than a natural language

UML (Use-Case Modeling), Dr. Chen TM -8 What does UML give you? n The UML gives you a standard way to write a system’s blueprints covering conceptual things, such as business processes and system functions, as well as concrete thins, such as classes written in a specific programming language, database schemas, and reusable software components.

UML (Use-Case Modeling), Dr. Chen TM -9 How Applicable of UML? n The UML is applicable to anyone involved in the production, deployment, and maintenance of software.

UML (Use-Case Modeling), Dr. Chen TM -10 What is Visual Modeling? n VISUAL MODELING is a way of thinking about problems using (graphical) models organized around real-world idea. n UML is a product of VISUAL MODELING language.

UML (Use-Case Modeling), Dr. Chen TM -11 Models are useful for.. n understanding problems, n communicating with everyone involved with project (customer, domain experts, analysts, designers, etc.) n modeling enterprise, n preparing documentation, and n designing programs and databases

UML (Use-Case Modeling), Dr. Chen TM -12 Objectives of the Modeling Modeling promotes: n better understanding of requirements, n cleaner designs, and n more maintainable systems.

UML (Use-Case Modeling), Dr. Chen TM -13 What is a Good Model? A model is good when: Ê it is a relevant model Ë it is possible to communicate Ì it fits its purpose Í it captures the essentials

UML (Use-Case Modeling), Dr. Chen TM -14 System Boundary Use Case ACTOR (Role) Customer Statistics Sales Statistics Signing an insurance policy Figure: A Use-Cases Example

UML (Use-Case Modeling), Dr. Chen TM -15 Purposes of the Use-Case Modeling n What a new system should do n What an existing system already does

UML (Use-Case Modeling), Dr. Chen TM -16 What is an Actor? n An actor is a class not an instance. n It represents a role, not an individual user of the system. n primary vs. secondary actors –customer/user, developer, test teams vs. manager or board members n active vs. passive

UML (Use-Case Modeling), Dr. Chen TM -17 Return books Interlibrary loan Borrow books Library Member Figure: An Library Use-Cases Example Do research Read books, newspaper Purchase supplies Circulation Clerk Supplier

UML (Use-Case Modeling), Dr. Chen TM -18 Summary n Use-case modeling is a technique used to describe the functional requirements of a system n A use case is a set of sequence of actions performed in the system. n A scenario is an illustration or an example (instance) of a use case or collaboration. n An actor represents a role that an external entity (user, hardware) plays in interacting with the system.

UML (Use-Case Modeling), Dr. Chen TM -19 Insurance company Insurance contract Customer 10..* 1..* Figure 4.1: A simple mode of an insurance business. One insurance company has many (zero-to-many) insurance contracts. An insurance customer has many (zero-to-many) insurance contracts. An insurance contract is related to one insurance company. The insurance contract is related to many (one-to-many) insurance customers. The entities shown in the model are classes. Figure 4.1: A simple mode of an insurance business. One insurance company has many (zero-to-many) insurance contracts. An insurance customer has many (zero-to-many) insurance contracts. An insurance contract is related to one insurance company. The insurance contract is related to many (one-to-many) insurance customers. The entities shown in the model are classes.

UML (Use-Case Modeling), Dr. Chen TM -20 Figure 4.2 A Class in UML Attributes Operations Name

UML (Use-Case Modeling), Dr. Chen TM -21 Car registration number data speed direction Figure 4.3 A class car with the attributes registration number, data, speed, and direction. Attribute names typically begin with a lowercase letter

UML (Use-Case Modeling), Dr. Chen TM -22 Car registration number: String data: CarData speed: integer direction: Direction Figure 4.4 The car with typed attributes Invoice +amount : Real + date: Date + customer: String +specification: String -administrator: String Figure 4.5: A class with public and private attributes

UML (Use-Case Modeling), Dr. Chen TM -23 Invoice +amount : Real + date: Date=Current date + customer: String +specification: String -administrator: String=“Unspecified” Figure 4.6 A class with attributes and their default values

UML (Use-Case Modeling), Dr. Chen TM -24 Invoice +amount : Real +date: Date=Current date +customer: String -number_of_invoices: integer = 0 Figure 4.9 An Invoice class Public class Invoice { public double amount; public Date date = new Date(); public String customer; static private int number_of_invoices = 0; //Constructor, called every time an objects is created public Invoice () { // Other Initialization number_of_invoices++; //Increment the class attributes } // Other methods go here };

UML (Use-Case Modeling), Dr. Chen TM -25 Car + registration number: String + data: CarData + speed: integer + direction: Direction + drive (speed: integer, direction: Direction) + getData() : CarData Figure 4.10 The car has attributes and operations. The operation drive has two parameters, speed and direction. The operation getData has a return type, CarData.

UML (Use-Case Modeling), Dr. Chen TM -26 AuthorComputer Figure 4.15 An author uses a computer The author class has an association to the Computer class. Figure 4.15 An author uses a computer The author class has an association to the Computer class. Uses  Associations: Normal Association

UML (Use-Case Modeling), Dr. Chen TM -27 PersonCar 0..* Figure 4.16 A person owns many (zero-to-many) cars, A car can be owned by many (one-to-many) persons. Figure 4.16 A person owns many (zero-to-many) cars, A car can be owned by many (one-to-many) persons. 1..* Owns   Owned by

UML (Use-Case Modeling), Dr. Chen TM -28 PersonCar 0..* Figure 4.17 A navigable association says that a person can own many cars, but it does not say anything about how many people can own a car. Figure 4.17 A navigable association says that a person can own many cars, but it does not say anything about how many people can own a car. Owns

UML (Use-Case Modeling), Dr. Chen TM -29 Insurance company Insurance contract 10..* Customer 1..* Insurance policy Web Insurance policy 0..1  is expressed in an Expressed an  has   refer to has  refer to  Figure 4.18 A class diagram describing an insurance business Figure 4.18 A class diagram describing an insurance business

UML (Use-Case Modeling), Dr. Chen TM -30 Author name : String age: Integer 0..*1..* Computer name : String money: Integer Bob:Author name : String age: Integer 0..*1..* Bob’s PC COMPUTER name : String money: Integer Figure4.19 A class diagram and an object diagram and an example of the class diagram being instantiated

UML (Use-Case Modeling), Dr. Chen TM -31 Node Connects Recursive Association Figure 4.20 A network consists of many nodes connected to each other. Figure 4.20 A network consists of many nodes connected to each other. Person  married to

UML (Use-Case Modeling), Dr. Chen TM -32 Insurance contract Insurance company 10..*  refer to contracts  Figure 4.22 Insurance company has associations to Insurance contract Figure 4.22 Insurance company has associations to Insurance contract

UML (Use-Case Modeling), Dr. Chen TM -33 CarPerson Figure 4.24 What roles do Person and Car play in this association? Figure 4.24 What roles do Person and Car play in this association? Another example of Roles in Association  drives * * drivercompany car

UML (Use-Case Modeling), Dr. Chen TM -34 Person  married to wife husband Figure 4.25 A husband is married to a wife. Both husband and wife are people. If a person is not married, then he or she cannot play the role of husband or wife, which means that the married to association is no applicable. Figure 4.25 A husband is married to a wife. Both husband and wife are people. If a person is not married, then he or she cannot play the role of husband or wife, which means that the married to association is no applicable. Roles in Association

UML (Use-Case Modeling), Dr. Chen TM -35 Ready for the Next Run?

UML (Use-Case Modeling), Dr. Chen TM -36 Insurance contract 0..* Insurance policy 0..1  is expressed in an Expressed an  Insurance company 1has   refer to 1..*  has refer to  insurer Person policyholder husband  married to wife Figure 4.26 A class can play different roles in different associations. The model from Figures 4.18 and 4.25 are combined. In this model, a person can play the role of husband, wife, or policyholder. The insurance company plays the insurer role. Figure 4.26 A class can play different roles in different associations. The model from Figures 4.18 and 4.25 are combined. In this model, a person can play the role of husband, wife, or policyholder. The insurance company plays the insurer role. Roles in an Association

UML (Use-Case Modeling), Dr. Chen TM -37 File Directory file name * An example for Qualified Association File Directory * *

UML (Use-Case Modeling), Dr. Chen TM -38 Insurance contract 0..* Insurance company 10..* 1..* PersonCompany 1..* 0..* Figure 4.28 An insurance contract cannot have associations to both company and person at the same time Figure 4.28 An insurance contract cannot have associations to both company and person at the same time Or-Association

UML (Use-Case Modeling), Dr. Chen TM -39 Insurance contract 0..* Insurance company 10..* 1..* PersonCompany 1..* 0..* Figure 4.29 An or-association shows that only one of the associations is valid at a time Figure 4.29 An or-association shows that only one of the associations is valid at a time Or-Association or

UML (Use-Case Modeling), Dr. Chen TM * 1..* Insurance contract Insurance company 1 0..* has   refer to insurer Results of Figures 4.26, 28, and 29: An insurance contract cannot have associations to both company and person at the same time Results of Figures 4.26, 28, and 29: An insurance contract cannot have associations to both company and person at the same time Company 0..* 1..* 0..*  has refer to  Person policyholder husband  married to wife 1..* Or-Association or

UML (Use-Case Modeling), Dr. Chen TM -41 Insurance contract 0..* Insurance company 1 1..* Person Figure 4.32 A ternary association connects three classes. Insurance policy 0..1 policyholder insurer

UML (Use-Case Modeling), Dr. Chen TM -42 TeamsPerson * Members Figure 4.34 A team is composed of team Members. One person could be a member of many teams. The model shows an example of a shared aggregation, where the people are the shared parts. Figure 4.34 A team is composed of team Members. One person could be a member of many teams. The model shows an example of a shared aggregation, where the people are the shared parts. *

UML (Use-Case Modeling), Dr. Chen TM -43 Window Text * Listbox * Button * Menu * Figure 4.36 The diamond shows the composition aggregate; the window contains ( is aggregated of) many menus, buttons, listboxes, and texts. All types of aggregation can have a name.

UML (Use-Case Modeling), Dr. Chen TM -44 Window Text * Listbox * Button * Menu * Figure 4.37 If there is more than one part in the same aggregate (wholeside into a single end.This is allowed for all types of aggregates. An aggregate has only one role name, and that is at the partside. Contains

UML (Use-Case Modeling), Dr. Chen TM -45 Vehicle CARBoatTruck Figure 4.41 Vehicle is a general class (superclass) derived to specific classes (subclasses) via inheritance (generalization-specialization).

UML (Use-Case Modeling), Dr. Chen TM -46 Vehicle CARBoatTruck Figure 4.42 The same model as in Figure 4.41, but the inheritance takes the form of a tree (with only one hollow triangle).

UML (Use-Case Modeling), Dr. Chen TM -47 Vehicle CAR BoatTruck Vehicle CAR BoatTruck Vehicle Figure 4.43 A class hierarchy for vehicles. The Car class is subclass to Vehicle, but superclass to Sports car, Passenger car, and Truck.

UML (Use-Case Modeling), Dr. Chen TM -48 Vehicle {abstract} Drive() {abstract} Car drive() Boat drive() drive() starts the wheels drive() starts thepropeller Figure 4.44 The Car inherits the attribute color and the operation drive. The operation drive is redefined in the class Car and Boat. The class Vehicle is abstract, which also is marked. The notes below the classes are used to comment on a class diagram Figure 4.44 The Car inherits the attribute color and the operation drive. The operation drive is redefined in the class Car and Boat. The class Vehicle is abstract, which also is marked. The notes below the classes are used to comment on a class diagram

UML (Use-Case Modeling), Dr. Chen TM -49 drives Vehicle {abstract} color drive() {abstract} Car drive() Boat drive() * Person Figure 4.45 A person drives vehicles.When the drive operation is called, the implementation used depended on whether the object used is a car or a boat. Vehicle is an abstract class showing the commonalties between cars and boats, including the association relationship to the Person class Figure 4.45 A person drives vehicles.When the drive operation is called, the implementation used depended on whether the object used is a car or a boat. Vehicle is an abstract class showing the commonalties between cars and boats, including the association relationship to the Person class

UML (Use-Case Modeling), Dr. Chen TM -50 Vehicle {abstract} drive() {abstract} Car drive() Boat drive() Propulsion Figure 4.47 Generalization-specialization with a discriminator that specifies that it is with respect to the propulsion that the subclass differ.

UML (Use-Case Modeling), Dr. Chen TM -51 Object vs. Function-Oriented Analysis and Design (Structured Analysis and Design) The Library Information system Object-oriented A/D Decomposed by objects or concepts Structured A/D Decomposed by functions or processes LibrarianCatalogue LibraryBook System Record Loans Add Resource Report Fines

UML (Use-Case Modeling), Dr. Chen TM -52 Figure: Conventional vs. Object - Oriented ConventionalObject-Oriented Decomposed by Functions/processObjects/concepts Types Data type (e.g.) int num_of_employees Class type class employee  … } employee full-time, part-time; Content One variable contains one value. e.g. number_of _employees =20 One class contains many objects One object has many attributes, operations