COP 3330 Notes 4/13. Today’s Topics UML Class Diagrams.

Slides:



Advertisements
Similar presentations
Based on Java Software Development, 5th Ed. By Lewis &Loftus
Advertisements

Unified Modeling Language Philip Liew
Slides 4/22 COP Topics Final Exam Review Final Exam The final exam is Friday, April 29 th at 10:00 AM in the usual room No notes, books, calculators,
UML Class and Sequence Diagrams Violet Slides adapted from Marty Stepp, CSE 403, Winter 2012 CSE 403 Spring 2012 Anton Osobov.
UML – Class Diagrams.
Design Patterns in Java Appendix D UML at a Glance Summary prepared by Kirk Scott 1.
What is UML? A modeling language standardized by the OMG (Object Management Group), and widely used in OO analysis and design A modeling language is a.
CSE115: Introduction to Computer Science I Dr. Carl Alphonce 219 Bell Hall
Week 3 Recap CSE 115 – Spring Constructor Special capability of a class that sets up the initial state of the object. Constructor definitions are.
UML a crash course Alex Lo Brian Kiefer. Overview Classes Class Relationships Interfaces Objects States Worksheet.
Unit 221 UML Back Ground Class Diagrams Inheritance Hierarchy UML Patterns.
1 TCSS 360, Spring 2005 Lecture Notes Design Phase and UML Class Diagrams Relevant Reading: UML Distilled, Third Edition M. Fowler.
Unified Modeling Language
Liang, Introduction to Java Programming, Seventh Edition, (c) 2009 Pearson Education, Inc. All rights reserved Chapter 12 Object-Oriented Design.
Things and Relations - Examples Things Relationships Structural Behavioral Grouping Annotational Dependency Association Generalization Realization Class,
Chapter 11 Inheritance and Composition. Chapter Objectives Learn about inheritance Learn about subclasses and superclasses Explore how to override the.
Object-Oriented Modeling Chapter 10 CSCI CSCI 1302 – Object-Oriented Modeling2 Outline The Software Development Process Discovering Relationships.
UML Review – class diagrams SE 2030 Dr. Rob Hasker 1 Based on slides written by Dr. Mark L. Hornick Used with permission.
Chapter Two The UML – Unified Modeling Language Ku-Yaw Chang Assistant Professor, Department of Computer Science and Information.
Chapter 16 Applying UML and Patterns Craig Larman
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.
UML Class Diagrams 1 These lecture slides are copyright (C) Marty Stepp, They may not be rehosted, sold, or modified without expressed permission.
An Introduction to the Unified Modeling Language
1 Introduction to Classes and Objects Chapter 3 Introduction to Classes and Objects Chapter 3.
UML The Unified Modeling Language A Practical Introduction Al-Ayham Saleh Aleppo University
Liang, Introduction to Java Programming, Eighth Edition, (c) 2011 Pearson Education, Inc. All rights reserved COS240 O-O Languages AUBG,
Appendix D UML at a Glance Summary prepared by Kirk Scott 1.
More on Inheritance Chapter 11 Continued. Reminders Overloading – different signatures Overriding – same signatures Preventing overriding – use final.
Object Oriented Analysis and Design Class and Object Diagrams.
CSE115: Introduction to Computer Science I Dr. Carl Alphonce 343 Davis Hall
CSE 219 Computer Science III UML. UML Diagrams UML - Unified Modeling Language UML diagrams are used to design object-oriented software systems –represent.
UML Class Diagram. A class diagram shows 1.Classes 2.The relationships between them.
Liang, Introduction to Java Programming, Sixth Edition, (c) 2007 Pearson Education, Inc. All rights reserved Chapter 11 Object-Oriented.
Liang, Introduction to Java Programming, Sixth Edition, (c) 2007 Pearson Education, Inc. All rights reserved Object-Oriented Design.
Class diagrams Terézia Mézešová.
Chapter 5 Classes and Methods II Lecture Slides to Accompany An Introduction to Computer Science Using Java (2nd Edition) by S.N. Kamin, D. Mickunas, E.
Copyright © 2012 Pearson Education, Inc. Chapter 13: Introduction to Classes.
Chapter 3: Introducing the UML
Object Oriented Programming and Data Abstraction Earl Huff Rowan University.
Unified Modeling Language (UML)
Class Diagrams Revisited. Parameterized Classes Parameterized Classes - are used to represent relationships between templates.
A means of graphically displaying a complicated programs 18-Mar-16 UML Thanks to Dave Matuczek, UPenn.
Copyright © 2009 Pearson Education, Inc. Publishing as Pearson Addison-Wesley The Unified Modeling Language
CS16: UML’s Unified Modeling Language. UML Class Diagram A UML class diagram is a graphical tool that can aid in the design of a class. The diagram has.
UML Review – class diagrams SE-2030 Dr. Mark L. Hornick 1.
Java Programming: Guided Learning with Early Objects Chapter 9 Inheritance and Polymorphism.
© 2010 Pearson Addison-Wesley. All rights reserved. Addison Wesley is an imprint of Appendix A: UML Java Software Structures: Designing and Using Data.
CS 350 – Software Design UML – The Unified Modeling Language – Chapter 2 The Unified Modeling Language is a visual language used to create models of programs.
TCSS 305 (Stepp) OO Design with UML Class Diagrams
Unified Modeling Language (UML)
Unified Modeling Language Tutorial
Unified Modeling Language
Chapter 11 Object-Oriented Design
Lecture on Design Phase and UML Class Diagrams
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING
Class Diagram Details CS 124.
Inheritance B.Ramamurthy 11/7/2018 B.Ramamurthy.
Object Oriented Analysis and Design
Software Engineering Lecture #11.
Intro to UML Edited from presentation found at:
Slides by Steve Armstrong LeTourneau University Longview, TX
Unified Modelling Language
Software Engineering System Modeling Extra examples Dr.Doaa Sami
Software Design Lecture : 14.
Class Diagram.
Introduction to UML Sources:
CIS 375 Bruce R. Maxim UM-Dearborn
Object Oriented System Design Class Diagrams
The generalization of class
Presentation transcript:

COP 3330 Notes 4/13

Today’s Topics UML Class Diagrams

UML stands for Unified Modeling Language There are many types of diagrams specified by UML, but we'll only focus on class diagrams UML class diagrams depict structural relationships among classes

UML Class Diagrams A class is represented as a rectangle subdivided into three areas Example: Simplified Student class

UML Class Diagrams A field is specified with its access modifier first, then its name, then a :, then the type –e.g. on the previous slide, the Java code equivalent of the field would be private double gpa;

UML Class Diagrams A method is specified with access modifier first, then its name, then its formal parameters in parentheses, then a :, then its return type –e.g. the Java code equivalent of the method header would be public void setGPA(double newgpa)

UML Class Diagrams Access modifiers: The visibility of fields and methods are represented by the first character before their names –Private: - –Public: + –Protected: #

UML Class Diagrams Other modifiers: –If a method or field is underlined that indicates that it is static –If a method, field, or class name is italicized, that indicates that it is abstract

UML Class Diagrams Relationships among classes –Generalization (extends in Java) –Realization (implements in Java) Arrow with dashed line allows details of the interface to be specified Lollipop does not

UML Class Diagrams Relationships among classes –Aggregation: One type of has-a relationship Indicates weak life-cycle dependence e.g. an AcademicDepartment can be destroyed, yet its Students live on –Composition: Another type of has-a relationship Indicates strong life-cycle dependence e.g. When a car is destroyed, so is its engine

UML Class Diagrams Relationships among classes –Pretty much any other relationship is association

UML Class Diagrams Example: Extremely simplified class diagram of Assignment 3 (fields and methods omitted for clarity)