• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

UML Question

 
Ranch Hand
Posts: 202
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you mark a class as abstract, is that a constraint or a stereotype? The current official documents call it a constraint. Why is this so ?

Shouldn't it be a stereotype, as an interface is.
 
Ranch Hand
Posts: 372
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
A stereotype is a modelling construct that is not there in the UML, but close to something that is there in the UML. This definition fits an interface. An interface is something similar to a class, but not exactly the same as class. Hence you can call an interface as a stereotype of class.

Now look closely at this definition of stereotype. Can it be applied to abstract class? No. Because an abstract class IS a class. Hence it is a special form of a modelling construct that is ALREADY THERE in the UML - namely class. You are not talking about a modelling construct outside of core UML, instead, you are talking about a construct that is already part of core UML - ie class, but with a constraint that it needs to have atleast one abstract method.

That said, stereotypes and constraints are almost similar. Because stereotypes are more constrained. For example, an interface is more constrained than its stereotype counterpart - class in the sense that all operations on an interface need to be abstract operations.

Don't be too concerned about these details for SCEA. I heard questions are very basic from UML. Just know the notation for interface and know that it is a stereotype of class

hth,
 
This tiny ad is suggesting that maybe she should go play in traffic.
New web page for Paul's Rocket Mass Heaters movies
https://coderanch.com/t/785239/web-page-Paul-Rocket-Mass
reply
    Bookmark Topic Watch Topic
  • New Topic