Advanced Class Diagrams and Intro to Interaction Modeling

Size: px
Start display at page:

Download "Advanced Class Diagrams and Intro to Interaction Modeling"

Transcription

1 Advanced Class Diagrams and Intro to Interaction Modeling Or: Advance to Illinois Avenue. Do not pass Go. Jonathan Sprinkle 1 University of Arizona Department of Electrical and Computer Engineering PO Box , Tucson, AZ 85721, USA September 6, 2010 Jonathan Sprinkle Advanced Class Diagrams and Intro to Interaction Modeling 1

2 Abstract Abstract This lecture discusses advanced class diagram issues relevant to the course and project. We then continue with an introduction to interaction modeling. Jonathan Sprinkle Advanced Class Diagrams and Intro to Interaction Modeling 2

3 Previously, on ECE There are 5 things you should remember about OO languages... 2 Class modeling is the modeling of the structure of software 3 Encapsulation is a HAS-A relationship, that hides information 4 Object diagrams show actual objects (i.e., instances) Jonathan Sprinkle Advanced Class Diagrams and Intro to Interaction Modeling 3

4 Outline 1 Advanced Class Diagram Concepts Stereotypes Enumerations and Numbers Scoping and Visibility Abstract classes Ordering Bags and Sequences 2 Interaction Modeling Contextual Reminders Kinds of Interaction Models 3 Use Cases and Use Case Diagrams Introduction to Use Cases UML Actors Use Cases Use Case Diagrams Guidelines for Use Case Models Jonathan Sprinkle Advanced Class Diagrams and Intro to Interaction Modeling 4

5 Stereotypes A class may have a particular stereotype, which provides additional information about the class. Stereotypes are a special kind of inheritance, but on the language level (not the design level). The most useful kind of stereotype for you is the enumeration. Jonathan Sprinkle Advanced Class Diagrams and Intro to Interaction Modeling 5

6 Stereotypes Definition An enumeration is a (finite) set of values that make up a data type. Example enum ustimezones = ET, CT, MT, PT, AZ Jonathan Sprinkle Advanced Class Diagrams and Intro to Interaction Modeling 6

7 Stereotypes We refer to this enumeration as having cardinality 5, since ust imezones = 5 (i.e., the number of items in the enumeration is 5). An example of this representation in a class diagram can be seen in Figure 1. <<enumeration>> TimeZones ET CT MT PT AZ Figure: Enumeration as a stereotype. Jonathan Sprinkle Advanced Class Diagrams and Intro to Interaction Modeling 7

8 Scoping and Visibility Some features belong to the class, and not to an instantiated object. The concept of class features (rather than object features) is the most abstract of all scoping. Consequence: features in the class scope (denoted by the keyword static) do not require the class to be instantiated as an object before use. Example Using scoping at the class level. c l a s s C a l e n d a r { p u b l i c : s t a t i c short daysinweek ; i n t getnumevents ( ) ; } ; Jonathan Sprinkle Advanced Class Diagrams and Intro to Interaction Modeling 8

9 Scoping and Visibility Now, referring to Calendar::_daysInWeek should allow knowledge of the number of days in the week without having to query a Calendar object. Static scoping should only be applied to data members that are the same for all instances of a class. Changing this value for one instance would change for all instances. Example Checking how many instances there are of a class is knowledge at the class not object level. This usually requires that the constructor/destructor appropriately adds/subtracts a static variable each time they are called. Jonathan Sprinkle Advanced Class Diagrams and Intro to Interaction Modeling 9

10 Scoping and Visibility Syntax for Scoping Scoping is generally available through the :: operator in C++, allowing you to address objects in a namespace (std::cout), classes in a namespace (mynamespace::a) and various concatenations (mynamespace::a::staticmethodofa( )). Jonathan Sprinkle Advanced Class Diagrams and Intro to Interaction Modeling 10

11 Scoping and Visibility However, as a major point, there are two kinds of scope for design: class and object. We represent features with class scope as underlined in a class diagram. See the example in Figure 2 Calendar _daysinweek : short = 7 int getnumevents( ) Figure: Class scoping example. Jonathan Sprinkle Advanced Class Diagrams and Intro to Interaction Modeling 11

12 Scoping and Visibility Visibility refers to the access region of the features to other classes (including subclasses). We will cover visibility in more depth later, but you need to know the notation for regions. Example Using regions in class diagrams. c l a s s C a l e n d a r { p u b l i c : i n t getnumevents ( ) ; s t a t i c short getdaysinweek ( ) ; protected : s t d : : s t r i n g name ; p r i v a t e : s t a t i c short daysinweek ; } ; Jonathan Sprinkle Advanced Class Diagrams and Intro to Interaction Modeling 12

13 Scoping and Visibility We represent feature accessibility as shown in Figure 3, where + public access # protected access - private access Calendar -_daysinweek : short = 7 #_name : string +int getnumevents( ) +getdaysinweek( ) : short Figure: Jonathan Sprinkle Advanced Class Diagrams and Intro to Interaction Modeling 13

14 Abstract classes If a class is abstract, it is shown in italics when the classname is displayed. We will discuss abstract class implementation syntax later. Fundamentally, abstract classes cannot be instantiated. If a (non-abstract) class derived from an abstract is instantiated, then the IS-A concepts are still valid. Abstract classes are useful to use as interfaces, or to use in function signatures. Example (Look familiar?) Coin toss( ) : bool BiasedCoin bias : double = 0.6 result : bool toss( ) : bool Figure: An abstract class, from hw01 Jonathan Sprinkle Advanced Class Diagrams and Intro to Interaction Modeling 14

15 Ordering Sometimes it is convenient to consider that the many association end multiplicities can be ordered explicitly. Definition An ordering is an ordered set of objects; no duplicates are allowed. Example Consider that a Person may have an ordered association with EmergencyContact objects. Person lastname : string phonenumber : string emergencycontact 0..* {ordered} Figure: Person and EmergencyContact class diagram. Jonathan Sprinkle Advanced Class Diagrams and Intro to Interaction Modeling 15

16 Bags and Sequences You may explicitly allow duplicates, or ensure that duplicates are not ordered, by using the bag and sequence modifiers on an association end. Definition A bag is a collection of elements with duplicates allowed. Definition A sequence is an ordered collection of elements with duplicates allowed.. Jonathan Sprinkle Advanced Class Diagrams and Intro to Interaction Modeling 16

17 Bags and Sequences Example Consider a FrequentFlier who has flown several hundred segments in the previous year to numerous Airports. Since ordering is not important (the flights have already been taken) the association with Airports may contain duplicates. Jonathan Sprinkle Advanced Class Diagrams and Intro to Interaction Modeling 17

18 Bags and Sequences Example Consider an Itinerary which will visit multiple Airports. The multiplicity for each end is, but the Airport is a {sequence}, since the same airport may be visited multiple times. Jonathan Sprinkle Advanced Class Diagrams and Intro to Interaction Modeling 18

19 Outline 1 Advanced Class Diagram Concepts Stereotypes Enumerations and Numbers Scoping and Visibility Abstract classes Ordering Bags and Sequences 2 Interaction Modeling Contextual Reminders Kinds of Interaction Models 3 Use Cases and Use Case Diagrams Introduction to Use Cases UML Actors Use Cases Use Case Diagrams Guidelines for Use Case Models Jonathan Sprinkle Advanced Class Diagrams and Intro to Interaction Modeling 19

20 Contextual Reminders Why do we model interactions? Remember that programs are a bunch of objects interacting with one another by passing messages. So, how do we know: What kinds of objects there will be? What kinds of messages they will pass? How we will know if things are going badly? These kinds of questions are made easier through analysis, which chiefly relies upon interaction modeling as its artifacts. Jonathan Sprinkle Advanced Class Diagrams and Intro to Interaction Modeling 20

21 Contextual Reminders Why do we model interactions? Remember that programs are a bunch of objects interacting with one another by passing messages. So, how do we know: What kinds of objects there will be? What kinds of messages they will pass? How we will know if things are going badly? These kinds of questions are made easier through analysis, which chiefly relies upon interaction modeling as its artifacts. Jonathan Sprinkle Advanced Class Diagrams and Intro to Interaction Modeling 21

22 Contextual Reminders Why do we model interactions? Remember that programs are a bunch of objects interacting with one another by passing messages. So, how do we know: What kinds of objects there will be? What kinds of messages they will pass? How we will know if things are going badly? These kinds of questions are made easier through analysis, which chiefly relies upon interaction modeling as its artifacts. Jonathan Sprinkle Advanced Class Diagrams and Intro to Interaction Modeling 22

23 Contextual Reminders Why do we model interactions? Remember that programs are a bunch of objects interacting with one another by passing messages. So, how do we know: What kinds of objects there will be? What kinds of messages they will pass? How we will know if things are going badly? These kinds of questions are made easier through analysis, which chiefly relies upon interaction modeling as its artifacts. Jonathan Sprinkle Advanced Class Diagrams and Intro to Interaction Modeling 23

24 Contextual Reminders Why do we model interactions? Remember that programs are a bunch of objects interacting with one another by passing messages. So, how do we know: What kinds of objects there will be? What kinds of messages they will pass? How we will know if things are going badly? These kinds of questions are made easier through analysis, which chiefly relies upon interaction modeling as its artifacts. Jonathan Sprinkle Advanced Class Diagrams and Intro to Interaction Modeling 24

25 Kinds of Interaction Models Major Categories There are different levels of abstraction for interaction models: Use case diagrams describe how the system interacts with external actors Sequence diagrams show messages exchanged among objects over a timeline Activity diagrams show control flow or data flow in a computation Jonathan Sprinkle Advanced Class Diagrams and Intro to Interaction Modeling 25

26 Kinds of Interaction Models Major Categories There are different levels of abstraction for interaction models: Use case diagrams describe how the system interacts with external actors Sequence diagrams show messages exchanged among objects over a timeline Activity diagrams show control flow or data flow in a computation Jonathan Sprinkle Advanced Class Diagrams and Intro to Interaction Modeling 26

27 Kinds of Interaction Models Major Categories There are different levels of abstraction for interaction models: Use case diagrams describe how the system interacts with external actors Sequence diagrams show messages exchanged among objects over a timeline Activity diagrams show control flow or data flow in a computation Jonathan Sprinkle Advanced Class Diagrams and Intro to Interaction Modeling 27

28 Outline 1 Advanced Class Diagram Concepts Stereotypes Enumerations and Numbers Scoping and Visibility Abstract classes Ordering Bags and Sequences 2 Interaction Modeling Contextual Reminders Kinds of Interaction Models 3 Use Cases and Use Case Diagrams Introduction to Use Cases UML Actors Use Cases Use Case Diagrams Guidelines for Use Case Models Jonathan Sprinkle Advanced Class Diagrams and Intro to Interaction Modeling 28

29 Introduction to Use Cases What are Use Cases Use case models are on the highest level of modeling (e.g., the 30,000 perspective). They are very useful for requirements gathering and specification. Use cases are created by forming a summary, description, and diagram for each use case. Jonathan Sprinkle Advanced Class Diagrams and Intro to Interaction Modeling 29

30 UML Actors Definition An actor is a direct external user of the system. It is an object, person, or set of objects that communicates directly with the system, but is not part of it. Modeling actors helps a system to understand what external/boundary inputs it expects. An actor should have a single, well-defined purpose in its interaction with the system. Jonathan Sprinkle Advanced Class Diagrams and Intro to Interaction Modeling 30

31 Use Cases The various interactions of actors with the system are what makes up a use case. Definition A use case is a coherent piece of functionality that a system can provide by interacting with actors. Example A customer can buy a beverage. A repair technician can perform maintenance. In this example, the actors are customer, and repair technician. The functionality is buy a beverage and perform maintenance. Jonathan Sprinkle Advanced Class Diagrams and Intro to Interaction Modeling 31

32 Use Cases Use cases should have generic behaviors, with specialized behaviors available if needs be. Also, error conditions, improper use (to which the system should respond gracefully) etc., should be present in a use case. A use case brings together all of the behavior relevant to this particular slice of system functionality and behavior. Use cases should be use to partition the system behavior (information encapsulation!!). Jonathan Sprinkle Advanced Class Diagrams and Intro to Interaction Modeling 32

33 Use Cases Example This example use case comes from the text. Buy a beverage The vending machine delivers a beverage after the customer pays and selects. Perform scheduled maintenance The repair technician performs periodic service on the vending machine to keep it in good working condition Make repairs The repair technician performs unscheduled maintenance to repair a problem Load Items A stock clerk adds items into the vending machine to replenish its beverage stock Figure: Use Case summaries for a vending machine Jonathan Sprinkle Advanced Class Diagrams and Intro to Interaction Modeling 33

34 Use Cases Example This example shows use case descriptions Use Case Summary Actors Preconditions Description Exceptions Postconditions Buy a beverage The vending machine delivers a beverage after the customer pays and selects Customer The machine is waiting for money to be inserted A customer inserts coins... The following exceptions are expected: Canceled Out of stock Insufficient money No change Customer presses the cancel button prior to selection. The customer s money is returned, and the machine returns to the waiting state. Customer action...(consequences) Customer action...(consequences) Customer action...(consequences) The machine is waiting for money to be inserted Figure: Use case description for the Buy a beverage use case. Jonathan Sprinkle Advanced Class Diagrams and Intro to Interaction Modeling 34

35 Use Case Diagrams The graphical notation for indicating and summarizing use cases is called a Use Case Diagram. This diagram is supplemental to the use case summaries and descriptions. Example This example shows a use case diagram which is based on the previous examples. Vending Machine buy a beverage perform scheduled maintenance Customer make repairs Repair Technician load items Stock Clerk Jonathan Sprinkle Advanced Class Diagrams and Intro to Interaction Modeling 35

36 Guidelines for Use Case Models Use cases are a tool to help in requirements gathering, since their structure and creation help to disambiguate requirements. Though they are not perfect, they are an important part in ground-up designs. Some guidelines: Determine the system boundary. Ensure that actors are focused on their single, coherent, purpose Each use case should provide value to users Relate use cases and actors. If an actor does not have a use case, or a use case does not have an actor, something is wrong... Keep in mind the formality of use cases. Use cases are an informal (non-semantic) tool, and are useful in forming the design, not as a means of synthesis Use cases can be structured, helping to reduce complexity. Jonathan Sprinkle Advanced Class Diagrams and Intro to Interaction Modeling 36

Advanced UML Class Models

Advanced UML Class Models Advanced UML Class Models Or: Love s Labors Lost Jonathan Sprinkle 1 University of Arizona Department of Electrical and Computer Engineering PO Box 210104, Tucson, AZ 85721, USA August 27, 2012 Jonathan

More information

Object-Oriented Introduction

Object-Oriented Introduction Object-Oriented Introduction Or: Your Honor, I Object... Jonathan Sprinkle 1 University of Arizona Department of Electrical and Computer Engineering PO Box 210104, Tucson, AZ 85721, USA August 22, 2012

More information

Interaction Modelling: Use Cases

Interaction Modelling: Use Cases Interaction Modelling: Use Cases Fabrizio Maria Maggi Institute of Computer Science (these slides are derived from the book Object-oriented modeling and design with UML ) Interaction Modelling: INPUT 1

More information

COSC 3351 Software Design. An Introduction to UML (I)

COSC 3351 Software Design. An Introduction to UML (I) COSC 3351 Software Design An Introduction to UML (I) This lecture contains material from: http://wps.prenhall.com/esm_pfleeger_softengtp_2 http://sunset.usc.edu/classes/cs577a_2000/lectures/05/ec-05.ppt

More information

Introduction to UML What is UML? Motivations for UML Types of UML diagrams UML syntax Descriptions of the various diagram types Rational Rose (IBM.. M

Introduction to UML What is UML? Motivations for UML Types of UML diagrams UML syntax Descriptions of the various diagram types Rational Rose (IBM.. M Introduction to UML Part I 1 What is UML? Unified Modeling Language, a standard language for designing and documenting a system in an object- oriented manner. It s a language by which technical architects

More information

A - 1. CS 494 Object-Oriented Analysis & Design. UML Class Models. Overview. Class Model Perspectives (cont d) Developing Class Models

A - 1. CS 494 Object-Oriented Analysis & Design. UML Class Models. Overview. Class Model Perspectives (cont d) Developing Class Models CS 494 Object-Oriented Analysis & Design UML Class Models Overview How class models are used? Perspectives Classes: attributes and operations Associations Multiplicity Generalization and Inheritance Aggregation

More information

Question Sheet There are a number of criticisms to UML. List a number of these criticisms.

Question Sheet There are a number of criticisms to UML. List a number of these criticisms. Question Sheet 1 Name: ID: These questions do not have a formal, definitive answer. They are meant to be food for thoughts. Feel free to seek answers on browsing the Internet, talking to other software

More information

CS1004: Intro to CS in Java, Spring 2005

CS1004: Intro to CS in Java, Spring 2005 CS1004: Intro to CS in Java, Spring 2005 Lecture #13: Java OO cont d. Janak J Parekh janak@cs.columbia.edu Administrivia Homework due next week Problem #2 revisited Constructors, revisited Remember: a

More information

Objectives. Explain the purpose and objectives of objectoriented. Develop design class diagrams

Objectives. Explain the purpose and objectives of objectoriented. Develop design class diagrams Objectives Explain the purpose and objectives of objectoriented design Develop design class diagrams Develop interaction diagrams based on the principles of object responsibility and use case controllers

More information

NOTES ON OBJECT-ORIENTED MODELING AND DESIGN

NOTES ON OBJECT-ORIENTED MODELING AND DESIGN NOTES ON OBJECT-ORIENTED MODELING AND DESIGN Stephen W. Clyde Brigham Young University Provo, UT 86402 Abstract: A review of the Object Modeling Technique (OMT) is presented. OMT is an object-oriented

More information

Object Orientated Analysis and Design. Benjamin Kenwright

Object Orientated Analysis and Design. Benjamin Kenwright Notation Part 2 Object Orientated Analysis and Design Benjamin Kenwright Outline Review What do we mean by Notation and UML? Types of UML View Continue UML Diagram Types Conclusion and Discussion Summary

More information

02291: System Integration

02291: System Integration 02291: System Integration Hubert Baumeister hub@imm.dtu.dk Spring 2011 Contents 1 Recap 1 2 More UML Diagrams 2 2.1 Object Diagrams........................................... 2 2.2 Communication Diagrams......................................

More information

Lecture 7. Log into Linux New documents posted to course webpage

Lecture 7. Log into Linux New documents posted to course webpage Lecture 7 Log into Linux New documents posted to course webpage Coding style guideline; part of project grade is following this Homework 4, due on Monday; this is a written assignment Project 1, due next

More information

CS 132 Exam #1 - Study Suggestions

CS 132 Exam #1 - Study Suggestions CS 132 - Exam #1 Study Suggestions p. 1 * last modified: 2-16-05 CS 132 Exam #1 - Study Suggestions * The test covers through HW #3, the Week 5 Lab Exercise Exercise, and material through the 2-14-05 lecture/2-16-05

More information

CTIS 359 Principles of Software Engineering SOFTWARE DESIGN OO(A)D

CTIS 359 Principles of Software Engineering SOFTWARE DESIGN OO(A)D CTIS 359 Principles of Software Engineering SOFTWARE DESIGN OO(A)D Today s Objectives To explain the basic concepts of OO(A)D To describe some best practices regarding to OO(A)D What is NOT UML? The UML

More information

Introducing the UML Eng. Mohammed T. Abo Alroos

Introducing the UML Eng. Mohammed T. Abo Alroos Introducing the UML Eng. Mohammed T. Abo Alroos Islamic University of Gaza Introduction to the UML: The UML stands for Unified Modeling Language. It was released in 1997 as a method to diagram software

More information

Sub- PPL Unit-I Class-SE Comp

Sub- PPL Unit-I Class-SE Comp 1. We describe the basic concepts for structuring large programs (encapsulation, interfaces, information hiding) and the mechanisms provided by languages to support it (packaging, separate compilation).

More information

Building custom components IAT351

Building custom components IAT351 Building custom components IAT351 Week 1 Lecture 1 9.05.2012 Lyn Bartram lyn@sfu.ca Today Review assignment issues New submission method Object oriented design How to extend Java and how to scope Final

More information

Chapter 1: Principles of Programming and Software Engineering

Chapter 1: Principles of Programming and Software Engineering Chapter 1: Principles of Programming and Software Engineering Data Abstraction & Problem Solving with C++ Fifth Edition by Frank M. Carrano Software Engineering and Object-Oriented Design Coding without

More information

Software Service Engineering

Software Service Engineering Software Service Engineering Lecture 4: Unified Modeling Language Doctor Guangyu Gao Some contents and notes selected from Fowler, M. UML Distilled, 3rd edition. Addison-Wesley Unified Modeling Language

More information

The Unified Modeling Language. Asst.Prof.Dr. Supakit Nootyaskool IT-KMITL

The Unified Modeling Language. Asst.Prof.Dr. Supakit Nootyaskool IT-KMITL The Unified Modeling Language Asst.Prof.Dr. Supakit Nootyaskool IT-KMITL UML: requirement VS. Design models Identify 2 All the classes or things Elementary business process Necessary step to carry out

More information

Advanced State Modeling

Advanced State Modeling Advanced State Modeling Or: Derek Zoolander Strikes Back Jonathan Sprinkle 1 University of Arizona Department of Electrical and Computer Engineering PO Box 210104, Tucson, AZ 85721, USA Jonathan Sprinkle

More information

Introduction Events States Transition State Diagrams State Diagram Behavior Advanced State Modeling In-Class Exercises.

Introduction Events States Transition State Diagrams State Diagram Behavior Advanced State Modeling In-Class Exercises. State Models Or: Frenemies of the state: BYOB.... Jonathan Sprinkle 1 University of Arizona Department of Electrical and Computer Engineering PO Box 210104, Tucson, AZ 85721, USA August 27, 2012 Jonathan

More information

Chapter 10 Object-Oriented Design Principles

Chapter 10 Object-Oriented Design Principles Chapter 10 Object-Oriented Design Principles Dr. Supakit Nootyaskool Faculty of Information Technology King Mongkut s Institute of Technology Ladkrabang Outline Object-oriented design: bridging from analysis

More information

CS/ENGRD 2110 SPRING Lecture 2: Objects and classes in Java

CS/ENGRD 2110 SPRING Lecture 2: Objects and classes in Java 1 CS/ENGRD 2110 SPRING 2018 Lecture 2: Objects and classes in Java http://courses.cs.cornell.edu/cs2110 Homework HW1 2 The answers you handed in at the end of lecture 1 showed mass confusion! Perhaps 80%

More information

COP 3330 Final Exam Review

COP 3330 Final Exam Review COP 3330 Final Exam Review I. The Basics (Chapters 2, 5, 6) a. comments b. identifiers, reserved words c. white space d. compilers vs. interpreters e. syntax, semantics f. errors i. syntax ii. run-time

More information

CS/ENGRD 2110 SPRING Lecture 2: Objects and classes in Java

CS/ENGRD 2110 SPRING Lecture 2: Objects and classes in Java 1 CS/ENGRD 2110 SPRING 2014 Lecture 2: Objects and classes in Java http://courses.cs.cornell.edu/cs2110 Java OO (Object Orientation) 2 Python and Matlab have objects and classes. Strong-typing nature of

More information

12 Tutorial on UML. TIMe TIMe Electronic Textbook

12 Tutorial on UML. TIMe TIMe Electronic Textbook TIMe TIMe Electronic Textbook 12 Tutorial on UML Introduction......................................................2.................................................3 Diagrams in UML..................................................3

More information

Symbol Tables Symbol Table: In computer science, a symbol table is a data structure used by a language translator such as a compiler or interpreter, where each identifier in a program's source code is

More information

SOFTWARE DESIGN COSC 4353 / Dr. Raj Singh

SOFTWARE DESIGN COSC 4353 / Dr. Raj Singh SOFTWARE DESIGN COSC 4353 / 6353 Dr. Raj Singh UML - History 2 The Unified Modeling Language (UML) is a general purpose modeling language designed to provide a standard way to visualize the design of a

More information

Chapter 11 Object and Object- Relational Databases

Chapter 11 Object and Object- Relational Databases Chapter 11 Object and Object- Relational Databases Copyright 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 11 Outline Overview of Object Database Concepts Object-Relational

More information

6.001 Notes: Section 8.1

6.001 Notes: Section 8.1 6.001 Notes: Section 8.1 Slide 8.1.1 In this lecture we are going to introduce a new data type, specifically to deal with symbols. This may sound a bit odd, but if you step back, you may realize that everything

More information

UML class diagrams. Giuseppe Lipari June 8, Scuola Superiore Sant Anna Pisa

UML class diagrams. Giuseppe Lipari  June 8, Scuola Superiore Sant Anna Pisa UML class diagrams Giuseppe Lipari http://retis.sssup.it Scuola Superiore Sant Anna Pisa June 8, 2009 Using UML Goal: Be able to reason about a design i.e., understand designer s intent Critique/improve

More information

Programming in C++ Prof. Partha Pratim Das Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur

Programming in C++ Prof. Partha Pratim Das Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur Programming in C++ Prof. Partha Pratim Das Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur Lecture - 33 Overloading Operator for User - Defined Types: Part 1 Welcome

More information

Object-Oriented Design

Object-Oriented Design Object-Oriented Design Lecturer: Raman Ramsin Lecture 10: Analysis Packages 1 Analysis Workflow: Packages The analysis workflow consists of the following activities: Architectural analysis Analyze a use

More information

INTERNAL ASSESSMENT TEST III Answer Schema

INTERNAL ASSESSMENT TEST III Answer Schema INTERNAL ASSESSMENT TEST III Answer Schema Subject& Code: Object-Oriented Modeling and Design (15CS551) Sem: V ISE (A & B) Q. No. Questions Marks 1. a. Ans Explain the steps or iterations involved in object

More information

Review sheet for Final Exam (List of objectives for this course)

Review sheet for Final Exam (List of objectives for this course) Review sheet for Final Exam (List of objectives for this course) Please be sure to see other review sheets for this semester Please be sure to review tests from this semester Week 1 Introduction Chapter

More information

OMG Modeling Glossary B

OMG Modeling Glossary B OMG Modeling Glossary B This glossary defines the terms that are used to describe the Unified Modeling Language (UML) and the Meta Object Facility (MOF). In addition to UML and MOF specific terminology,

More information

CS/ENGRD 2110 FALL Lecture 2: Objects and classes in Java

CS/ENGRD 2110 FALL Lecture 2: Objects and classes in Java 1 CS/ENGRD 2110 FALL 2018 Lecture 2: Objects and classes in Java http://courses.cs.cornell.edu/cs2110 Homework HW1 2 The answers you handed in at the end of lecture 1 showed mass confusion! Perhaps 80%

More information

What is a Data Model?

What is a Data Model? What is a Data Model? Overview What is a Data Model? Review of some Basic Concepts in Data Modeling Benefits of Data Modeling Overview What is a Data Model? Review of some Basic Concepts in Data Modeling

More information

UML-Based Conceptual Modeling of Pattern-Bases

UML-Based Conceptual Modeling of Pattern-Bases UML-Based Conceptual Modeling of Pattern-Bases Stefano Rizzi DEIS - University of Bologna Viale Risorgimento, 2 40136 Bologna - Italy srizzi@deis.unibo.it Abstract. The concept of pattern, meant as an

More information

JAVA: A Primer. By: Amrita Rajagopal

JAVA: A Primer. By: Amrita Rajagopal JAVA: A Primer By: Amrita Rajagopal 1 Some facts about JAVA JAVA is an Object Oriented Programming language (OOP) Everything in Java is an object application-- a Java program that executes independently

More information

UML 2.0 UML 2.0. Scott Uk-Jin Lee. Division of Computer Science, College of Computing Hanyang University ERICA Campus

UML 2.0 UML 2.0. Scott Uk-Jin Lee. Division of Computer Science, College of Computing Hanyang University ERICA Campus UML 2.0 Division of Computer Science, College of Computing Hanyang University ERICA Campus Introduction to UML 2.0 UML Unified Modeling Language Visual language for specifying, constructing and documenting

More information

Meltem Özturan

Meltem Özturan Meltem Özturan www.mis.boun.edu.tr/ozturan/samd 1 2 Modeling System Requirements Object Oriented Approach to Requirements OOA considers an IS as a set of objects that work together to carry out the function.

More information

2: Modeling Class Architecture with UML Class Diagrams

2: Modeling Class Architecture with UML Class Diagrams Outline UML Design Supplement 2: Modeling Class Architecture with UML Class Diagrams Introduction Classes, attributes and operations Relations Generalization Guidelines for effective class modeling Slide

More information

UML Modeling I. Instructor: Yongjie Zheng September 3, CS 490MT/5555 Software Methods and Tools

UML Modeling I. Instructor: Yongjie Zheng September 3, CS 490MT/5555 Software Methods and Tools UML Modeling I Instructor: Yongjie Zheng September 3, 2015 CS 490MT/5555 Software Methods and Tools Object-Oriented Design: Topics & Skills Rational Unified Process Unified Modeling Languages (UML) Provide

More information

Introduction to OO Concepts

Introduction to OO Concepts Introduction to OO Concepts Written by John Bell for CS 342, Fall 2018 Based on chapters 1, 2, and 10 of The Object-Oriented Thought Process by Matt Weisfeld, with additional material from UML Distilled

More information

Ingegneria del Software Corso di Laurea in Informatica per il Management. Introduction to UML

Ingegneria del Software Corso di Laurea in Informatica per il Management. Introduction to UML Ingegneria del Software Corso di Laurea in Informatica per il Management Introduction to UML Davide Rossi Dipartimento di Informatica Università di Bologna Modeling A model is an (abstract) representation

More information

Copyright 2016 Ramez Elmasri and Shamkant B. Navathe

Copyright 2016 Ramez Elmasri and Shamkant B. Navathe Chapter 12 Outline Overview of Object Database Concepts Object-Relational Features Object Database Extensions to SQL ODMG Object Model and the Object Definition Language ODL Object Database Conceptual

More information

Principles of Software Construction: Objects, Design, and Concurrency

Principles of Software Construction: Objects, Design, and Concurrency Principles of Software Construction: Objects, Design, and Concurrency Designing (sub-) systems Responsibility assignment Charlie Garrod Michael Hilton School of Computer Science 1 Administrivia Reading

More information

PROGRAMMING IN VISUAL BASIC WITH MICROSOFT VISUAL STUDIO Course: 10550A; Duration: 5 Days; Instructor-led

PROGRAMMING IN VISUAL BASIC WITH MICROSOFT VISUAL STUDIO Course: 10550A; Duration: 5 Days; Instructor-led CENTER OF KNOWLEDGE, PATH TO SUCCESS Website: PROGRAMMING IN VISUAL BASIC WITH MICROSOFT VISUAL STUDIO 2010 Course: 10550A; Duration: 5 Days; Instructor-led WHAT YOU WILL LEARN This course teaches you

More information

Programming in C++ Prof. Partha Pratim Das Department of Computer Science and Engineering Programming in C++ Indian Institute of Technology, Kharagpur

Programming in C++ Prof. Partha Pratim Das Department of Computer Science and Engineering Programming in C++ Indian Institute of Technology, Kharagpur Programming in C++ Prof. Partha Pratim Das Department of Computer Science and Engineering Programming in C++ Indian Institute of Technology, Kharagpur Lecture 14 Default Parameters and Function Overloading

More information

Class modelling (part 2)

Class modelling (part 2) Class modelling (part 2) Fabrizio Maria Maggi Institute of Computer Science (these slides are derived from the book Object-oriented modeling and design with UML ) Qualified Associations What is the meaning

More information

Design Patterns. Design Patterns

Design Patterns. Design Patterns Design Patterns As software engineers, we commonly have to make decisions about how to create complex objects, how to encapsulate some actions, how to allow for the undoing of certain operations, etc.

More information

Defining Classes and Methods

Defining Classes and Methods Defining Classes and Methods Chapter 5 Modified by James O Reilly Class and Method Definitions OOP- Object Oriented Programming Big Ideas: Group data and related functions (methods) into Objects (Encapsulation)

More information

Engineering Design w/embedded Systems

Engineering Design w/embedded Systems 1 / 40 Engineering Design w/embedded Systems Lecture 33 UML Patrick Lam University of Waterloo April 4, 2013 2 / 40 What is UML? Unified Modelling Language (UML): specify and document architecture of large

More information

Object-Oriented Programming

Object-Oriented Programming Object-Oriented Programming 3/18/14 Presentation for use with the textbook Data Structures and Algorithms in Java, 6th edition, by M. T. Goodrich, R. Tamassia, and M. H. Goldwasser, Wiley, 2014 Object-Oriented

More information

UML Fundamental. OutLine. NetFusion Tech. Co., Ltd. Jack Lee. Use-case diagram Class diagram Sequence diagram

UML Fundamental. OutLine. NetFusion Tech. Co., Ltd. Jack Lee. Use-case diagram Class diagram Sequence diagram UML Fundamental NetFusion Tech. Co., Ltd. Jack Lee 2008/4/7 1 Use-case diagram Class diagram Sequence diagram OutLine Communication diagram State machine Activity diagram 2 1 What is UML? Unified Modeling

More information

Model Driven Development Unified Modeling Language (UML)

Model Driven Development Unified Modeling Language (UML) Model Driven Development Unified Modeling Language (UML) An Overview UML UML is a modeling notation standardized by OMG (proposal 1997, ver.1.1 in 1998, ver. 2.0 in 2004) now in 2.4.1 mature based on notations

More information

Object Oriented Programming in Java. Jaanus Pöial, PhD Tallinn, Estonia

Object Oriented Programming in Java. Jaanus Pöial, PhD Tallinn, Estonia Object Oriented Programming in Java Jaanus Pöial, PhD Tallinn, Estonia Motivation for Object Oriented Programming Decrease complexity (use layers of abstraction, interfaces, modularity,...) Reuse existing

More information

7. Implementation Phase. 7.1 Architecture Diagrams 7.2 OO Languages: Java 7.3 Constraint Languages: OCL

7. Implementation Phase. 7.1 Architecture Diagrams 7.2 OO Languages: Java 7.3 Constraint Languages: OCL 7. Implementation Phase 7.1 Architecture Diagrams 7.2 OO Languages: Java 7.3 Constraint Languages: OCL Architecture Design Models An architecture model (structure model) is a model of a data processing

More information

Software Development. Modular Design and Algorithm Analysis

Software Development. Modular Design and Algorithm Analysis Software Development Modular Design and Algorithm Analysis Data Encapsulation Encapsulation is the packing of data and functions into a single component. The features of encapsulation are supported using

More information

CS112 Lecture: Defining Instantiable Classes

CS112 Lecture: Defining Instantiable Classes CS112 Lecture: Defining Instantiable Classes Last revised 2/3/05 Objectives: 1. To describe the process of defining an instantiable class 2. To discuss public and private visibility modifiers. Materials:

More information

Inheritance and Interfaces

Inheritance and Interfaces Inheritance and Interfaces Object Orientated Programming in Java Benjamin Kenwright Outline Review What is Inheritance? Why we need Inheritance? Syntax, Formatting,.. What is an Interface? Today s Practical

More information

(800) Toll Free (804) Fax Introduction to Java and Enterprise Java using Eclipse IDE Duration: 5 days

(800) Toll Free (804) Fax   Introduction to Java and Enterprise Java using Eclipse IDE Duration: 5 days Course Description This course introduces the Java programming language and how to develop Java applications using Eclipse 3.0. Students learn the syntax of the Java programming language, object-oriented

More information

CSCE 156 Computer Science II

CSCE 156 Computer Science II CSCE 156 Computer Science II Lab 04 - Classes & Constructors Dr. Chris Bourke Prior to Lab 1. Review this laboratory handout prior to lab. 2. Read Object Creation tutorial: http://download.oracle.com/javase/tutorial/java/javaoo/objectcreation.

More information

CS1004: Intro to CS in Java, Spring 2005

CS1004: Intro to CS in Java, Spring 2005 CS1004: Intro to CS in Java, Spring 2005 Lecture #23: OO Design, cont d. Janak J Parekh janak@cs.columbia.edu Administrivia HW#5 due Tuesday And if you re cheating on (or letting others see your) HW#5

More information

Principles of Software Construction: Objects, Design, and Concurrency

Principles of Software Construction: Objects, Design, and Concurrency Principles of Software Construction: Objects, Design, and Concurrency A formal design process Josh Bloch Charlie Garrod Darya Melicher 1 Administrivia Homework 2 feedback in your GitHub repository Homework

More information

administrivia today UML start design patterns Tuesday, September 28, 2010

administrivia today UML start design patterns Tuesday, September 28, 2010 administrivia Assignment 2? promise to get past assignment 1 back soon exam on monday review slides are posted your responsibility to review covers through last week today UML start design patterns 1 Unified

More information

Object Oriented Design. Program Design. Analysis Phase. Part 2. Analysis Design Implementation. Functional Specification

Object Oriented Design. Program Design. Analysis Phase. Part 2. Analysis Design Implementation. Functional Specification Object Oriented Design Part 2 Analysis Design Implementation Program Design Analysis Phase Functional Specification Completely defines tasks to be solved Free from internal contradictions Readable both

More information

CHAPTER 1. Topic: UML Overview. CHAPTER 1: Topic 1. Topic: UML Overview

CHAPTER 1. Topic: UML Overview. CHAPTER 1: Topic 1. Topic: UML Overview CHAPTER 1 Topic: UML Overview After studying this Chapter, students should be able to: Describe the goals of UML. Analyze the History of UML. Evaluate the use of UML in an area of interest. CHAPTER 1:

More information

Programming in Visual Basic with Microsoft Visual Studio 2010

Programming in Visual Basic with Microsoft Visual Studio 2010 Programming in Visual Basic with Microsoft Visual Studio 2010 Course 10550; 5 Days, Instructor-led Course Description This course teaches you Visual Basic language syntax, program structure, and implementation

More information

Object-Oriented Modeling Using UML. CS151 Chris Pollett Aug. 29, 2005.

Object-Oriented Modeling Using UML. CS151 Chris Pollett Aug. 29, 2005. Object-Oriented Modeling Using UML CS151 Chris Pollett Aug. 29, 2005. Outline Objects and Classes Modeling Relationships and Structures Some Terms and Concepts Objects and classes are fundamental to OO

More information

Class diagrams. Modeling with UML Chapter 2, part 2. Class Diagrams: details. Class diagram for a simple watch

Class diagrams. Modeling with UML Chapter 2, part 2. Class Diagrams: details. Class diagram for a simple watch Class diagrams Modeling with UML Chapter 2, part 2 CS 4354 Summer II 2015 Jill Seaman Used to describe the internal structure of the system. Also used to describe the application domain. They describe

More information

Chapter 6 Introduction to Defining Classes

Chapter 6 Introduction to Defining Classes Introduction to Defining Classes Fundamentals of Java: AP Computer Science Essentials, 4th Edition 1 Objectives Design and implement a simple class from user requirements. Organize a program in terms of

More information

OBJECT ORIENTED DESIGN with the Unified Process. Use Case Realization

OBJECT ORIENTED DESIGN with the Unified Process. Use Case Realization OBJECT ORIENTED DESIGN with the Unified Process Use Case Realization Objectives Explain the purpose and objectives of objectoriented design Develop design class diagrams Develop detailed sequence diagrams

More information

Object-Oriented Concepts and Principles (Adapted from Dr. Osman Balci)

Object-Oriented Concepts and Principles (Adapted from Dr. Osman Balci) Object-Oriented Concepts and Principles (Adapted from Dr. Osman Balci) Sung Hee Park Department of Mathematics and Computer Science Virginia State University September 18, 2012 The Object-Oriented Paradigm

More information

Modeling Alternative Courses in Detailed Use Cases

Modeling Alternative Courses in Detailed Use Cases Modeling Alternative Courses in Detailed Use Cases David Gelperin LiveSpecs Software dave@livespecs.com Abstract Real-life interactions between systems and users entail decisions and alternative courses

More information

Patterns and Testing

Patterns and Testing and Lecture # 7 Department of Computer Science and Technology University of Bedfordshire Written by David Goodwin, based on the lectures of Marc Conrad and Dayou Li and on the book Applying UML and (3

More information

Pattern for Structuring UML-Compatible Software Project Repositories

Pattern for Structuring UML-Compatible Software Project Repositories Pattern for Structuring UML-Compatible Software Project Repositories Pavel Hruby Navision Software a/s Frydenlunds Allé 6 2950 Vedbaek, Denmark E-mail: ph@navision.com Web site: www.navision.com/services/methodology/default.asp

More information

Software Design and Analysis for Engineers

Software Design and Analysis for Engineers Software Design and Analysis for Engineers by Dr. Lesley Shannon Email: lshannon@ensc.sfu.ca Course Website: http://www.ensc.sfu.ca/~lshannon/courses/ensc251 Simon Fraser University Slide Set: 1 Date:

More information

Class modelling (part 2)

Class modelling (part 2) Class modelling (part 2) Fabrizio Maria Maggi Institute of Computer Science (these slides are derived from the book Object-oriented modeling and design with UML ) Qualified Associations What is the meaning

More information

Contents. I. Classes, Superclasses, and Subclasses. Topic 04 - Inheritance

Contents. I. Classes, Superclasses, and Subclasses. Topic 04 - Inheritance Contents Topic 04 - Inheritance I. Classes, Superclasses, and Subclasses - Inheritance Hierarchies Controlling Access to Members (public, no modifier, private, protected) Calling constructors of superclass

More information

Traditional Approaches to Modeling

Traditional Approaches to Modeling Traditional Approaches to Modeling Timeliness, Performance and How They Relate to Modeling, Architecture and Design Mark S. Gerhardt Chief Architect Pittsburgh, PA 15213 Levels of Real Time Performance

More information

OBJECT ORIENTED SYSTEM DEVELOPMENT Software Development Dynamic System Development Information system solution Steps in System Development Analysis

OBJECT ORIENTED SYSTEM DEVELOPMENT Software Development Dynamic System Development Information system solution Steps in System Development Analysis UNIT I INTRODUCTION OBJECT ORIENTED SYSTEM DEVELOPMENT Software Development Dynamic System Development Information system solution Steps in System Development Analysis Design Implementation Testing Maintenance

More information

Curriculum Map Grade(s): Subject: AP Computer Science

Curriculum Map Grade(s): Subject: AP Computer Science Curriculum Map Grade(s): 11-12 Subject: AP Computer Science (Semester 1 - Weeks 1-18) Unit / Weeks Content Skills Assessments Standards Lesson 1 - Background Chapter 1 of Textbook (Weeks 1-3) - 1.1 History

More information

University of British Columbia CPSC 111, Intro to Computation 2009W2: Jan-Apr 2010 Tamara Munzner

University of British Columbia CPSC 111, Intro to Computation 2009W2: Jan-Apr 2010 Tamara Munzner University of British Columbia CPSC 111, Intro to Computation 2009W2: Jan-Apr 2010 Tamara Munzner Inheritance II Lecture 34, Mon Apr 12 2010 borrowing from slides by Kurt Eiselt http://www.cs.ubc.ca/~tmm/courses/111-10

More information

Introduction to Software Testing Chapter 4 Input Space Partition Testing

Introduction to Software Testing Chapter 4 Input Space Partition Testing Introduction to Software Testing Chapter 4 Input Space Partition Testing Paul Ammann & Jeff Offutt http://www.cs.gmu.edu/~offutt/ softwaretest/ Ch. 4 : Input Space Coverage Four Structures for Modeling

More information

CS/ENGRD 2110 SPRING Lecture 2: Objects and classes in Java

CS/ENGRD 2110 SPRING Lecture 2: Objects and classes in Java 1 CS/ENGRD 2110 SPRING 2017 Lecture 2: Objects and classes in Java http://courses.cs.cornell.edu/cs2110 CMS VideoNote.com, PPT slides, DrJava, Book 2 CMS available. Visit course webpage, click Links, then

More information

Unified Modeling Language (UML)

Unified Modeling Language (UML) Unified Modeling Language (UML) Troy Mockenhaupt Chi-Hang ( Alex) Lin Pejman ( PJ ) Yedidsion Overview Definition History Behavior Diagrams Interaction Diagrams Structural Diagrams Tools Effect on Software

More information

Intro to Programming & C Why Program? 1.2 Computer Systems: Hardware and Software. Why Learn to Program?

Intro to Programming & C Why Program? 1.2 Computer Systems: Hardware and Software. Why Learn to Program? Intro to Programming & C++ Unit 1 Sections 1.1-4 and 2.1-10, 2.12-13, 2.15-17 CS 1428 Spring 2019 Jill Seaman 1.1 Why Program? Computer programmable machine designed to follow instructions Program a set

More information

Data Structures (list, dictionary, tuples, sets, strings)

Data Structures (list, dictionary, tuples, sets, strings) Data Structures (list, dictionary, tuples, sets, strings) Lists are enclosed in brackets: l = [1, 2, "a"] (access by index, is mutable sequence) Tuples are enclosed in parentheses: t = (1, 2, "a") (access

More information

OBJECT ORIENTED DESIGN with the Unified Process. Use Case Realization

OBJECT ORIENTED DESIGN with the Unified Process. Use Case Realization OBJECT ORIENTED DESIGN with the Unified Process Use Case Realization 2016 Software Engineering 2 (Zoom-Into Design) Requirement Requirement Specification (Functional & Non- Functional) analysis Requirement

More information

8. Floating-point Numbers II

8. Floating-point Numbers II Floating-point Number Systems A Floating-point number system is defined by the four natural numbers: 8. Floating-point Numbers II Floating-point Number Systems; IEEE Standard; Limits of Floating-point

More information

Chapter 10 Classes Continued. Fundamentals of Java

Chapter 10 Classes Continued. Fundamentals of Java Chapter 10 Classes Continued Objectives Know when it is appropriate to include class (static) variables and methods in a class. Understand the role of Java interfaces in a software system and define an

More information

Lab Manual. Object Oriented Analysis And Design. TE(Computer) VI semester

Lab Manual. Object Oriented Analysis And Design. TE(Computer) VI semester Lab Manual Object Oriented Analysis And Design TE(Computer) VI semester Index Sr. No. Title of Programming Assignment Page No. 1 2 3 4 5 6 7 8 9 10 Study of Use Case Diagram Study of Activity Diagram Study

More information

PIC 10A Objects/Classes

PIC 10A Objects/Classes PIC 10A Objects/Classes Ernest Ryu UCLA Mathematics Last edited: November 13, 2017 User-defined types In C++, we can define our own custom types. Object is synonymous to variable, and class is synonymous

More information

Subclass Gist Example: Chess Super Keyword Shadowing Overriding Why? L10 - Polymorphism and Abstract Classes The Four Principles of Object Oriented

Subclass Gist Example: Chess Super Keyword Shadowing Overriding Why? L10 - Polymorphism and Abstract Classes The Four Principles of Object Oriented Table of Contents L01 - Introduction L02 - Strings Some Examples Reserved Characters Operations Immutability Equality Wrappers and Primitives Boxing/Unboxing Boxing Unboxing Formatting L03 - Input and

More information

Introduction to Software Engineering. 5. Modeling Objects and Classes

Introduction to Software Engineering. 5. Modeling Objects and Classes Introduction to Software Engineering 5. Modeling Objects and Classes Roadmap > UML Overview > Classes, attributes and operations > UML Lines and Arrows > Parameterized Classes, Interfaces and Utilities

More information

Chapter 3 Objects and Classes

Chapter 3 Objects and Classes Chapter 3 Objects and Classes Topics OO Programming Concepts Creating Objects and Object Reference Variables Constructors Modifiers Instance and Class Variables and Methods Scope of Variables OO Programming

More information