Class Diagram Mehwish Shafiq. Class Collection of object that share common properties, attributes, and behavior. Collection of objects with same data.

Slides:



Advertisements
Similar presentations
CIS224 Software Projects: Software Engineering and Research Methods
Advertisements

Stereotypes Stereotypes provide the capability to create a new kind of modeling element. –They can be used to classify or mark modeling elements. –A type.
1 CIS224 Software Projects: Software Engineering and Research Methods Lecture 4 Class Models (Based on Fowler (2004, Chapters 3 & 5) and Stevens and Pooley.
Chapter 22 Object-Oriented Systems Analysis and Design and UML Systems Analysis and Design Kendall and Kendall Fifth Edition.
Use Case - Example University library system requirements
OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 1/18 Use Case Analysis – continued Control Classes.
Use Case Diagram © copyright 2001 SNU OOPSLA Lab..
Objects and Classes First Programming Concepts. 14/10/2004Lecture 1a: Introduction 2 Fundamental Concepts object class method parameter data type.
Slide 1 Systems Analysis & Design CS183 Spring Semester 2008 Dr. Jonathan Y. Clark Course Website:
Lecture 4 Class Responsibility Collaboration Cards
Essentials of interaction diagrams Lecture 23 & 24.
Essentials of interaction diagrams Lecture Outline Collaborations Interaction on collaboration diagrams Sequence diagrams Messages from an object.
Use cases and requirement specification - 1 Use case diagrams 3 use cases System boundaries Remember: Use case diagramming is a tool, not the requirements.
1 SWE Introduction to Software Engineering Lecture 15 – System Modeling Using UML.
Object Oriented Software Development Modelling information systems OOSAD Booklet Chapter 4 Lecture: Week 3 Brian Farrimond.
6/8/991 Analysis Tuesday 09/14/99 Revised: September 11, 2000 (APM)
Software Engineering Lecture 9 Object-Oriented Design II.
CS 501: Software Engineering Fall 2000 Lecture 12 Object-Oriented Design II.
Use Case Analysis – continued
Introductory case study. 2 The problem The most difficult part of any design project is understanding the task you are attempting You have been contacted.
Software Engineering Case Study Slide 1 Introductory case study.
Use Case Diagram : Library System
CS 494 Adv. SW Design and Development
Domain Modeling (with Objects). Motivation Programming classes teach – What an object is – How to create objects What is missing – Finding/determining.
Use Cases Why use ‘em? How do they work? UC diagrams Using them later in the software development cycle.
Object-oriented Design CSCI 5801: Software Engineering.
CS2110: SW Development Methods Design of methods (functions) Class design – CRC cards – UML class and sequence diagrams Software Design.
1 CMPT 275 Software Engineering Requirements Analysis Phase Requirements Analysis Activity (Identifying Objects, Scenarios) Janice Regan,
PowerPoint Presentation for Dennis, Wixom, & Tegarden Systems Analysis and Design with UML, 4th Edition Copyright © 2012 John Wiley & Sons, Inc. All rights.
An Introduction to Java Chapter 11 Object-Oriented Application Development: Part I.
1 Object-Oriented Analysis Use Case Driven. 2 The outline method for OOA 1.Identify object classes within the problem domain 2.Define the behaviour of.
Structural Modeling. Objectives O Understand the rules and style guidelines for creating CRC cards, class diagrams, and object diagrams. O Understand.
SYS466: Analysis and Design Using OO Models Domain Class Diagram.
Lecture 6: Structural Modeling
Conceptual Model or Domain Models Chapter10 Applying UML and pattern.
What is a Structural Model?
Design Model Lecture p6 T120B pavasario sem.
Games Development Game Architecture: Entities CO2301 Games Development 1 Week 22.
Identifying Classes OO Software Design and Construction Computer Science Dept Va Tech January 2002 ©2002 McQuain WD & Keller BJ 1 Getting Started In the.
7. 2Object-Oriented Analysis and Design with the Unified Process Objectives  Detailed Object-Oriented Requirements Definitions  System Processes—A Use.
Domain Classes – Part 1.  Analyze Requirements as per Use Case Model  Domain Model (Conceptual Class Diagram)  Interaction (Sequence) Diagrams  System.
Designing Classes CS239 – Jan 26, Key points from yesterday’s lab  Enumerated types are abstract data types that define a set of values.  They.
Copyright © 2011 Pearson Education, Inc. Publishing as Prentice Hall Object-Oriented Systems Analysis and Design Using UML Systems Analysis and Design,
 What to do if you want to build a new house? › Buy a bunch of wood and nails and start immediately. › Or, put some blueprints to follow, and plan of.
Object Oriented Programming and Data Abstraction Earl Huff Rowan University.
Unified Modeling Language (UML)
Chapter 2 (Horstmann’s Book) – Part 1 The Object-Oriented Design Process Hwajung Lee.
DOMAIN CLASSES – PART 1 BTS430 Systems Analysis and Design using UML.
Chapter 5: Structural Modeling
Chapter 5: Structural Modeling
Object-Oriented Analysis and Design
Class diagram Description
Table of Contents Class Objects.
Today in OOAD Today in Lab Review EU-Lease Assignment (Vision)
Object Analysis: Classification
CS 501: Software Engineering Fall 1999
Modeling Classes with UML
UML Class Diagram.
Outline Writing Classes Copyright © 2012 Pearson Education, Inc.
SYS466 Domain Classes – Part 1.
Copyright 2007 Oxford Consulting, Ltd
Outline Anatomy of a Class Encapsulation Anatomy of a Method
Use Case Definition: A use case describes in narrative prose
Class Diagram.
Chapter 22 Object-Oriented Systems Analysis and Design and UML
Use Case Analysis – continued
2.1 Introduction to Object-Oriented Programming
Games Development Game Architecture: Entities
Lecture 8 Object Concepts
CS 501: Software Engineering
Presentation transcript:

Class Diagram Mehwish Shafiq

Class Collection of object that share common properties, attributes, and behavior. Collection of objects with same data structures (attributes) and behavior (Function, code, operation).

Classification & Instantiation Grouping common objects in a class is classification. Instantiation is the Act of creating an instance.

Example

Representing a class Class Name Attributes Methods

Members of a Class Attributes and Methods Their Visibility has 3 types  Public “+”  Private “-”  Protected “#”

Example-Visibility Student - enrolment_no : String - award : String + set_number(number ): int + set_award(award) + get_number() + get_award()

Interface We access objects by calling its methods. Set of method calls available for object are called its interface. Student - enrolment_no : String - award : String + set_number(String n ) + set_award(String a ) + get_number( ) + get_award( )

More about Classes Define classes that collaborate to perform required task. Define classes that deliver required use cases. Defining classes=defining overall system architecture.

Identifying Classes identify the important things mentioned in the text usually described as ‘things of interest in the system’ ‘things of interest’ = things = nouns normally nouns and noun phrases Noun identification process:  underline all nouns and noun phrases  gives a first rough list  refine/analyse/eliminate rough list to produce candidate class list

Refining First Noun List convert plurals to singular  Books > Book remove synonyms  choose one of ‘library-member’ & ‘member of the library’ remove anything vague/ambiguous, or clarify it usually remove events or actions remove anything outside the scope of the system gives list of possible classes

Refining Candidate Class List check relevance/role/need for the class  would Publisher be a class, or just an attribute of Book

Dealing with Uncertainty? if in doubt  keep it in the list?  or not? keeping it in may cause confusion/ambiguity leaving it out may lose information some analysts keep 2 lists  definites and maybes

What kind of things might be classes? real-world tangible things - Book, Copy real-world intangibles - Course, Unit roles - Borrower, Student sometimes (but often not)-> events, interactions  loan, appointment

Actors and classes is an actor a class in the system? Yes, if  system needs to store information about the actor, for example BookBorrower becomes Library_member