Lecture 8-2 : Class Diagrams. Class Representation Class Name Attribute1 Attribute2 … Operation1 Operation2 … responsibility.

Slides:



Advertisements
Similar presentations
Object-oriented modeling Class/Object Diagrams
Advertisements

Unified Modeling Language Philip Liew
BASKETBALL Team Sports.
UML Class Diagram and Packages Written by Zvika Gutterman Adam Carmi.
UML Class Diagram. UML Class Diagrams2 Agenda What is a Class Diagram? Essential Elements of a UML Class Diagram Tips.
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.
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.
UML Class Diagram and Packages
7M701 1 Class Diagram advanced concepts. 7M701 2 Characteristics of Object Oriented Design (OOD) objectData and operations (functions) are combined 
1 Object-Oriented Modeling Using UML CS 3331 Fall 2009.
The Unified Modeling Language (UML) Class Diagrams.
Basketball 101 PE/Health Class. Things to Remember! Update your Table of Contents. -Date: 4/23/14 -Title of Assignment: Basketball Notes -Standards: WC.
Objectives Design Class Diagrams Issues in system design Generalization Review UML papers.
Structures and Strategies- Basketball
HISTORY RULES & REGULATIONS
BASKETBALL. GAME PLAY ► Basketball is played between two teams of five players whose goal is to put the ball in the basket hoop. ► 4 quarters of 10 minutes.
NOW A DAYS BASKETBALL. OLD A DAYS BASKETBALL. DR. JAMES NAISMITH I N V E N T O R! I N V E N T O R.
UML Diagrams: Class Diagrams The Static Analysis Model Instructor: Dr. Hany H. Ammar Dept. of Computer Science and Electrical Engineering, WVU.
Classes and Class Diagrams. Learning Outcomes Students will be able to : Describe a class Identify components of a class diagram Explain the terms: –Multiplicity.
Basketball History, Technique, and Rules. Basketball History In 1891, Dr. James Naismith, a Canadian minister on the faculty of a college for YMCA professionals.
Review Game created by Drew Spicer. #1 #2 #3 #4 #5.
Object-Oriented Modeling Chapter 10 CSCI CSCI 1302 – Object-Oriented Modeling2 Outline The Software Development Process Discovering Relationships.
CS3773 Software Engineering Lecture 04 UML Class Diagram.
Databases : Data Modeling 2007, Fall Pusan National University Ki-Joune Li.
Unit 1 INTRODUCTION TO MODELING AND CLASS MODEL Ref : L7-UML.PDF.
بسم الله الرحمن الرحيم ” اللهم أنت ربي لا إله إلا أنت خلقتني و أنا عبدك وأنا على عهدك ووعدك ما استطعت ، أعوذ بك من شر ما صنعت ، أبوء لك بنعمتك على و أبوء.
® IBM Software Group © 2006 IBM Corporation Rational Software France Object-Oriented Analysis and Design with UML2 and Rational Software Modeler 03. Classes,
1 Class Diagrams: Advanced Concepts. 2 Overview Class diagrams are the most commonly used diagrams in UML. Class diagrams are the most commonly used diagrams.
The Static Analysis Model Class Diagrams Prof. Hany H. Ammar, CSEE, WVU, and Dept. of Computer Science, Faculty of Computers and Information, Cairo University.
Basketball Study Guide. History Basketball was invented by Dr. James Naismith in 1891 in Springfield, Massachusetts. Basketball was invented by Dr. James.
Class diagram Used for describing structure and behaviour in the use cases Provide a conceptual model of the system in terms of entities and their relationships.
UML Diagrams: The Static Model Class Diagrams. The Static Model Define the static structure of the logical model Represent classes, class hierarchies.
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.
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.
Design Model Lecture p6 T120B pavasario sem.
Relationships Relationships between objects and between classes.
Basketball History, Technique, and Rules. Basketball History In 1891, Dr. James Naismith, a Canadian minister on the faculty of a college for YMCA professionals.
Object-Oriented Modeling: Static Models. Object-Oriented Modeling Model the system as interacting objects Model the system as interacting objects Match.
Static Modeling Chapter 8 Part of Requirements Modeling Designing Concurrent, Distributed, and Real-Time Applications with UML Hassan Gomaa (2001)
Basketball Game Situations 1-Name the playing positions of the basketball team and describe their duties on the court?
UML / UML 2.0 Diagrams (Part I) 1. Overview of the 13 diagrams of UML Structure diagrams 1.Class diagram 2.Composite structure diagram (*) 3.Component.
UML Class Diagram. A class diagram shows 1.Classes 2.The relationships between them.
CS212: Object Oriented Analysis and Design Lecture 33: Class and Sequence Diagram.
NYSGBOA Rule Changes, Subtitle. Rule 9-10, Ten Second Backcourt No visual count. Use the shot clock. If no shot clock, use a visual count. Trail.
Class diagrams Terézia Mézešová.
Do Now What experience do you have with basketball? What are the 5 fundamentals of basketball? Who is your favorite team and player?
School of Computer Science and Engineering
ITEC0724 Modern Related Technology on Mobile Devices Lecture Notes #2 1.
SATMathVideos.Net A basketball player scored 27 points in a game, which was composed of 1 point baskets (free throws), 2 point baskets and 3 point baskets.
How To: The Basics of Basketball Basic Defensive Positioning This diagram shows a basic 2- 3 zone defense. In this defense each teammate defends a general.
Made by : Calliope – Christine Despotidou MAY 2015.
Introduction to UML and Rational Rose UML - Unified Modeling Language Rational Rose 98 - a GUI tool to systematically develop software through the following.
Basketball Irene Kotsiou A1. General rules of basketball Games are played in four quarters of 10 Five players from each team may be on the court at one.
Modeling with UML – Class Diagrams
Unified Modeling Language (UML)
UML Diagrams: Class Diagrams The Static Analysis Model
Basketball.
Basketball Notes.
UML Diagrams: The Static Model Class Diagrams
Object Oriented Analysis and Design
Software Engineering Lecture #11.
UML Class Diagram.
Unified Modelling Language
IMPORTANT NOTICE TO STUDENTS:
Class Diagram.
The generalization of class
UML  UML stands for Unified Modeling Language. It is a standard which is mainly used for creating object- oriented, meaningful documentation models for.
Presentation transcript:

Lecture 8-2 : Class Diagrams

Class Representation Class Name Attribute1 Attribute2 … Operation1 Operation2 … responsibility

Class WashingMachine > brandName : String modelName serialNumber : Integer > Capacity > addClothes(C:String) : void removeClothes(C:String) : void addDetergent(D:int) : int > turnOn() : Boolean Responsibility : Take dirty clothes as input and produce clean clothes as output {capacity =5 or 8 or 10 Kg}  Stereotype Constraints Refer to Government Standard EV on generating serial numbers  Note

Class Modeling Class name attribute1 attribute2 … operation1 operation2 … responsibility Verbs during conversation with clients 의뢰 Nouns during conversation with clients, which are related to class name. Nouns during conversation with clients

Example : modeling basketball game

Basketball Game Conversation with coach ball, basket, team, players, guards, forwards, cener, shot, shot clock, three-point line, free throw, foul, free-throw line, court, game clock noun Shoot, advance, dribble, pass, foul, rebound verb Initial Class Diagram

Initial class diagram Ball diameter volume dribble() shoot() pass() advance() Player name height weight dribbleBall() passBall() shootBall() rebound() foulOpponent() Guard does most of the dribbling and passing Forward does most of the intermediate range shooting and rebounding center stays near basket, shoots from close range Team Basket Foul Shot ThreePointLine FreeThrow FreeThrowLine Court ShotClock GameClock Duration {pro = 48minutes college and Int’l = 40 minutes {pro = 4 12-minute quarters college and Int’l=2 20-minute halves} {pro = 24 sec college = 35sec Int’l = 30 sec}

Association When classes are connected together conceptually, that connection is called association

Association

Multiplicity The number of objects from one class that relate with a single object in an associated class. One – to – one One – to – many(*) One – to – one or more(*) 1..* One – to – zero or one One – to – a bounded interval ex. one – to – 5 through(..) 10 One – to exactly n ex. One – to – 10 One – to – a set of choices ex. One – to – 5 or(,) 10

Multiplicity Possible multiplicities and how to represent them in UML

Inheritance Is-a relationship

abstract class Class that does not have an instance italic font

Dependencies one class may use another. The most common usage of dependency is to show that the signature of one class’s operation uses another class

More about class diagrams u 집합연관 (Aggregation) u 복합연관 (Composition) u 문맥 (Contexts) u 인터페이스 (Interface) u 실체화 (Realization) u 가시성 (Visibility)

Aggregations A class consists of a number of component classes

Composite A strong type of aggregation Each component in a composite can belong to just one whole

Interface and Realization One entity (interface) defines a set of functionalities as a contract, and the other (class) realizes the contract by implementing the functionality defined in the contract.

Visibility + : public # : protected - : private

Ex) Class Diagram

Class diagram (example)

Package Diagram

logical hierarchical decomposition of a system usually organized to maximize internal coherence within each package and to minimize external coupling among packages. Often organize Use-Case diagrams and class diagrams.

Goal of Package Group diagram components (e.g. class, use case, …) into a package Similar to Namespace in C++ (e.g. Tools::Hammer)