From Class Diagram to Contract Diagram

Slides:



Advertisements
Similar presentations
Chapter 22 Object-Oriented Systems Analysis and Design and UML Systems Analysis and Design Kendall and Kendall Fifth Edition.
Advertisements

UML Class and Sequence Diagrams Violet Slides adapted from Marty Stepp, CSE 403, Winter 2012 CSE 403 Spring 2012 Anton Osobov.
Object-Oriented Analysis and Design
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.
Slide 1 Systems Analysis & Design CS183 Spring Semester 2008 Dr. Jonathan Y. Clark Course Website:
Basic OOP Concepts and Terms
2-1 © Prentice Hall, 2004 Chapter 2: Introduction to Object Orientation (Adapted) Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra,
Structural Modeling: Class Diagrams Copyright © 2009 John Wiley & Sons, Inc. Copyright © 2005 Pearson Education Copyright © 2009 Kannan Mohan CIS 4800.
OO Analysis and Design CMPS OOA/OOD Cursory explanation of OOP emphasizes ▫ Syntax  classes, inheritance, message passing, virtual, static Most.
Object-Oriented Systems Analysis and Design Using UML
1 A Student Guide to Object- Orientated Systems Chapter 4 Objects and Classes: the basic concepts.
Systems Analysis and Design in a Changing World, 6th Edition 1 Chapter 4 - Domain Classes.
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.
Databases : Data Modeling 2007, Fall Pusan National University Ki-Joune Li.
Fall 2010 CS4310 Requirements Engineering A Brief Review of UML & OO Dr. Guoqiang Hu Department of Computer Science UTEP 1.
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.
What is a Structural Model?
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.
ITEC324 Principle of CS III Chapter 2 (Horstmann’s Book) – Part 1 The Object-Oriented Design Process Hwajung Lee.
12/24/2015B.Ramamurthy1 Analysis and Design with UML: Discovering Classes Bina Ramamurthy.
1 Introduction to Classes. 2 Terms and Concepts A class is... –The most important building block of any object- oriented system. –A description of a set.
CS212: Object Oriented Analysis and Design Lecture 33: Class and Sequence Diagram.
 Class diagrams show the classes of the system, their interrelationships (including inheritance, aggregation, and association), and the operations and.
Chapter 2: Introduction to Object Orientation Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph S. Valacich, Jeffrey A.
Object Modeling THETOPPERSWAY.COM. Object Modelling Technique(OMT)  Building a model of an application domain and then adding implementation.
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.
UML Fundamental Elements. Structural Elements Represent abstractions in our system. Elements that encapsulate the system's set of behaviors. Structural.
COP 4331 – OOD&P Lecture 7 Object Concepts. What is an Object Programming language definition: An instance of a class Design perspective is different.
Chapter 2 (Horstmann’s Book) – Part 1 The Object-Oriented Design Process Hwajung Lee.
Class Diagram Associations Class Diagrams, Class Stereotypes, Class Associations Dr. Neal CIS 480.
2-1 © Prentice Hall, 2004 Chapter 2: Introduction to Object Orientation Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph.
UML Class & Object Diagram I
CHAPTER
Unified Modeling Language (UML)
Structural Modeling.
DATA REQIREMENT ANALYSIS
Unified Modeling Language
Object-Oriented Analysis and Design
Analysis and Design with UML: Discovering Classes and Relationships
Object Oriented Concepts -I
Analysis and Design with UML: Discovering Classes and Relationships
Inheritance B.Ramamurthy 11/7/2018 B.Ramamurthy.
Analysis and Design with UML: Discovering Classes and Relationships
Object Oriented Analysis and Design
Software Engineering Lecture #11.
Object-Oriented Programming
Understand and Use Object Oriented Methods
Object-Oriented Programming
Enterprise Computing: An Overview
UML Class & Object Diagram I
Systems Analysis – ITEC 3155 Modeling System Requirements – Part 2
Copyright 2007 Oxford Consulting, Ltd
Analysis and Design with UML: Classes and Relationships
Enterprise Computing: An Overview
Object-Oriented Programming
Basic OOP Concepts and Terms
Object Oriented Analysis and Design
Introduction to UML Sources:
Chapter 22 Object-Oriented Systems Analysis and Design and UML
Classes and Objects B.Ramamurthy 5/9/2019 B.Ramamurthy.
Object Oriented System Design Class Diagrams
UML  UML stands for Unified Modeling Language. It is a standard which is mainly used for creating object- oriented, meaningful documentation models for.
ITEC324 Principle of CS III
Presentation transcript:

From Class Diagram to Contract Diagram B. Ramamurthy

Classes OO paradigm supports the view that a system is made up of objects interacting by message passing. Classes represent collection of objects of the same type. An object is an instance of a class. A class is defined by its properties and its behaviors. A class diagram describes the static view of a system in terms of classes and relationships among the classes. You use classes and the relationship among them as a design document for your projects. 11/9/2019 B.Ramamurthy

Discovering Classes Underline the nouns in a problem statement. Using the problem context and general knowledge about the problem domain decide on the important nouns. Design and implement classes to represent the nouns. Underline the verbs. Verbs related to a class may represent the behavior of the class. 11/9/2019 B.Ramamurthy

Examples Drawing package: Design a user interface for drawing various shapes: circle, square, rectangle. Football scores: Keep track of football score. General purpose counter: To keep of track of count for various applications. Library: Books, different categories of books, details of student borrower, library personnel. 11/9/2019 B.Ramamurthy

Designing Classes A class represents a class of objects. A class contains the data declarations (“parts”) and methods (“behaviors” or “capabilities” ). Class properties or characteristics are answers to “What is it made of?” (It has a ____, ____, etc.) Behaviors, capabilities or operations are answers to “What can it do?” ____________, ___________(verbs in the problem) 11/9/2019 B.Ramamurthy

Classes are Blueprints A class defines the general nature of a collection of objects of the same type. The process creating an object from a class is called instantiation. Every object is an instance of a particular class. There can be many instances of objects from the same class possible with different values for data. A class structure implements encapsulation as well as access control: private, public, protected. 11/9/2019 B.Ramamurthy

Example objects Object References redRose class Rose blueRose class 11/9/2019 B.Ramamurthy

Class Diagram : Automobile public: seat seatBelt accelerator private: sparkPlugs gear protected: gloveCompartment public: startEngine brake protected: transmission private: fuelInjection 11/9/2019 B.Ramamurthy

Automobile Class Using a tool 11/9/2019 B.Ramamurthy

Access Control Public, protected, private Public properties and behaviors are available to any other object to use/invoke Private: available only within the objects. Protected: available within the objects and to the class hierarchy inherited from the class. 11/9/2019 B.Ramamurthy

Relationships Classes do not exist on their own Typically an application consists of many related classes. Commonly used relationships include: associations, aggregations, and generalizations. 11/9/2019 B.Ramamurthy

Association An association is a connection between classes, a semantic connection between objects of classes involved in the association. Association typically represents “has a” or “uses” relationships. Indicated by a line, sometimes with arrow indicating unidirectional relationship, adorned by the name of the relation, and the ends of the line adorned by cardinality of relationship and optionally by the roles connected to each class. 11/9/2019 B.Ramamurthy

Association : Examples Uses Person Computer A person uses a computer. Owns Person Car 0..* A person may own many (zero..many) cars. 11/9/2019 B.Ramamurthy

Roles in Association drives Person Car driver company car A person (driver) drives a (company) car. wife Person husband married to 11/9/2019 B.Ramamurthy

Aggregation Aggregation represents a relation “contains”, “is a part of”, “whole-part” relation. Indicated by a line adorned on the “whole” by a hollow diamond Along with name of relationship and Cardinality. 11/9/2019 B.Ramamurthy

Aggregation: Example contains League Team * Membership aggregation: A league is made up of Many teams. 4 wheel made of Auto engine Strong aggregation. 1 part * 11/9/2019 B.Ramamurthy

Generalization Generalization is a relationship between a general and a specific class. The specific class called the subclass inherits from the general class, called the superclass. Public and protected properties (attributes) and behaviors (operations) are inherited. Design representation “inheritance” concept. 11/9/2019 B.Ramamurthy

Generalization: Symbol It represents “is a” relationship among classes and objects. Represented by a line with an hollow arrow head pointing to the superclass at the superclass end. 11/9/2019 B.Ramamurthy

Generalization: Example Vehicle Car Boat Truck 11/9/2019 B.Ramamurthy

Combined Example Person Vehicle Car Boat Truck drives 0..* 11/9/2019 B.Ramamurthy

Summary We looked at Class Diagrams which is very important part of UML Model, perhaps the only model used in many design representation. We also looked at two methods for class discovery(/analysis): CRC Card Method and Nouns-Verbs. Class diagrams directly represent the implementation (code) classes and the relationship among them. Next let’s explore how to use this UML design representation in blockchain application development. We will do that by using a design representation called Contract diagram. 11/9/2019 B.Ramamurthy