IEG 3080 Tutorial 6 Jack Chan. Prepared by Jack Chan, Spring 2007 Outline UML Basic Class Diagram Sequence Diagram Examples Assignment 2 General Concept.

Slides:



Advertisements
Similar presentations
Use Case Modeling SJTU. Unified Modeling Language (UML) l Standardized notation for object-oriented development l Needs to be used with an analysis and.
Advertisements

Systems Analysis and Design 8th Edition
Unified Modeling Language
Ch 12: Object-Oriented Analysis
CS3773 Software Engineering Lecture 03 UML Use Cases.
Object-Oriented Analysis and Design
Using Diagrams to Represent Program Structure OMT and UML Some pictures and material are from “Design Patterns” by Gamma et al.
UML – Class Diagrams.
IEG3080 Tutorial 7 Prepared by Ryan.
Basic OOP Concepts and Terms
Interaction Models. Interaction Definition An interaction is a behavior that comprises a set of messages exchanged among a set of objects within a context.
Chapter Chapter 1 Introduction to Object-Oriented Programming and Software Development.
Systems Analysis & Design Sixth Edition Systems Analysis & Design Sixth Edition Toolkit Part 5.
Data Analysis (and User Interaction) GEOG 463 5/7/04.
Lab 6 CPIT 250 System Analysis and Design.
Objectives Explain the purpose and objectives of object- oriented design Develop design class diagrams Develop interaction diagrams based on the principles.
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 4 th Ed Chapter Chapter 1 Introduction to Object-Oriented Programming.
ACM/JETT Workshop - August 4-5, 2005 UML Modeling using MagicDraw UML for Java Programmers.
Use Case Modeling. Use case diagram For each use case we develop  Object class diagram (with attributes only)  System sequence diagram (analysis) 
Object-Oriented Analysis and Design
CS 2511 Fall UML Diagram Types  2 Main Types Structure Diagrams ○ Class Diagrams ○ Component Diagrams ○ Object Diagrams Behavior Diagrams ○
COMP Classes Yi Hong May 22, Announcement  Lab 2 & 3 due today.
Introduction To System Analysis and design
From Problem Statement to Design
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter Chapter 1 Introduction to Object-Oriented Programming and.
CIT UPES | Sept 2013 | Unified Modeling Language - UML.
CS 360 Lecture 6.  A model is a simplification of reality  We build models to better understand the system being developed.  We build models of complex.
Java Classes Using Java Classes Introduction to UML.
1. 2 Object-Oriented Concept Class & Object Object-Oriented Characteristics How does it work? Relationships Between Classes Development Tools Advantage.
Object-Oriented Analysis and Design An Introduction.
Object-Oriented Programming in C++
Behavioral Modeling: Sequence and Communication Diagrams Copyright © 2009 John Wiley & Sons, Inc. Copyright © 2005 Pearson Education Copyright © 2009 Kannan.
Chapter Two The UML – Unified Modeling Language Ku-Yaw Chang Assistant Professor, Department of Computer Science and Information.
Systems Analysis & Design 7 th Edition Chapter 5.
1 Object-Oriented Programming Using C++ CLASS 5. 2 Object Composition Object composition occurs when a class contains an instance of another class. Creates.
ניתוח מערכות מידע 1 Unified Modeling Language (UML) § § The Unified Modeling Language (UML) is the industry-standard language for: Specifying, Visualizing,
UML Diagrams A tool for presentation of Architecture.
Fall 2010 CS4310 Requirements Engineering A Brief Review of UML & OO Dr. Guoqiang Hu Department of Computer Science UTEP 1.
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.
1 System Analysis and Design Using UML INSTRUCTOR: Jesmin Akhter Lecturer, IIT, JU.
BCS 2143 Object Oriented Design Using UML. Objectives Objects Interactions Finding Classes Relationship Between Classes Attribute and Operation Class.
Information Systems Engineering
2 2009/10 Object Oriented Technology 1 Topic 2: Introduction to Object-Oriented Approach Reference: u Ch.16 Current Trends in System Development (Satzinger:
Design Jon Walker. More UML ● What is UML again?
CS 151: Object-Oriented Design September 5 Class Meeting Department of Computer Science San Jose State University Spring 2013 Instructor: Ron Mak
Unified Modeling Language. Object Oriented Methods ► What are object-oriented (OO) methods?  OO methods provide a set of techniques for analyzing, decomposing,
Design Model Lecture p6 T120B pavasario sem.
Object-Oriented Modeling: Static Models. Object-Oriented Modeling Model the system as interacting objects Model the system as interacting objects Match.
Software Engineering Software Engineering - Mr. Ahmad Al-Ghoul.
Lab 5 CPIT 250 System Analysis and Design.
CS212: Object Oriented Analysis and Design Lecture 32: Use case and Class diagrams.
Lecture 9-1 : Intro. to UML (Unified Modeling Language)
1 Technical & Business Writing (ENG-715) Muhammad Bilal Bashir UIIT, Rawalpindi.
Problem 1 Bank.  Manage customers’ bank account using the following operations: Create a new account given a customer’s name and initial account. Deposit.
INFSY 535.  Small systems  Larger systems 1.Understand the program requirement- what 3. Write and test each part (unit testing) 4. Maintenance 2. Specify.
UML Course Instructor: Rizwana Noor. Overview  Modeling  What is UML?  Why UML?  UML Diagrams  Use Case  Components  Relationships  Notations.
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter Chapter 1 Introduction to Object-Oriented Programming and.
Technical Module C Object Modeling Objects Object – a valuable resource: Money (Account Receivable) Material (Product) Machines (Delivery Truck) Personnel.
Object Oriented Programming and Data Abstraction Earl Huff Rowan University.
Chapter 11 Inheritance © 2008 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved. Marilyn Bohl/Maria Rynn Tools for Structured and Object-Oriented.
CHAPTER 6 OBJECT ANALYSIS.
Designing Classes Lab. The object that you brought to class Put it in the basket we will exchange them now.
1 Design Object Oriented Solutions Object Oriented Analysis & Design Lecturer: Mr. Mohammed Elhajj
Object-Oriented Analysis and Design
The Basics of Class Diagrams for a single class
Unified Modeling Language
Software Design Lecture : 14.
Software Engineering System Modeling Chapter 5 (Part 1) Dr.Doaa Sami
Using Diagrams to Represent Program Structure
Basic OOP Concepts and Terms
Presentation transcript:

IEG 3080 Tutorial 6 Jack Chan

Prepared by Jack Chan, Spring 2007 Outline UML Basic Class Diagram Sequence Diagram Examples Assignment 2 General Concept / Classes Responsibilities Sample codes

Prepared by Jack Chan, Spring 2007 Unified Modeling Language (UML) Object Management Group ( Standard notation of object-oriented modeling Specification, Visualization, Documentation Usage For Communication between program designers Highlight the essential components As a blueprint for programming Code mapping

Prepared by Jack Chan, Spring 2007 UML Structural Diagram E.g. Class Diagram Define static structural model of the classes Show the relationship among different classes Behavior Diagram E.g. Sequence Diagram Interaction diagram Show the exchange of message in time sequence

Prepared by Jack Chan, Spring 2007 Class Diagram Structural model of a class Name (name of the class) Attribute (visibility, +, -, #...) (Lecture Notes, P.355) Operation (visibility name(param-list) : return-type {property-string} (Lecture Notes, P.356) Relationship between two classes Association Generalization/Realization Aggregation/Composition

Prepared by Jack Chan, Spring 2007 Class Diagram – An example - Form1 contains GameEngine - Game1 and Game2 are inherited from GameEngine - Game contains Enemy, Wall and Child Anything can be improved for this design? 1

Prepared by Jack Chan, Spring 2007 Sequence Diagram Show flows of messages, events and actions Time is represented in vertical direction Building blocks Objects Iteration marker *[for all objects] [condition] Self-delegation … Referred to Lecture Notes P.381 Reference: UML Sequence Diagram Tutorial,

Prepared by Jack Chan, Spring 2007 Sequence Diagram – An example -Could you recognize all the building blocks? E.g. objects, conditions, time sequence…. - Could you understand why messages/actions flow through these objects in this way? Lecture Notes P. 380

Prepared by Jack Chan, Spring 2007 Another Example IBM, UML’s Sequence Diagram,

Prepared by Jack Chan, Spring 2007 Assignment 2 – Small Bank Requirements Two customers (two objects in an array) Two accounts (Saving account and Current account) for each of them Deposit certain amount of money into their accounts Print customers’ account summary Add a USD account to each of them Print customers’ account summary again

Prepared by Jack Chan, Spring 2007 Classes in Assignment 2 Small_Bank SavingAccountCurrentAccountUSAccount Account Customers What attributes and operations are included in each of the classes?

Prepared by Jack Chan, Spring 2007 Responsibilities Who knows the customers? Small Bank Who keeps the accounts? Customer Who knows the account balance? Account itself Who handles Deposit/Withdraw operations? Account itself

Prepared by Jack Chan, Spring 2007 Responsibilities Who creates customers? Small Bank Who creates accounts? Customers Who asks to print the account summary of each customers? Small Bank  Customers  Account Why?

Prepared by Jack Chan, Spring 2007 Some code samples class Account { protected …; public virtual void Deposit(…) { ……; } public virtual void Withdraw(…) { ……; } public virtual void Print_Balance() { } … to be filled by yourself

Prepared by Jack Chan, Spring 2007 Some code samples class Saving : Account { public Saving(…) { …; } public override void Print_Balance() { Console.WriteLine(" The Saving Account: ${0}", this.balance); }

Prepared by Jack Chan, Spring 2007 Some code samples private ArrayList acc_list; public Customer(String name, int acc_no) { this.name = name; this.acc_no = acc_no; Account saving_acc = (Account) new Saving(0); Account current_acc = (Account) new Current(0); acc_list = new ArrayList(); acc_list.Add(saving_acc); acc_list.Add(current_acc); }

Prepared by Jack Chan, Spring 2007 Sample Output