structural modeling. objectives o understand the rules and style guidelines for creating crc cards,...
TRANSCRIPT
![Page 1: Structural Modeling. Objectives O Understand the rules and style guidelines for creating CRC cards, class diagrams, and object diagrams. O Understand](https://reader038.vdocument.in/reader038/viewer/2022110211/56649ef65503460f94c0945f/html5/thumbnails/1.jpg)
Structural Modeling
![Page 2: Structural Modeling. Objectives O Understand the rules and style guidelines for creating CRC cards, class diagrams, and object diagrams. O Understand](https://reader038.vdocument.in/reader038/viewer/2022110211/56649ef65503460f94c0945f/html5/thumbnails/2.jpg)
ObjectivesO Understand the rules and style
guidelines for creating CRC cards, class diagrams, and object diagrams.
O Understand the processes used to create CRC cards, class diagrams, and object diagrams.
O Be able to create CRC cards, class diagrams, and object diagrams.
O Understand the relationship between the structural and use case models.
![Page 3: Structural Modeling. Objectives O Understand the rules and style guidelines for creating CRC cards, class diagrams, and object diagrams. O Understand](https://reader038.vdocument.in/reader038/viewer/2022110211/56649ef65503460f94c0945f/html5/thumbnails/3.jpg)
Structural ModelO A formal way of representing the objects
that are used and created by a business systemO PeopleO PlacesO Things
O Drawn using an iterative processO First drawn in a conceptual, business-centric
wayO Then refined in a technology-centric way
describing the actual databases and files
![Page 4: Structural Modeling. Objectives O Understand the rules and style guidelines for creating CRC cards, class diagrams, and object diagrams. O Understand](https://reader038.vdocument.in/reader038/viewer/2022110211/56649ef65503460f94c0945f/html5/thumbnails/4.jpg)
Structural Models
![Page 5: Structural Modeling. Objectives O Understand the rules and style guidelines for creating CRC cards, class diagrams, and object diagrams. O Understand](https://reader038.vdocument.in/reader038/viewer/2022110211/56649ef65503460f94c0945f/html5/thumbnails/5.jpg)
Structural ModelsO Main goal: to discover the key data
contained in the problem domain and to build a structural model of the objects
Problem DomainSolution Domain
StructuralModeling
![Page 6: Structural Modeling. Objectives O Understand the rules and style guidelines for creating CRC cards, class diagrams, and object diagrams. O Understand](https://reader038.vdocument.in/reader038/viewer/2022110211/56649ef65503460f94c0945f/html5/thumbnails/6.jpg)
A Common LanguageO Structural models create a well-
defined vocabulary shared by users and analystsO Classes created during analysis are
not the classes that programmers develop during implementation
O This refinement comes laterO Typical structural models:
O CRC cardsO Class (and Object) diagrams
![Page 7: Structural Modeling. Objectives O Understand the rules and style guidelines for creating CRC cards, class diagrams, and object diagrams. O Understand](https://reader038.vdocument.in/reader038/viewer/2022110211/56649ef65503460f94c0945f/html5/thumbnails/7.jpg)
Classes, Attributes, & Operations
O ClassesO Templates for
instances of people, places, or things
O AttributesO Properties that
describe the state of an instance of a class (an object)
O OperationsO Actions or
functions that a class can perform
![Page 8: Structural Modeling. Objectives O Understand the rules and style guidelines for creating CRC cards, class diagrams, and object diagrams. O Understand](https://reader038.vdocument.in/reader038/viewer/2022110211/56649ef65503460f94c0945f/html5/thumbnails/8.jpg)
RelationshipsO Describe how classes relate to one
anotherO Three basic types in UML
O Generalization O Enables inheritance of attributes and
operationsO Aggregation
O Relates parts to wholesO Association
O Miscellaneous relationships between classes
![Page 9: Structural Modeling. Objectives O Understand the rules and style guidelines for creating CRC cards, class diagrams, and object diagrams. O Understand](https://reader038.vdocument.in/reader038/viewer/2022110211/56649ef65503460f94c0945f/html5/thumbnails/9.jpg)
CRC Cards
![Page 10: Structural Modeling. Objectives O Understand the rules and style guidelines for creating CRC cards, class diagrams, and object diagrams. O Understand](https://reader038.vdocument.in/reader038/viewer/2022110211/56649ef65503460f94c0945f/html5/thumbnails/10.jpg)
Responsibilities & Collaborations
O ResponsibilitiesO KnowingO Doing
O CollaborationO Objects working together to service a
request
![Page 11: Structural Modeling. Objectives O Understand the rules and style guidelines for creating CRC cards, class diagrams, and object diagrams. O Understand](https://reader038.vdocument.in/reader038/viewer/2022110211/56649ef65503460f94c0945f/html5/thumbnails/11.jpg)
Front-Side of a CRC Card
![Page 12: Structural Modeling. Objectives O Understand the rules and style guidelines for creating CRC cards, class diagrams, and object diagrams. O Understand](https://reader038.vdocument.in/reader038/viewer/2022110211/56649ef65503460f94c0945f/html5/thumbnails/12.jpg)
Back-Side of a CRC Card
![Page 13: Structural Modeling. Objectives O Understand the rules and style guidelines for creating CRC cards, class diagrams, and object diagrams. O Understand](https://reader038.vdocument.in/reader038/viewer/2022110211/56649ef65503460f94c0945f/html5/thumbnails/13.jpg)
Class Diagrams
![Page 14: Structural Modeling. Objectives O Understand the rules and style guidelines for creating CRC cards, class diagrams, and object diagrams. O Understand](https://reader038.vdocument.in/reader038/viewer/2022110211/56649ef65503460f94c0945f/html5/thumbnails/14.jpg)
Elements of a Class Diagram
![Page 15: Structural Modeling. Objectives O Understand the rules and style guidelines for creating CRC cards, class diagrams, and object diagrams. O Understand](https://reader038.vdocument.in/reader038/viewer/2022110211/56649ef65503460f94c0945f/html5/thumbnails/15.jpg)
Attribute VisibilityO Attribute visibility can be specified in the
class diagramO Public attributes (+) are visible to all classesO Private attributes (-) are visible only to an
instance of the class in which they are definedO Protected attributes (#) are like private
attributes, but are also visible to descendant classes
O Visibility helps restrict access to the attributes and thus ensure consistency and integrity
![Page 16: Structural Modeling. Objectives O Understand the rules and style guidelines for creating CRC cards, class diagrams, and object diagrams. O Understand](https://reader038.vdocument.in/reader038/viewer/2022110211/56649ef65503460f94c0945f/html5/thumbnails/16.jpg)
OperationsO Constructor
O Creates objectO Query
O Makes information about state available
O UpdateO Changes values of some or all
attributes
![Page 17: Structural Modeling. Objectives O Understand the rules and style guidelines for creating CRC cards, class diagrams, and object diagrams. O Understand](https://reader038.vdocument.in/reader038/viewer/2022110211/56649ef65503460f94c0945f/html5/thumbnails/17.jpg)
More Elements of Class Diagrams
![Page 18: Structural Modeling. Objectives O Understand the rules and style guidelines for creating CRC cards, class diagrams, and object diagrams. O Understand](https://reader038.vdocument.in/reader038/viewer/2022110211/56649ef65503460f94c0945f/html5/thumbnails/18.jpg)
MultiplicitiesDepartme
ntBoss
Employee Child
Boss Employee
1 1
1 0..*
1 1..*
Exactly one:A department has one and only one boss
Zero or more:An employee has zero to many children
One or more:A boss is responsible for one or more employees
![Page 19: Structural Modeling. Objectives O Understand the rules and style guidelines for creating CRC cards, class diagrams, and object diagrams. O Understand](https://reader038.vdocument.in/reader038/viewer/2022110211/56649ef65503460f94c0945f/html5/thumbnails/19.jpg)
More MultiplicitiesEmployee Spouse
Employee Vacation
EmployeeCommitte
e
1 0..1
1 2..4
1 1..3, 5
Zero or one:An employee can be married to 0 or 1 spouse
Specified range:An employee can take 2 to 4 vacations each year
Multiple disjoint ranges:An employee can be in 1 to 3 or 5 committees
![Page 20: Structural Modeling. Objectives O Understand the rules and style guidelines for creating CRC cards, class diagrams, and object diagrams. O Understand](https://reader038.vdocument.in/reader038/viewer/2022110211/56649ef65503460f94c0945f/html5/thumbnails/20.jpg)
Sample Class Diagram
![Page 21: Structural Modeling. Objectives O Understand the rules and style guidelines for creating CRC cards, class diagrams, and object diagrams. O Understand](https://reader038.vdocument.in/reader038/viewer/2022110211/56649ef65503460f94c0945f/html5/thumbnails/21.jpg)
Domain Model : visualizing concept
![Page 22: Structural Modeling. Objectives O Understand the rules and style guidelines for creating CRC cards, class diagrams, and object diagrams. O Understand](https://reader038.vdocument.in/reader038/viewer/2022110211/56649ef65503460f94c0945f/html5/thumbnails/22.jpg)
PowerPoint Presentation for Dennis, Wixom, & Tegarden Systems Analysis and Design with UML, 3rd EditionCopyright © 2009 John Wiley & Sons, Inc. All rights reserved.
Book
title
public class Book{ private String title; ...}
Object modeling might support a reduced “semantic gap” in models at different stages.
But an exact 1-1 mapping is not always present or desirable.
![Page 23: Structural Modeling. Objectives O Understand the rules and style guidelines for creating CRC cards, class diagrams, and object diagrams. O Understand](https://reader038.vdocument.in/reader038/viewer/2022110211/56649ef65503460f94c0945f/html5/thumbnails/23.jpg)
Not A Diagram of Software Components
O Conceptual models represent ideas, things, and objects in the real-world problem domain.
O A conceptual model is not a picture of:O Software components. O Classes in an object-oriented
programming language.O It illustrates real-world concepts.
![Page 24: Structural Modeling. Objectives O Understand the rules and style guidelines for creating CRC cards, class diagrams, and object diagrams. O Understand](https://reader038.vdocument.in/reader038/viewer/2022110211/56649ef65503460f94c0945f/html5/thumbnails/24.jpg)
4 Steps to Domain Model
O Make a list of candidate concepts O Create CRC CardsO Create the class diagram (Domain
Model)O Review the class diagram
![Page 25: Structural Modeling. Objectives O Understand the rules and style guidelines for creating CRC cards, class diagrams, and object diagrams. O Understand](https://reader038.vdocument.in/reader038/viewer/2022110211/56649ef65503460f94c0945f/html5/thumbnails/25.jpg)
STEP 1Make a list of candidate concepts
![Page 26: Structural Modeling. Objectives O Understand the rules and style guidelines for creating CRC cards, class diagrams, and object diagrams. O Understand](https://reader038.vdocument.in/reader038/viewer/2022110211/56649ef65503460f94c0945f/html5/thumbnails/26.jpg)
Strategies to Identify Conceptual Classes
O Use a conceptual class category listO Make a list of candidate concepts
O Use noun phrase identificationO Identify noun ( and noun phrases) in
textual descriptions of the problem domain, and consider them as concepts or attributes.
O Use Cases are excellent description to draw for this analysis.
![Page 27: Structural Modeling. Objectives O Understand the rules and style guidelines for creating CRC cards, class diagrams, and object diagrams. O Understand](https://reader038.vdocument.in/reader038/viewer/2022110211/56649ef65503460f94c0945f/html5/thumbnails/27.jpg)
Object IdentificationO Textual analysis of use-case
informationO Creates a rough first cutO Common object listO IncidentsO Roles
![Page 28: Structural Modeling. Objectives O Understand the rules and style guidelines for creating CRC cards, class diagrams, and object diagrams. O Understand](https://reader038.vdocument.in/reader038/viewer/2022110211/56649ef65503460f94c0945f/html5/thumbnails/28.jpg)
Textual analysis of use-case information
O • A NounO A common or improper noun implies a class of objects.O A proper noun or direct reference implies an instance of a class.O A collective noun implies a class of objects made up of groups of
instances of another class.O • An adjective implies an attribute of an object.O • A verb
O A verb doing verb implies an operation.O A being verb implies a classification relationship between an
object and its class.O A having verb implies an aggregation or association relationship.O A transitive verb implies an operation.O An intransitive verb implies an exception.O A predicate or descriptive verb phrase implies an operation.
O • An adverb implies an attribute of a relationship or an operation.
![Page 29: Structural Modeling. Objectives O Understand the rules and style guidelines for creating CRC cards, class diagrams, and object diagrams. O Understand](https://reader038.vdocument.in/reader038/viewer/2022110211/56649ef65503460f94c0945f/html5/thumbnails/29.jpg)
![Page 30: Structural Modeling. Objectives O Understand the rules and style guidelines for creating CRC cards, class diagrams, and object diagrams. O Understand](https://reader038.vdocument.in/reader038/viewer/2022110211/56649ef65503460f94c0945f/html5/thumbnails/30.jpg)
![Page 31: Structural Modeling. Objectives O Understand the rules and style guidelines for creating CRC cards, class diagrams, and object diagrams. O Understand](https://reader038.vdocument.in/reader038/viewer/2022110211/56649ef65503460f94c0945f/html5/thumbnails/31.jpg)
![Page 32: Structural Modeling. Objectives O Understand the rules and style guidelines for creating CRC cards, class diagrams, and object diagrams. O Understand](https://reader038.vdocument.in/reader038/viewer/2022110211/56649ef65503460f94c0945f/html5/thumbnails/32.jpg)
Step 2Create CRC cards
![Page 33: Structural Modeling. Objectives O Understand the rules and style guidelines for creating CRC cards, class diagrams, and object diagrams. O Understand](https://reader038.vdocument.in/reader038/viewer/2022110211/56649ef65503460f94c0945f/html5/thumbnails/33.jpg)
Designing with CRC cards
O CRC Cards—Classes, Responsibilities, Collaboration Cards.
O OO design is about assigning Responsibilities to Classes for how they Collaborate to accomplish a use case
O Usually a manual process done in a brainstorming session O 3 X 5 note cardsO One card per classO Front has responsibilities and collaborationsO Back has attributes needed
33
![Page 34: Structural Modeling. Objectives O Understand the rules and style guidelines for creating CRC cards, class diagrams, and object diagrams. O Understand](https://reader038.vdocument.in/reader038/viewer/2022110211/56649ef65503460f94c0945f/html5/thumbnails/34.jpg)
Detailed Design with CRC cards
O Design processO Identify class with primary
responsibility O Identify other classes that collaborate
with primary class (become requests for service to other classes)
O Identify responsibilities within each class (these become methods)
34
![Page 35: Structural Modeling. Objectives O Understand the rules and style guidelines for creating CRC cards, class diagrams, and object diagrams. O Understand](https://reader038.vdocument.in/reader038/viewer/2022110211/56649ef65503460f94c0945f/html5/thumbnails/35.jpg)
CRC Card Notation
35
![Page 36: Structural Modeling. Objectives O Understand the rules and style guidelines for creating CRC cards, class diagrams, and object diagrams. O Understand](https://reader038.vdocument.in/reader038/viewer/2022110211/56649ef65503460f94c0945f/html5/thumbnails/36.jpg)
CRC Card Results
36
![Page 37: Structural Modeling. Objectives O Understand the rules and style guidelines for creating CRC cards, class diagrams, and object diagrams. O Understand](https://reader038.vdocument.in/reader038/viewer/2022110211/56649ef65503460f94c0945f/html5/thumbnails/37.jpg)
Step 3Create Domain Model
![Page 38: Structural Modeling. Objectives O Understand the rules and style guidelines for creating CRC cards, class diagrams, and object diagrams. O Understand](https://reader038.vdocument.in/reader038/viewer/2022110211/56649ef65503460f94c0945f/html5/thumbnails/38.jpg)
O Using the CRC card you can identify the following:O Attributes related to each classes.O Association between classes.
![Page 39: Structural Modeling. Objectives O Understand the rules and style guidelines for creating CRC cards, class diagrams, and object diagrams. O Understand](https://reader038.vdocument.in/reader038/viewer/2022110211/56649ef65503460f94c0945f/html5/thumbnails/39.jpg)
![Page 40: Structural Modeling. Objectives O Understand the rules and style guidelines for creating CRC cards, class diagrams, and object diagrams. O Understand](https://reader038.vdocument.in/reader038/viewer/2022110211/56649ef65503460f94c0945f/html5/thumbnails/40.jpg)
![Page 41: Structural Modeling. Objectives O Understand the rules and style guidelines for creating CRC cards, class diagrams, and object diagrams. O Understand](https://reader038.vdocument.in/reader038/viewer/2022110211/56649ef65503460f94c0945f/html5/thumbnails/41.jpg)
![Page 42: Structural Modeling. Objectives O Understand the rules and style guidelines for creating CRC cards, class diagrams, and object diagrams. O Understand](https://reader038.vdocument.in/reader038/viewer/2022110211/56649ef65503460f94c0945f/html5/thumbnails/42.jpg)
![Page 43: Structural Modeling. Objectives O Understand the rules and style guidelines for creating CRC cards, class diagrams, and object diagrams. O Understand](https://reader038.vdocument.in/reader038/viewer/2022110211/56649ef65503460f94c0945f/html5/thumbnails/43.jpg)
Association CategoryO A is recorded in BO A uses or manages BO A is related to a
transaction of BO A communicates with BO A is a transaction
related to another transaction B
O A is next to BO A is related to B via a
transaction
O A is recorded in BO A uses or manages BO A is related to a
transaction of BO A communicates with BO A is a transaction
related to another transaction B
O A is next to BO A is related to B via a
transaction
![Page 44: Structural Modeling. Objectives O Understand the rules and style guidelines for creating CRC cards, class diagrams, and object diagrams. O Understand](https://reader038.vdocument.in/reader038/viewer/2022110211/56649ef65503460f94c0945f/html5/thumbnails/44.jpg)
![Page 45: Structural Modeling. Objectives O Understand the rules and style guidelines for creating CRC cards, class diagrams, and object diagrams. O Understand](https://reader038.vdocument.in/reader038/viewer/2022110211/56649ef65503460f94c0945f/html5/thumbnails/45.jpg)
![Page 46: Structural Modeling. Objectives O Understand the rules and style guidelines for creating CRC cards, class diagrams, and object diagrams. O Understand](https://reader038.vdocument.in/reader038/viewer/2022110211/56649ef65503460f94c0945f/html5/thumbnails/46.jpg)
![Page 47: Structural Modeling. Objectives O Understand the rules and style guidelines for creating CRC cards, class diagrams, and object diagrams. O Understand](https://reader038.vdocument.in/reader038/viewer/2022110211/56649ef65503460f94c0945f/html5/thumbnails/47.jpg)
![Page 48: Structural Modeling. Objectives O Understand the rules and style guidelines for creating CRC cards, class diagrams, and object diagrams. O Understand](https://reader038.vdocument.in/reader038/viewer/2022110211/56649ef65503460f94c0945f/html5/thumbnails/48.jpg)
![Page 49: Structural Modeling. Objectives O Understand the rules and style guidelines for creating CRC cards, class diagrams, and object diagrams. O Understand](https://reader038.vdocument.in/reader038/viewer/2022110211/56649ef65503460f94c0945f/html5/thumbnails/49.jpg)
![Page 50: Structural Modeling. Objectives O Understand the rules and style guidelines for creating CRC cards, class diagrams, and object diagrams. O Understand](https://reader038.vdocument.in/reader038/viewer/2022110211/56649ef65503460f94c0945f/html5/thumbnails/50.jpg)
SummaryO Structural Models
O CRC CardsO Class Diagrams
O Creating CRC cards and domain model
![Page 51: Structural Modeling. Objectives O Understand the rules and style guidelines for creating CRC cards, class diagrams, and object diagrams. O Understand](https://reader038.vdocument.in/reader038/viewer/2022110211/56649ef65503460f94c0945f/html5/thumbnails/51.jpg)
ReferenceO Alan R. Dennis, Barbara Haley
Wixom, and David Tegarden. 2007. Systems Analysis and Design with UML Version 2.0: An Object-Oriented Approach (3rd ed.). John Wiley & Sons, Inc., New York, NY, USA.