Modeling Classes with UML

Slides:



Advertisements
Similar presentations
Object Oriented Analysis and Design
Advertisements

1 SWE Introduction to Software Engineering Lecture 15 – System Modeling Using UML.
Object Oriented Analysis and Design Chapter 1 Applying UML and Patterns -Craig Larman.
© Copyright Eliyahu Brutman Programming Techniques Course.
Programming With Java ICS201 University Of Hail1 Chapter 12 UML and Patterns.
UML Notations Activity diagrams State diagrams Class diagrams Use-case diagrams.
Unified Modeling Language
The Unified Modeling Language (UML) Class Diagrams.
Chapter 9 Domain Models. Domain Model in UML Class Diagram Notation A “visual dictionary”
Training: INSPIRE Basics EC JRC 1/15 UML class diagram: example INSPIRE UML class diagram for administrative units.
Database Management System Lecture 4 The Relational Database Model- Introduction, Relational Database Concepts.
Eng. Mohammed Timraz Electronics & Communication Engineer University of Palestine Faculty of Engineering and Urban planning Software Engineering Department.
CSCE 121: Introduction to Program Design and Concepts, Honors Dr. J. Michael Moore Spring 2015 Set 3: Objects, Types, and Values 1 Based on slides.
Object-Oriented Analysis and Design An Introduction.
1 UML Basic Training. UML Basic training2 Agenda  Definitions: requirements, design  Basics of Unified Modeling Language 1.4  SysML.
CH06: Considering Objects TECH Computer Science  Set, Class, Type  …of…  Objects, Actors, Agents  Data and Actions Object-Oriented Design and Development.
Lecture 3 Uses Cases Topics UML Use Cases pop quiz Readings: Chapter 3 January 24, 2008 CSCE 492 Software Engineering.
CS3773 Software Engineering Lecture 04 UML Class Diagram.
1 CMPT 275 Software Engineering Requirements Analysis Phase Requirements Analysis activity Janice Regan,
Fall 2010 CS4310 Requirements Engineering A Brief Review of UML & OO Dr. Guoqiang Hu Department of Computer Science UTEP 1.
Conceptual Model or Domain Models Chapter10 Applying UML and pattern.
Information Systems Engineering
Designing Classes Chapter 3. 2 Chapter Contents Encapsulation Specifying Methods Java Interfaces Writing an Interface Implementing an Interface An Interface.
Using COMET with Visio Visio UML Modeling. Creating a Drawing After opening Visio, you will see a list of templates available.
SE-1010 Dr. Mark L. Hornick 1 Java Programming Basics.
Programmeren 1 6 september 2010 HOORCOLLEGE 2: INTERACTIE EN CONDITIES PROGRAMMEREN 1 6 SEPTEMBER 2009 Software Systems - Programming1 Programming.
ITEC324 Principle of CS III Chapter 2 (Horstmann’s Book) – Part 1 The Object-Oriented Design Process Hwajung Lee.
Lecture 9-1 : Intro. to UML (Unified Modeling Language)
Class Diagram Mehwish Shafiq. Class Collection of object that share common properties, attributes, and behavior. Collection of objects with same data.
Generalizable Element Namespace Model Element name visibility isSpecification Classifier isRoot Constraint Body Coming up: Unified Modeling Language Introduction.
1 SWE Introduction to Software Engineering Lecture 14 – System Modeling.
Object Oriented Programming and Data Abstraction Earl Huff Rowan University.
Unified Modeling Language (UML)
BTS430 Systems Analysis and Design using UML Design Class Diagrams (ref=chapter 16 of Applying UML and Patterns)
Generalizable Element Namespace Model Element name visibility isSpecification Classifier isRoot Constraint Body Introduction to the Unified Modeling Language.
Chapter 2 (Horstmann’s Book) – Part 1 The Object-Oriented Design Process Hwajung Lee.
UML Class Diagrams David Millard
Unit 1 - Introducing Abstract Data Type (ADT) Part 1.
© 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.
1. 2 Standards group: ODMG = Object Data Management Group. ODL = Object Description Language, like CREATE TABLE part of SQL. OQL = Object Query Language,
Modeling with UML – Class Diagrams
Class Relationships in C++
Programmer Defined Types and Classes
Chapter 9 Domain Models.
DATA REQIREMENT ANALYSIS
Unified Modeling Language
UML Class Diagrams.
Unified Modeling Language—UML A Very Brief Introduction
Introduction to the Unified Modeling Language
Review for Midterm, Fall 2009
Chapter 5: Object Oriented Analysis and Design
Objectives Identify the built-in data types in C++
Abstract descriptions of systems whose requirements are being analysed
Unified Modeling Language (UML)
Classes & Objects CSCE 121 J. Michael Moore.
The Basics of Class Diagrams for a single class
ניתוח מערכות מידע א' הרצאה 3
“Unified Modeling Languge“ Class Diagram
CSCE 121- Spring 2016 J. Michael Moore
Chapter 10 Thinking in Objects
Introduction to the Unified Modeling Language
Introduction to the Unified Modeling Language
Object Oriented Analysis and Design
Copyright 2007 Oxford Consulting, Ltd
PPT6: Object-oriented design
EECE.2160 ECE Application Programming
ITEC324 Principle of CS III
ITEC324 Principle of CS III
Presentation transcript:

Modeling Classes with UML CSCE 121 J. Michael Moore

Modeling Objects Objects used in many programming languages Ideally is independent of the programming language Language Agnostic The focus should be what instead of how. There are many options, so leave the implementation details to the coder. Think about what data means or a mathematical definition instead of focusing on the datatypes available in a language. Dollars instead of double. Integer instead of int. Floating point instead of double or float. Letters instead of char. List instead of vector. (You can say array if you mean it in the mathematical sense.)

Class Start thinking about what you want to represent Characteristics Candidates for attributes Actions (by / to object) Candidates for methods

UML Unified Modeling Language Used primarily for Software Engineering Language Agnostic Many types of UML diagrams used for design and modeling Class diagrams Structure diagrams Sequence diagrams Activity diagrams State machine diagrams

Methods / Member Functions UML Class Diagram Model Classes (language agnostic of course!) 3 parts Include what we need, not everything we can think of. Programs can help Visio: Free on Dreamspark http://creately.com/ (Collaborative) Any program you can draw boxes and type text! Name Attributes / Data Members Methods / Member Functions

Attributes Book <AttributeName>: <AttributeType> Attribute Type is optional Start with lowercase Type after colon Types are NOT C++ datatypes! Should be descriptive of what it is, not how it will be stored in C++ Ex: Dollars instead of double Can include this type of information for methods too Book title author: String due: Date checkedOutBy: Patron

Methods <MethodName>(<parameter>: <AttributeType>):<ReturnType> Start with lowercase Book title: String author: String due: Date checkOut(patron: Patron, due: Date) getAuthor(): String setTitle(title: String)

Visibility Book Public: prepend name with ‘+’ Private: prepend name with ‘-’ Book -title -author: String -due: Date +checkOut(patron: Patron, due: Date) +getAuthor(): String +setTitle(title: String)

Relationships Show relationship between classes Association Person Has a Aggregation Has an aggregation (grouping) of Composition Like has a, but is a part of More later… Person Umbrella Class Roster Student Person Arm

Try to match relation to attribute/method or to the name. Relationships Library -name: String -collection: Book Book +addBook(book: Book) -title: String -author: String -due: Date -checkOutBy: Patron Patron +checkOut(patron: Patron, due: Date) +getAuthor(): String +setTitle(title: String) Try to match relation to attribute/method or to the name. -name: String