0% found this document useful (0 votes)
26 views11 pages

Module 1

This document discusses several advanced object-oriented concepts including enumerations, multiplicity, scope, visibility, association ends, and their properties. It defines enumerations as a data type with a finite set of values. Multiplicity specifies the number of possible values for an attribute. Scope indicates if a feature applies to an object or class. Visibility refers to the ability of a method to reference features from other classes. Association ends represent the connections between classes in associations.

Uploaded by

Varun. B. C
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views11 pages

Module 1

This document discusses several advanced object-oriented concepts including enumerations, multiplicity, scope, visibility, association ends, and their properties. It defines enumerations as a data type with a finite set of values. Multiplicity specifies the number of possible values for an attribute. Scope indicates if a feature applies to an object or class. Visibility refers to the ability of a method to reference features from other classes. Association ends represent the connections between classes in associations.

Uploaded by

Varun. B. C
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 11

Module 1

By Keerthi K.S
Advanced Object and class Concepts
• Enumerations: An enumeration is a data type that has a finite set of
values. the attribute access Permission is an enumeration with
possible values that include read and read-write.
• Figure.penType is an enumeration that includes solid, dashed, and
dotted
Contd..
• Do not use a generalization to capture the values of an enumerated
attribute. An enumeration is merely a list of values; generalization is a
means for structuring the description of objects.
Multiplicity
• Multiplicity is a constraint on the cardinality of a set.
• Multiplicity for an attribute specifies the number of possible values
for each instantiation of an attribute. The most common
specifications are a mandatory single value [1], an optional single
value [0..1], and many [*].
Scope
• The scope indicates if a feature applies to an object or a class.
• Our convention is to list attributes and operations with class scope at
the top of the attribute and operation boxes, respectively
Visibility
• Visibility refers to the ability of a method to reference a feature from
another class and has the possible values of public, protected, private,
and package.
• Any method can freely access public features. Only methods of the
containing class and its descendants via inheritance can access
protected features. (Protected features also have package accessibility
in Java.) Only methods of the containing class can access private
features. Methods of classes defined in the same package as the
target class can access package features
Contd..
• The UML denotes visibility with a prefix. The character “+” precedes
public features. The character “#” precedes protected features. The
character “-” precedes private features. And the character “~”
precedes package features. The lack of a prefix reveals no information
about visibility.
Association Ends
As the name implies, an association end is an end of an association. A
binary association has two ends, a ternary association.
• Association end name:- An association end may have a name. The
names disambiguate multiple references to a class and facilitate
navigation. Meaningful names often arise, and it is useful to place the
names within the proper context.
• Multiplicity. You can specify multiplicity for each association end. The
most common multiplicities are “1” (exactly one), “0..1” (at most
one), and “*” (“many”—zero or more).
• Ordering. The objects for a “many” association end are usually just a
set. However, sometimes the objects have an explicit order.
Contd..
• Bags and sequences. The objects for a “many” association end can
also be a bag or sequence.
• Qualification. One or more qualifier attributes can disambiguate the
objects for a “many” association end.
Association ends have some additional
properties.
• Aggregation. The association end may be an aggregate or constituent
part. Only a binary association can be an aggregation;
• Changeability. This property specifies the update status of an
association end. The possibilities are changeable (can be updated)
and read-only (can only be initialized).
• Navigability. The UML shows navigability with an arrowhead on the
association end attached to the target class. Arrowheads may be
attached to zero, one, or both ends of an association.
• Visibility. Similar to attributes and operations, association ends may
be public, protected, private, or package.

You might also like