{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

VeryBasicClassDiagrams

VeryBasicClassDiagrams - Basic Class Diagrams Classifier...

Info iconThis preview shows pages 1–10. Sign up to view the full content.

View Full Document Right Arrow Icon
Generalizable Element Namespace Model Element name visibility isSpecification Classifier isRoot Constraint Body Coming up: Class Syntax Basic Class Diagrams CS/SWE 421 Introduction to Software Engineering Dan Fleck (Slides adapted from Dr. Stephen Clyde with permission)
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Generalizable Element Namespace Model Element name visibility isSpecification Classifier isRoot Constraint Body UML class diagrams Show the classes of a system Their interrelationships Inheritance Aggregation Association Attributes Operations
Background image of page 2
Coming up: Class Names Class Syntax A box divided into compartments Name Attributes Operations Responsibilities (rarely seen) Used-defined compartments (rarely seen) Student major: String gpa: Real standing: String add(Class Section) drop(Class Section) -- The set of students known to the registration system -- An exception occurs if gpa falls below 2.0
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Coming up: Exercise – Class Identification Class Names The name should be a noun or noun phrase The name should be singular and description of each object in the class The name should be meaningful from a problem-domain perspective “Student” is better than “Student Data” or “S-record” or any other implementation driven name
Background image of page 4
Coming up: Attributes Exercise – Class Identification Identify meaningful classes in the Elevator System http://www.web-feats.com/classes/dj/lessons/uml/elevator.htm Answers (possible): Elevator Elevator controller Door Button Elevator Floor
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Coming up: Attributes from an Analysis Perspective Attributes Attributes represent characteristics or properties of classes They are place holders or slots that hold values The values they hold are other objects (or primitive types)
Background image of page 6
Coming up: Operations Attribute Syntax visibility : public “+”, protected “#”, or private “-” name : capitalize first letter of each word that makes up the name, except for the first multiplicity : number, range, or sequence of number or ranges. type : built-in type or any user-defined class initial-value : any constant and user-defined object property-string : e.g, changeable, addOnly, frozen [ visibility ] name [ multiplicity ] [: type ] [= initial-value ] [{ property-string }]
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Coming up: Attribute Syntax Attributes from an Analysis Perspective An attribute relates an object to some other object It has the same semantics as an association joe: Student name: String = “Joe Jones” joe: Student Joe Jones : String Is basically the same as ... name 1
Background image of page 8
Coming up: Type of Relationships in Class Diagrams Operation Syntax visibilit y : “+”, “#”, “-” name : verb or verb phase, capitalize first letter of every word, except first parameter-list : coma separated list of parameters return-type
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 10
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}