Class Diagram Associations Class Diagrams, Class Stereotypes, Class Associations Dr. Neal CIS 480.

Slides:



Advertisements
Similar presentations
UML Class Diagram and Packages Written by Zvika Gutterman Adam Carmi.
Advertisements

UML Class Diagram. UML Class Diagrams2 Agenda What is a Class Diagram? Essential Elements of a UML Class Diagram Tips.
Objectives Explain how events can be used to identify use cases that define requirements Identify and analyze events and resulting use cases Explain how.
L3-1-S1 OO Concepts © M.E. Fayad SJSU -- CMPE Software System Engineering Dr. M.E. Fayad, Professor Computer Engineering Department, Room.
UML – Class Diagrams.
UML Class Diagram and Packages Written by Zvika Gutterman Adam Carmi.
UML Class Diagram and Packages Written by Zvika Gutterman Adam Carmi.
Overview Objective: refine information gathered
2Object-Oriented Analysis and Design with the Unified Process Events and Use Cases  Use case  Activity the system carries out  Entry point into the.
6. 2Object-Oriented Analysis and Design with the Unified Process Objectives  Explain how events can be used to identify use cases that define requirements.
2-1 © Prentice Hall, 2004 Chapter 2: Introduction to Object Orientation (Adapted) Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra,
Chapter 5: Modeling Systems Requirements: Events and Things
UML Unified Modeling Language. What is UML? Unified Modeling Language (UML) is a standardized, general-purpose modeling language in the field of software.
Systems Analysis and Design in a Changing World, Tuesday, Feb 27
Modeling System Requirements:
Systems Analysis and Design in a Changing World, Fifth Edition
OBJECT AND CLASES: THE BASIC CONCEPTS Pertemuan 8 Matakuliah: Konsep object-oriented Tahun: 2009.
5 Systems Analysis and Design in a Changing World, Fourth Edition.
UML Diagrams: Class Diagrams The Static Analysis Model Instructor: Dr. Hany H. Ammar Dept. of Computer Science and Electrical Engineering, WVU.
Association Class Generalization/Specialization Whole-Part Page More Associations 1.
Systems Analysis and Design in a Changing World, 6th Edition 1 Chapter 4 - Domain Classes.
Distributed Java Programming Distributed Java Programming Class #2 August 22, 2002.
Systems Analysis and Design in a Changing World, 6th Edition 1 Chapter 4 Domain Classes.
Databases : Data Modeling 2007, Fall Pusan National University Ki-Joune Li.
Domain Modeling Part2: Domain Class Diagram Chapter 4 pp part 2 1.
بسم الله الرحمن الرحيم ” اللهم أنت ربي لا إله إلا أنت خلقتني و أنا عبدك وأنا على عهدك ووعدك ما استطعت ، أعوذ بك من شر ما صنعت ، أبوء لك بنعمتك على و أبوء.
® IBM Software Group © 2006 IBM Corporation Rational Software France Object-Oriented Analysis and Design with UML2 and Rational Software Modeler 03. Classes,
Objectives Explain how events can be used to identify use cases that define requirements Identify and analyze events and resulting use cases Explain.
UML Class Diagram Trisha Cummings. What we will be covering What is a Class Diagram? Essential Elements of a UML Class Diagram UML Packages Logical Distribution.
Basic OOP Concepts and Terms. In this class, we will cover: Objects and examples of different object types Classes and how they relate to objects Object.
5 Systems Analysis and Design in a Changing World, Fifth Edition.
Modeling System Requirements: Events and Things. Objectives Explain the many reasons for creating information system models Describe three types of models.
BCS 2143 Object Oriented Design Using UML. Objectives Objects Interactions Finding Classes Relationship Between Classes Attribute and Operation Class.
UML The Unified Modeling Language A Practical Introduction Al-Ayham Saleh Aleppo University
Lecture 1: UML Class Diagram September 12, UML Class Diagrams2 What is a Class Diagram? A class diagram describes the types of objects in the system.
2007ACS-3913 Ron McFadyen1 Class Diagram See Schaum’s UML Outline, especially chapters 4, 5, 6, 7.
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.
 Week08.  Review Schedule Weeks 8-14  This week o Review last class o Introduce Class Diagrams o ICE-03 Sheridan SYST Engineering Quality Systems.
Class Diagram Chapter 21 Applying UML and Patterns Craig Larman.
CS212: Object Oriented Analysis and Design Lecture 33: Class and Sequence Diagram.
UML Class Diagram notation Indicating relationships between classes SE-2030 Dr. Mark L. Hornick 1.
Chapter 4 Basic Object-Oriented Concepts. Chapter 4 Objectives Class vs. Object Attributes of a class Object relationships Class Methods (Operations)
Class diagrams Terézia Mézešová.
 Class diagrams show the classes of the system, their interrelationships (including inheritance, aggregation, and association), and the operations and.
CLASS DIAGRAMS A classy approach to objects. The Basic Class Diagram  Class Name  Attributes (- indicates private each would have properties or accessor/mutator.
ITEC0724 Modern Related Technology on Mobile Devices Lecture Notes #2 1.
Class Diagram Lecture # 1. Class diagram A Class Diagram is a diagram describing the structure of a system shows the system's classes Attributes operations.
TK2023 Object-Oriented Software Engineering CHAPTER 11 CLASS DIAGRAMS.
UML Fundamental Elements. Structural Elements Represent abstractions in our system. Elements that encapsulate the system's set of behaviors. Structural.
Class Diagrams Revisited. Parameterized Classes Parameterized Classes - are used to represent relationships between templates.
Smith’s Aerospace © P. Bailey & K. Vander Linden, 2006 Classes and Objects Patrick Bailey Keith Vander Linden Calvin College.
5 Systems Analysis and Design in a Changing World, Fourth Edition.
5 Chapter 5: Modeling Systems Requirements: Events and Things Systems Analysis and Design in a Changing World.
Modeling with UML – Class Diagrams
Unified Modeling Language (UML)
UML Diagrams: Class Diagrams The Static Analysis Model
COMP 2710 Software Construction Class Diagrams
DATA REQIREMENT ANALYSIS
Interface, Subclass, and Abstract Class Review
Inheritance B.Ramamurthy 11/7/2018 B.Ramamurthy.
Showing Relationships in UML
Object Oriented Analysis and Design
Domain Class Diagram Chapter 4 Part 2 pp
UML Class Diagram.
Unified Modelling Language
Systems Analysis – ITEC 3155 Modeling System Requirements – Part 2
Basic OOP Concepts and Terms
Object Oriented Analysis and Design
From Class Diagram to Contract Diagram
Presentation transcript:

Class Diagram Associations Class Diagrams, Class Stereotypes, Class Associations Dr. Neal CIS 480

Class Diagram Provides definition of system components Contains important structural information for the new system Provides details describing database and object-oriented program Consists of problem domain classes and implementation classes Provides a static view of the system

UML Class Representation Rational

Class Stereotypes and Views Icon representation Label representation Same class different view

Bank Account Class Associations Navigable association Inheritance association

Unidirectional and Navigable Associations Unidirectional Customer knows about Order, but Order doesn’t know of customer Bidirectional or Navigable Customer knows about Order and Order knows about Customer

Class to Class Messages public class Order { // some attributes protected String customerName; protected Customer CustomerOwner; // some methods public setCustomerName(String name) { customerName = name; } public class Customer { // some attributes protected String name; protected Order[] OrderList; // some methods private void doName() { OrderList = new Order[2]; OrderList[0] = new Order(); OrderList[0].setCustomerName(name); } Array of Order objects Call or message to Order object

A Generalization/Specialization Hierarchy for Motor Vehicles

Class Specialization public class Consumer : Customer { // some attributes // some methods } public class Customer { // some attributes protected String name; // some methods private void doName() { // do something } public class Commercial : Customer { // some attributes // some methods } Colon key word for subclass Superclass Subclasses

Aggregation or Whole-Part Relationships

Class Aggregation public class Engine { // some attributes // some methods } public class Car { // some attributes protected Wheel[] WheelList; protected Engine ClassEngineOject; // some methods } public class Wheel { // some attributes // some methods } Object collection for wheels and single id for engine Aggregate class Parts classes

Enrollment Class Diagram with Association Class

Association Class public class Product { // some attributes protected Vendor[] VendorList; // some methods } public class Shipment { // some attributes public Vendor VendorObject; public Product ProductObject // some methods } public class Vendor { // some attributes protected Product[] ProductList; // some methods } Association class Other classes

Multiple Inheritance by Interfaces Sometimes a class needs to provide behavior matching more than one class If the class is already of subclass of another base class then inheritance can’t be used so how is this additional behavior guarantee We need a relationship that establishes a contract for one class to implement another's behavior The behavior can be defined with an Interface The “Realizes” relationship forces the interface to be implemented by the class In this way a class may “Realize” the behavior of multiple classes

Multiple Inheritance the Realizes Relationship public interface MessageInterface { // some method signatures Boolean receiveMessage(String msg); } public class Window { // some attributes // some methods } public class ListBoxControl : Window, MessageInterface { // some attributes // some methods Boolean receiveMessage(String msg) { // do something } ListBoxControl has a contract to implement methods Base class Sub class Contract or Interface class Multiple Inheritance using an Interface

Partial Domain (static) Class Diagram for RMO