which cram? college of alameda [email protected] copyright © 1999 patrick mcdermott class...

9
Which CRAM? College of Alameda [email protected] Copyright © 1999 Patrick McDermott Class Relationship Attribute Method cf.: Entity-Relationship-Attribute-Trigger

Upload: edmund-morris

Post on 05-Jan-2016

212 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Which CRAM? College of Alameda pmcdermott@peralta.edu Copyright © 1999 Patrick McDermott Class Relationship Attribute Method cf.: Entity-Relationship-Attribute-Trigger

Which CRAM?

College of Alameda

[email protected] © 1999 Patrick McDermott

ClassRelationship

Attribute

Method

cf.: Entity-Relationship-Attribute-Trigger

Page 2: Which CRAM? College of Alameda pmcdermott@peralta.edu Copyright © 1999 Patrick McDermott Class Relationship Attribute Method cf.: Entity-Relationship-Attribute-Trigger

The Meta-Objects

Object C.R.A.M.

ObjectsClassesRelationshipsAttributesMethods

CLASS

CLASS

Attribute1Attribute2Attribute3

Method1()Method2()

Relationship

Page 3: Which CRAM? College of Alameda pmcdermott@peralta.edu Copyright © 1999 Patrick McDermott Class Relationship Attribute Method cf.: Entity-Relationship-Attribute-Trigger

Which C.R.A.M?• Relationship/Attribute can be a class if Data, a

Method if behavior– Marriage– Color to artist, painter– Eskimo Snow

• Telephone Number– Phone Number at Ma Bell– Japanese phone number: it’s an asset– Area code, exchange, number

• Whose Attribute? License Plate #– Car– Driver

Page 4: Which CRAM? College of Alameda pmcdermott@peralta.edu Copyright © 1999 Patrick McDermott Class Relationship Attribute Method cf.: Entity-Relationship-Attribute-Trigger

Purpose of Objects

• Entity• Business Object

• Infrastructure– User Interface– Data

• Persistence Database

– Control– Static

• For things that aren’t really objects

Page 5: Which CRAM? College of Alameda pmcdermott@peralta.edu Copyright © 1999 Patrick McDermott Class Relationship Attribute Method cf.: Entity-Relationship-Attribute-Trigger

Object

An object (business object) is a thing the business needs to know about. Classes are groups (classifications) of objects.

In most discussions, “class”, “object” and “entity” can be used interchangeably.

In addition to business objects, there areinfrastructure objects. During analysis, you should only discuss business (entity) objects.

Page 6: Which CRAM? College of Alameda pmcdermott@peralta.edu Copyright © 1999 Patrick McDermott Class Relationship Attribute Method cf.: Entity-Relationship-Attribute-Trigger

Attribute

An attribute is a piece of information about an object needed in your business. Often objects, attributes and/or relationships are established or modified by methods. In fact, there should be methods to CRUD all the meta-objects.

CRUD: Create, Read, Update, Delete

Page 7: Which CRAM? College of Alameda pmcdermott@peralta.edu Copyright © 1999 Patrick McDermott Class Relationship Attribute Method cf.: Entity-Relationship-Attribute-Trigger

Attribute or Class?

Attributes Don’t have Attributes

Attributes are “OF” a Class

Page 8: Which CRAM? College of Alameda pmcdermott@peralta.edu Copyright © 1999 Patrick McDermott Class Relationship Attribute Method cf.: Entity-Relationship-Attribute-Trigger

Method

A method, operation, or function is an action needed in your business. Often objects, attributes and/or relationships are established or modified by methods. In fact, there should be methods to CRUD all the meta-objects.

CRUD: Create, Read/Retrieve, Update, Delete

Page 9: Which CRAM? College of Alameda pmcdermott@peralta.edu Copyright © 1999 Patrick McDermott Class Relationship Attribute Method cf.: Entity-Relationship-Attribute-Trigger

Grammatical Analysis

Classes are Nouns Relationships are Verbs Attributes are Adjectives Methods are Phrases

– Including an action and – a Class, Relationship or Attribute

Joel Kermarrec

In Principlethe Ghost is the Verb

of the Form1987