SOFTWARE ENGINEERING

SOFTWARE DESIGN

OBJECT ORIENTED DESIGN

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Which visibilities can attributes and operations of classes have?
A
Protected
B
Private
C
Public
D
Friends
E
Package
Explanation: 

Detailed explanation-1: -UML identifies four types of visibility: public, protected, private, and package. The +, -, # and   symbols before an attribute and operation name in a class denote the visibility of the attribute and operation.

Detailed explanation-2: -Class. Public − A public member is visible from anywhere in the system. In class diagram, it is prefixed by the symbol ‘+’. Private − A private member is visible only from within the class.

Detailed explanation-3: -Any element marked as having package visibility is visible to all elements within the nearest enclosing package (given that other owning elements have proper visibility). Outside the nearest enclosing package, an element marked as having package visibility is not visible.

There is 1 question to complete.