12.07.2015 Views

DEV475 Mastering Object-Oriented Analysis and Design with UML ...

DEV475 Mastering Object-Oriented Analysis and Design with UML ...

DEV475 Mastering Object-Oriented Analysis and Design with UML ...

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>DEV475</strong> <strong>Mastering</strong> <strong>Object</strong>-<strong>Oriented</strong> <strong>Analysis</strong> <strong>and</strong> <strong>Design</strong> <strong>with</strong> <strong>UML</strong>What Is an Attribute?What Is an Attribute?• An attribute is a named property of a class thatdescribes a range of values that instances ofthe property may hold.• A class may have any number of attributes or no attributes at all.AttributesStudent-name- address- studentID- dateOfBirth<strong>Mastering</strong> <strong>Object</strong> <strong>Oriented</strong> <strong>Analysis</strong> <strong>and</strong> <strong>Design</strong> <strong>with</strong> <strong>UML</strong>Copyright © 2003 Rational Software, all rights reserved 26An attribute can be defined as:A named property of a class that describes the range of values that instances of theproperty may hold. (The Unified Modeling Language User Guide, Booch, 1999)• A class may have any number of attributes or no attributes at all. At any time, anobject of a class will have specific values for every one of its class’ attributes.• An attribute defined by a class represents a named property of the class or itsobjects. An attribute has a type that defines the type of its instances.• An attribute has a type, which tells us what kind of attribute it is. Typicalattributes are integer, Boolean, real, <strong>and</strong> enumeration. These are called primitivetypes. Primitive types can be specific for a certain programming language.2 - 26

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!