Today’s Objectives Define the Problem Domain

Slides:



Advertisements
Similar presentations
Informática II Prof. Dr. Gustavo Patiño MJ
Advertisements

Object-oriented modeling Class/Object Diagrams
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.
2-1 © Prentice Hall, 2007 Chapter 2: Introduction to Object Orientation Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph.
UML Class Diagram and Packages Written by Zvika Gutterman Adam Carmi.
Slide 1 Systems Analysis & Design CS183 Spring Semester 2008 Dr. Jonathan Y. Clark Course Website:
Slide 1 Chapter 7 Structural Modeling. Slide 2 Key Ideas A structural or conceptual model describes the structure of the data that supports the business.
7M701 1 Class Diagram advanced concepts. 7M701 2 Characteristics of Object Oriented Design (OOD) objectData and operations (functions) are combined 
Classes Chapter 4. Terms and Concepts A class is a description of a set of objects that share the same attributes, operations, relationships, and semantics.
Shanghai Jiao Tong University 上海交通大学软件工程中心 Object Oriented Analysis and Design Introduction to Object Technology.
SOFTWARE DESIGN AND ARCHITECTURE LECTURE 18. Review User interface Design principles Design Guidelines.
An Introduction to Java Chapter 11 Object-Oriented Application Development: Part I.
CS3773 Software Engineering Lecture 04 UML Class Diagram.
NI ©UNITEN 2000/01 1 Faculty of Applied Engineering and Urban Planning Software Engineering Department Class Diagram Faculty of Information system Technology.
® IBM Software Group © 2006 IBM Corporation Rational Software France Object-Oriented Analysis and Design with UML2 and Rational Software Modeler 02. Objects,
Today in OOAD  The Domain Model Artifact UML Classes  EU-Bid Domain Model Exercise  EU-Lease Domain Model Assignment Guest Speaker  Kate Cunningham,
The Static Analysis Model Class Diagrams Prof. Hany H. Ammar, CSEE, WVU, and Dept. of Computer Science, Faculty of Computers and Information, Cairo University.
UML Class Diagram Trisha Cummings. What we will be covering What is a Class Diagram? Essential Elements of a UML Class Diagram UML Packages Logical Distribution.
Lecture 6: Structural Modeling
BCS 2143 Object Oriented Design Using UML. Objectives Objects Interactions Finding Classes Relationship Between Classes Attribute and Operation Class.
Object Oriented Analysis & Design Using UML (CS-512) M-Tech CSE (Ist & 3rd Sem) Part Time Mr. Pawan Luthra Assistant Professor (CSE Deptt.) SBSSTC, Ferozepur.
What is a Structural Model?
Week III  Recap from Last Week Review Classes Review Domain Model for EU-Bid & EU-Lease Aggregation Example (Reservation) Attribute Properties.
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.
Domain Classes – Part 1.  Analyze Requirements as per Use Case Model  Domain Model (Conceptual Class Diagram)  Interaction (Sequence) Diagrams  System.
PowerPoint Presentation for Dennis, Wixom & Tegardem Systems Analysis and Design Copyright 2001 © John Wiley & Sons, Inc. All rights reserved. Slide 1.
Chapter 16 UML Class Diagrams 1CS6359 Fall 2012 John Cole.
Chapter 5 System Modeling. What is System modeling? System modeling is the process of developing abstract models of a system, with each model presenting.
1 IBM Software Group ® Essentials of Visual Modeling with UML 2.0 Module 3: Concepts of Object Orientation.
Kyung Hee University Class Diagramming Notation OOSD 담당조교 석사과정 이정환.
Object Oriented Programming and Data Abstraction Earl Huff Rowan University.
UML Fundamental Elements. Structural Elements Represent abstractions in our system. Elements that encapsulate the system's set of behaviors. Structural.
BTS430 Systems Analysis and Design using UML Design Class Diagrams (ref=chapter 16 of Applying UML and Patterns)
Concepts of Object Orientation lecture 1 –b. Objectives: Concepts of Object Orientation OOAD 2  Explain the basic principles of object orientation 
Chapter 5: Structural Modeling
2-1 © Prentice Hall, 2004 Chapter 2: Introduction to Object Orientation Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph.
Modeling with UML – Class Diagrams
CompSci 280 S Introduction to Software Development
UML Diagrams: Class Diagrams The Static Analysis Model
Chapter 9 Domain Models.
Chapter 5: Structural Modeling
Course Outcomes of Object Oriented Modeling Design (17630,C604)
COMPONENT & DEPLOYMENT DIAGRAMS
Object-Oriented Analysis and Design
Class Diagrams.
Topics Procedural and Object-Oriented Programming Classes
Concepts of Object Orientation
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING
Unified Modeling Language
Introduction to Unified Modeling Language (UML)
Today in OOAD Today in Lab Review EU-Lease Assignment (Vision)
Object Oriented Concepts -I
OO Domain Modeling With UML Class Diagrams and CRC Cards
Abstract descriptions of systems whose requirements are being analysed
UML Unified Modelling Language
Object-Oriented Design of Spatial Entities Todd Bacastow
Object Oriented Analysis and Design Using the UML
Object Oriented Analysis and Design
UML Class Diagram.
CIS 375 Bruce R. Maxim UM-Dearborn
SYS466 Domain Classes – Part 1.
Class Diagrams.
Objects, Classes, and Basic Class Diagrams
ITEC 3220A Using and Designing Database Systems
Copyright 2007 Oxford Consulting, Ltd
Class Diagrams Class diagram is basically a graphical representation of the static view of the system and represents different aspects of the application.
Basic OOP Concepts and Terms
Chapter 22 Object-Oriented Systems Analysis and Design and UML
Object Oriented System Design Class Diagrams
Presentation transcript:

Today’s Objectives Define the Problem Domain Define and give examples of objects Define and give examples of classes Define a glossary Define stereotypes Define Domain Model Diagram

Problem Domain Problem domain refers to the real world concepts and things that are related to the problem that we are investigating. Domain modeling is the task of discovering objects/classes that represent those things and concepts.

What is an Object? Informally, an object represents some entity, either physical, conceptual or software. Physical entity Conceptual entity Software entity Truck Chemical Process

A More Formal Definition An object is a concept, abstraction, or thing with sharp boundaries and meaning for an application An object is something that has: State Behavior Identity

The state of an object normally changes over time An Object Has State The state of an object is one of the possible conditions in which an object may exist The state of an object normally changes over time The state of an object is usually implemented by a set of properties (called attributes), with the values of the properties, plus the links the object may have with other objects Name: Joyce Clark Employee ID: 567138 Date hired: March 21, 1987 Status: Tenured Professor Clark a + b = 10

Assign Professor Clark (Returns:confirmation) An Object Has Behavior Behavior determines how an object acts and reacts Behavior defines how an object reacts to requests from other objects The visible behavior of an object is modeled by the set of messages it can respond to (the operations the object can perform) a + b = 10 Assign Professor Clark (Returns:confirmation) Registration System Algebra 101 Course

An Object Has Identity Each object has a unique identity, even if its state is identical to that of another object Professor “J Clark” teaches Algebra

What are Classes? There are many objects identified for any domain A class is a description of a group of objects with common properties (attributes), common behavior (operations), common relationships to other objects (associations and aggregations), and common semantics An object is an instance of a class. A class is an abstraction in that it: Emphasizes relevant characteristics Suppresses other characteristics Abstraction helps us deal with complexity

The Relationship Between Classes and Objects A class is an abstract definition of an object It defines the structure and behavior of each object in the class It serves as a template for creating objects Objects may be grouped into classes Objects Professor Smith Professor Mellon Professor Professor Jones Class

Naming Classes A class name should be a singular noun that best characterizes the abstraction Difficulty in naming a class may be an indication of a poorly defined abstraction Names should come directly from the vocabulary of the domain

Style Guide for Naming Classes A style guide should dictate naming conventions for classes Sample style guide Classes are named using singular nouns Class names start with an upper case letter Underscores are not used Names composed of multiple words are pushed together and the first letter of each additional word is capitalized Example: Reservation,VehicleModel, RentalGroup

Focus on the purpose of the class not on the implementation Glossary After naming a class, a brief concise description of the class should be made Focus on the purpose of the class not on the implementation The class name and description form the basis for a model glossary Look for the “WHATS” and ignore the “HOWS”

Sample Model Glossary Name: reservation Working Definition: A request by a person to rent a EU_Rent vechile of a particular model on a specified date and time for a specific location from a EU-Rent location. Name: rental location Working Definition: A EU-Rent business location at which its vehicles are offered for rent. As more and more about the problem is discovered, refine the class definitions, and add any new classes to the model dictionary.

Class Compartments A class is represented using a compartmented rectangle A class is comprised of three sections The first section contains the class name. The second sections shows the structure (attributes). The third section shows the behavior (operations). The second and third sections may be suppressed if they need not be visible on the diagram

Class model diagram elements – the basic notation

Every class may have at most one stereotype Common stereotypes entity, boundary, controller, exception Utility class Stereotypes are shown in the class name compartment enclosed in << >>

Common stereotypes A boundary class models communication between the system’s surroundings and its inner workings An entity class models information and associated behavior that must be stored A control class models control behavior specific to one or more use cases

Class Diagrams in Context "We are here!" ~ static structure diagrams functionality structure interaction configuration behavior

This is the central model in an "object oriented" approach. Class model This is the central model in an "object oriented" approach. Class Model concepts come in two flavors: basic concepts: broad usage general consensus advanced concepts: usage-dependent style-dependent Our emphasis will be on the "basic concepts." (refer to Fowler Chapter 6 for the “advanced concepts.”)

A Class Model describes: the kinds of objects in the system, in terms of: structure ~ the various kinds of static relationships things an object can be expected to "know" its attributes its relationships behavior ~ the dynamics things an object can be expected to "do" its operations rules constraints and guidance an object is expected to follow

concept – how users think about the world ~ the semantics Class model A Class Model defines the static structure of concepts, types, and classes. concept – how users think about the world ~ the semantics type – software component interface class – software component implementation note: in many 00 languages, the notion of ‘class’ combines both ‘interface’ & ‘implementation.’ but the distinction is important! "Program to a class's interface rather than to its implementation."

Class models & the development process 3 perspectives we can take when defining a class model: Conceptual the terms & facts of the problem space i.e., the system glossary or domain model typically, business-focused Specification the software, rather than the business only the software "type" (the interface) Implementation language-specific realization the implementation – "the classes that implement the type" (or, “implement the interface”) one type (interface) specification can have multiple implementations. This course deals with the “conceptual” and “specification” perspective class models; the Java course deals with the "implementation" perspective.

Class model diagram elements Class – a description of a set of objects that share the same responsibilities (attributes, relationships, operations, rules) and semantics. Attributes – the “value facts” the system records the “variables” Relationships between classes – 3 types: association generalization (supertype/subtype) aggregation (“advanced”) Operations – the behavior the "methods" Rules – the constraints that govern both structure (relationships & attributes) and behavior (operations). Many of these elements can be shown visually as a Class Model Diagram.

Class behavior – Operations informal definition: An operation specifies what an object can “do.” – i.e., the processes a class knows how to carry out, when requested. example: An ATM machine knows how to “accept a deposit.” A reservation knows how to “close a reservation.” UML definition: An operation is the specification of a transformation or query that an object may be called on to execute.

Operations in perspective Conceptual operation = a responsibility (in a way that a business person might describe) For example, “I (an ATM machine) am responsible to know how to accept a deposit.” Specification operation = signature specification (the “interface”) Implementation (e.g., Java) operation = realization = method (method body)

These are some of the things that can be specified about an operation: Operation properties These are some of the things that can be specified about an operation: visibility public: + protected: # private: - name (verb + noun phrase) think: "I, an instance of class-ABC, know how to <verb + noun-phrase>" e.g., "I, an instance of Order, know how to CloseAnOrder." parameter-list return-type We will come back to the topic of “operations” in a later lesson.

Class structure – Attributes informal definition: An attribute is a feature of a class that describes what an object of the class can "know.” example: A customer “knows” its address. An order “knows” its date-placed. An order line “knows” its quantity. UML definition: An attribute is the description of a named slot of a specified type in a class; each object of the class separately holds a value of the type.

Attributes in perspective Conceptual attribute = a kind of "fact" in the users' problem space facts about the kinds of values that need to be recorded. example: A customer has a name (that can be any ‘String’ value). An order has an order-price (that is numeric in USD to 2 decimal places) Specification attribute = responsibilitiy an object is “responsible to know (and tell)” the value of its attributes. Implementation (e.g., Java) attribute = value and reference types

The following things can be specified about an attribute: Attribute properties The following things can be specified about an attribute: name – noun or noun phrase multiplicity typically only 1 (“mandatory”) or 0..1 (“optional”) type – datatype (built-in or user-defined) initial value – system-supplied value at birth? changeability – changeable, frozen, or addOnly? visibility – (same as for operation) encapsulation Implementation perspective: Attribute values are considered hidden; an attribute’s value must be requested. Specification perspective: We will treat all attributes as visible (“public” with an assumed accessor operation in the design model).