This week's book giveaway is in the Cloud/Virtualizaton forum.
We're giving away four copies of Mesos in Action and have Roger Ignazio on-line!
See this thread for details.
Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

What is Classifier Level?

 
Ram Dhan Yadav K
Ranch Hand
Posts: 321
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When a UML Class attribute is scoped at the classifier level, it is implemented with which one of the following C++ and Java terms?
a) Public
b) Final
c) Private
d) Protected
e) Static
What's the answer for this question?
What is classifier level?
thanks,
Ramdhan YK
 
Allan Moster
Ranch Hand
Posts: 153
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For encapsulation, attributes should be scoped as private. In ANSI C++, Class is viewed as a form of classifier so as struct, union, typedef, instantiated class, and enumerations.
 
Roshan Lal
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ramdhan Kotamaraja:
When a UML Class attribute is scoped at the classifier level, it is implemented with which one of the following C++ and Java terms?
a) Public
b) Final
c) Private
d) Protected
e) Static
What's the answer for this question?
What is classifier level?
thanks,
Ramdhan YK


I think it is e. Classifier level means class/interface level and that is "static" in these options.

 
Axel Janssen
Ranch Hand
Posts: 2166
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think that Alan is right, though access classifier would be much more clear. I don't see any connection between classifier and static.
Its good OO practice to use private (access) classifier for attributes (aka. fields, member variables, properties)

correct me if i am wrong
Axel
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic