Fall 2002 SJSU -- CmpE Enterprise & Application Frameworks Dr. M.E. Fayad, Professor Computer Engineering Department – RM# College of Engineering San José.

Slides:



Advertisements
Similar presentations
1 Object-oriented design Part 2: OO tools & UML. 2 CRC cards Design tool & method for discovering classes, responsibilities, & relationships Record on.
Advertisements

May-June 2001 ISISTAN Research Institute – Tandil, Argentina Software Design Methodologies: UML in Action Dr. Mohamed Fayad, J.D. Edwards Professor Department.
May-June 2001 ISISTAN Research Institute – Tandil, Argentina Software Design Methodologies: UML in Action Dr. Mohamed Fayad, J.D. Edwards Professor Department.
1 Classes. 2 Finding classes w Choosing classes is first step in defining essence of problem w If you can recognize an abstraction, you’ve found a candidate.
Lecture 9 Object-Oriented Analysis
L10-S1Object Identification SJSU -- CmpE Advanced Object-Oriented Analysis & Design Dr. M.E. Fayad, Professor Computer Engineering Department,
L3-1-S1 OO Concepts © M.E. Fayad SJSU -- CMPE Software System Engineering Dr. M.E. Fayad, Professor Computer Engineering Department, Room.
L4-1-S1 UML Overview © M.E. Fayad SJSU -- CmpE Software Architectures Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I.
L3-5c-S1 Object Diagrams © M.E. Fayad SJSU -- CmpE Software System Engineering Dr. M.E. Fayad, Professor Computer Engineering Department,
L16-S1 Object Diagrams 2003 SJSU -- CmpE Software Patterns Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I College of Engineering.
L28-S1 Interaction Diagrams 2003 SJSU -- CmpE Advanced Object-Oriented Analysis & Design Dr. M.E. Fayad, Professor Computer Engineering Department, Room.
L9-S1Object Identification SJSU -- CmpE Object-Oriented Analysis & Design Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I.
May-June 2001 ISISTAN Research Institute – Tandil, Argentina Software Design Methodologies: UML in Action Dr. Mohamed Fayad, J.D. Edwards Professor Department.
L19-S1 More on Class Diagrams 2003 SJSU -- CmpE Object-Oriented Analysis & Design Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I.
 Fayad SJSU – CmpE Software Engineering Management Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I College of Engineering.
L21-S1 Model-Based Arch SJSU -- CmpE Advanced Object-Oriented Analysis & Design Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I.
Lecture 4 Class Responsibility Collaboration Cards
L3-5d-S1 Class Diagrams © M.E. Fayad SJSU -- CmpE Software System Engineering Dr. M.E. Fayad, Professor Computer Engineering Department, Room.
© M.E. Fayad SJSU -- CmpE Software System Engineering Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I College of Engineering.
L26-S1 Interactions 2003 SJSU -- CmpE Advanced Object-Oriented Analysis & Design Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I.
L06-2-S1 Activity Diagrams 2003 SJSU -- CmpE Software Engineering II Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I College of Engineering.
© M.E. Fayad SJSU -- CmpE Software System Engineering Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I College of Engineering.
P2-S1 MySQL 2003 SJSU -- CmpE-- M.E. Fayad Database Design Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I College of Engineering.
© M.E. Fayad SJSU -- CmpE Software System Engineering Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I College of Engineering.
© M.E. Fayad SJSU -- CmpE Database Design Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I College of Engineering San José.
L5-S1 Class Diagrams 2003 SJSU -- CmpE Software Patterns Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I College of Engineering San.
L8-S1 CRC Cards 2003 SJSU -- CmpE Advanced Object-Oriented Analysis & Design Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I College.
1999 – 2006 M.E. Fayad SJSU -- CmpE Software Engineering Management Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I College of Engineering.
© M.E. Fayad SJSU -- CmpE Analysis Heuristics Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I College of Engineering San.
© M.E. Fayad SJSU -- CmpE Software System Engineering Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I College of Engineering.
L18-S1 Getting Started 2003 SJSU -- CmpE Advanced Object-Oriented Analysis & Design Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I.
 Fayad SJSU -- CmpE Software System Engineering Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I College of Engineering San.
© M.E. Fayad SJSU -- CmpE Software System Engineering Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I College of Engineering.
L3-6b-S1 Sequence Diagrams © M.E. Fayad SJSU -- CmpE Software System Engineering Dr. M.E. Fayad, Professor Computer Engineering Department, Room.
L6-1-S1Design Heuristics - 1 © M.E. Fayad SJSU -- CmpE Software System Engineering Dr. M.E. Fayad, Professor Computer Engineering Department,
SJSU – CmpE Fall 2002 Enterprise & Application Frameworks Dr. M.E. Fayad, Professor Computer Engineering Department – RM# College of Engineering San José.
Fall, 2002 SJSU -- CMPE Enterprise & Application Frameworks Dr. M.E. Fayad, Professor Computer Engineering Department – RM# College of Engineering San.
Glenn David Blank Computer Science & Engineering Department Lehigh University, Bethlehem, PA, USA With support from the National Science Foundation (Grants.
CS212: Object Oriented Analysis and Design Lecture 4: Objects and Classes - I.
L1-S1Introduction 2003 SJSU -- CmpE Advanced Object-Oriented Analysis & Design Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I College.
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.
L6-S1 UML Overview 2003 SJSU -- CmpE Advanced Object-Oriented Analysis & Design Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I College.
Lecture OO05 Object Scenarios Object Interaction Diagrams
L8-2-S1 Misc Topics © M.E. Fayad SJSU -- CmpE Database Design Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I College of.
SJSU – CmpE Fall 2002 Enterprise & Application Frameworks Dr. M.E. Fayad, Professor Computer Engineering Department – RM# College of Engineering San José.
Fall 2002 SJSU -- CMPE Object-Oriented Analysis & Design Dr. M.E. Fayad, Professor Computer Engineering Department – RM# College of Engineering San José.
OO DomainModeling With UML Class Diagrams and CRC Cards Chapter 6 Princess Nourah bint Abdulrahman University College of Computer and Information Sciences.
Identification of Classes. Object Oriented Analysis (OOA) OOA is process by which we identify classes that play role in achieving system goals & requirements.
L3-S1Analysis Heuristics 2003 SJSU -- CmpE Advanced Object-Oriented Analysis & Design Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I.
L1-S1 Infinite R-DB 2003 SJSU -- CmpE Database Design Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I College of Engineering San.
Object-Oriented Analysis & Design
Advanced Object-Oriented Analysis & Design
Database Design Dr. M.E. Fayad, Professor
Software Engineering Management
OO Domain Modeling With UML Class Diagrams and CRC Cards
Software Patterns Dr. M.E. Fayad, Professor
OO Domain Modeling With UML Class Diagrams and CRC Cards
Component-Based & Software Reuse
Software System Engineering
Object-Oriented Analysis & Design
Software Engineering Management
Software System Engineering
Software System Engineering
Object-Oriented Analysis & Design
Enterprise & Application Frameworks
Object-Oriented Analysis & Design
Advanced Object-Oriented Analysis & Design
Component Based & Software Reuse
Database Design Dr. M.E. Fayad, Professor
Software System Engineering
Presentation transcript:

Fall 2002 SJSU -- CmpE Enterprise & Application Frameworks Dr. M.E. Fayad, Professor Computer Engineering Department – RM# College of Engineering San José State University One Washington Square San José, CA URL:

L4-S2OO Concepts-2 Fall 2002 SJSU -- CmpE M.E. Fayad 2 Lesson 4: Object-Oriented Concepts-2

L4-S3OO Concepts-2 Fall 2002 SJSU -- CmpE M.E. Fayad Lesson Objectives 3 Understand UML notation Discuss UML- objects Explore UML- classes Understand UML interfaces Explore UML associations Understand CRC cards

L4-S4OO Concepts-2 Fall 2002 SJSU -- CmpE M.E. Fayad  Classes should make sense in the problem domain.  Good classes classify the objects which need to be modeled in the system.  Classes often correspond to NOUNS.  Avoid redundant or irrelevant classes which add no value in the problem domain.  Remove classes which have no attributes. 4 Selecting Good Classes

L4-S5OO Concepts-2 Fall 2002 SJSU -- CmpE M.E. Fayad After initial pass, discard classes which are:  Redundant  Irrelevant to the problem domain  Vague  Attributes  If class name has no attributes of its own, it is probably an attribute. 5 Elimination of Inappropriate Classes

L4-S6OO Concepts-2 Fall 2002 SJSU -- CmpE M.E. Fayad The Problem Statement: A simple cash register has a display, an electronic wire with a plug, and a numeric keypad which has keys for subtotal, tax, and total. This cash storage device has a total key which triggers the release on the drawer. The numeric buttons simply place a number on the display screen, the subtotal displays the current total, the tax key computes the tax, and the total key adds the subtotal to the tax. Identify all the classes in this problem statement Use the class elimination rules to eliminate the unnecessary classes. 6 Example: Simple Cash Register

L4-S7OO Concepts-2 Fall 2002 SJSU -- CmpE M.E. Fayad We are going to use nouns to find classes Nouns (initial) RegisterDisplayWire PlugKeypad Keys DevicesReleaseDrawer ButtonsScreenNumber TotalTax Nouns (General Knowledge) 0-9 keys Money Subtotal Key Tax Key Total Key 7 Classes in Initial Phase

L4-S8OO Concepts-2 Fall 2002 SJSU -- CmpE M.E. Fayad 8 Eliminating Unnecessary Nouns Register Display Wire---> Irrelevant Plug---> Irrelevant Keypad Keys Devices---> Vague Release---> Irrelevant Drawer Buttons---> Redundant Screen---> Redundant Number---> Attribute Total ---> Attribute Tax---> Attribute 0-9 Key Value---> Attribute Money Subtotal Key Tax Key Total Key

L4-S9OO Concepts-2 Fall 2002 SJSU -- CmpE M.E. Fayad 9 Class in UML Circle radius {radius>0} centerpoint: Point = (10, 10) display () remove () setPosition (pos: Point) setRadius (newRadius) Class name Attribute name Attribute type Operations Constraint Initial value Parameters (name: type= initial value

L4-S10OO Concepts-2 Fall 2002 SJSU -- CmpE M.E. Fayad 10 Objects in UML aCircle: Circle radius = 21 centerpoint = (10, 10) Instance name Attribute names Class name Attribute values Classes and objects are units composed of attributes, Operations, and constraints.

L4-S11OO Concepts-2 Fall 2002 SJSU -- CmpE M.E. Fayad 11 Corresponding Code in Simplified Java Class Circle { int radius; Point centerpoint; public void setRadius (int newRadius) { if (newRadius > 0)// constraint { radius = newRadius; ….. } public void setPosition (Point pos) { … } public void display ( ) { … } public void remove ( ) { … }

L4-S12OO Concepts-2 Fall 2002 SJSU -- CmpE M.E. Fayad 12 System Responsibilities & Collaborations Define Responsibilities – What are the goals of the system – What must objects know to meet goals – What steps must each object accomplish Determine Collaborations – Decompose responsibilities into interactions among objects – Define clients and servers – Where should knowledge be held

L4-S13OO Concepts-2 Fall 2002 SJSU -- CmpE M.E. Fayad 13 CRC Cards General – Each class is described on a separate 3X5 or 4X6 card The cards are known as CRC cards; they have 3 sections: – Class – Responsibilities – Collaborations

L4-S14OO Concepts-2 Fall 2002 SJSU -- CmpE M.E. Fayad 14 More on CRC Cards Class Name (Role) Responsibility Collaboration Client Server Specify One, Unique Responsibility, & WithinCollaborators Interfaces or services Contextprovided by named class

L4-S15OO Concepts-2 Fall 2002 SJSU -- CmpE M.E. Fayad 15 More on CRC Cards ATM (Automatic Teller) Responsibility Collaboration Access & modify account balance Account (Checking) Balance Inquiry Deposit Transaction Funds Transfer Withdrawal Transaction Class name CollaboratorsRoles Client Server

L4-S16OO Concepts-2 Fall 2002 SJSU -- CmpE M.E. Fayad What are the good, bad, and ugly about CRC cards? Propose a process of how to use the CRC cards T/F –CRC stands for Common Responsible Class –According to UML, Class is composed of attributes and collaborators. Define: –Associations, Instance, CRC, responsibilities, and collaborations 16 Discussion Questions