wood burning stoves 2.0*
The moose likes OO, Patterns, UML and Refactoring and the fly likes Realization/Generalization? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » OO, Patterns, UML and Refactoring
Bookmark "Realization/Generalization?" Watch "Realization/Generalization?" New topic
Author

Realization/Generalization?

Ram Dhan Yadav K
Ranch Hand

Joined: Aug 13, 2001
Posts: 321
hi,
What is the difference between generalization and realization? What are the different uml dialgrams in which each are applied?
thanks,


Ram Dhan Yadav (SCJP, SCWCD, SCJA-I, IBM EC(483))
"We are what we repeatedly do. Excellence, then, is not an act, but a habit."
Junilu Lacar
Bartender

Joined: Feb 26, 2001
Posts: 4445
    
    5

A superclass is a generalization of its subclass(es). Conversely, a subclass is a specialization of its superclass. UML notation uses a solid line from the subclass to the superclass ending with a hollow triangular arrowhead pointing to the superclass.
A concrete class that implements an interface is a realization of that interface. UML notation is similar to generalization except the line is broken/dashed. The arrowhead points to the interface being realized.
Junilu
[ March 13, 2002: Message edited by: Junilu Lacar ]

Junilu - [How to Ask Questions] [How to Answer Questions]
Ram Dhan Yadav K
Ranch Hand

Joined: Aug 13, 2001
Posts: 321
Hi Junilu ,
So when i encounter questions about generalization and specilization, its almost the same phenomenon i am looking at, right! Sorry if my english is poor!
One more question, While specilizing Abstract class, do we use a solid line or a broken line?
Junilu Lacar
Bartender

Joined: Feb 26, 2001
Posts: 4445
    
    5

While specilizing Abstract class, do we use a solid line or a broken line?
Use a solid line.
Tor Gul
Greenhorn

Joined: Jan 24, 2002
Posts: 4
hmmmmm....
Is subtyping and Realization synonymous???

If not, how do you differentiate b/w the two...


usman
Junilu Lacar
Bartender

Joined: Feb 26, 2001
Posts: 4445
    
    5

Is subtyping and Realization synonymous???

If you use "type" in the sense that the GoF book or Martin Fowler does in "UML Distilled", I think that realization would be one form of subtyping. Specialization would be another form of subtyping in this sense too.
Junilu
Pho Tek
Ranch Hand

Joined: Nov 05, 2000
Posts: 761

c.f. interface inheritance with implementation inheritance.


Regards,

Pho
Wilfried LAURENT
Ranch Hand

Joined: Jul 13, 2001
Posts: 269
You can also read the article about type and class... I find it quite hard to read and I am not sure I understood everything .
isha krishnan
Ranch Hand

Joined: Nov 10, 2008
Posts: 50
Hi All,

I have query regarding realization.

Is it possible to realize an interface in service?
i have seen at some place that service realized an interface(dotten line with hollow arrowhead pointing towards interface).
I know that this service doesnt have any implementaion. so the relation should be incorrect.

Thanks,



Junilu Lacar
Bartender

Joined: Feb 26, 2001
Posts: 4445
    
    5

isha krishnan wrote:
I know that this service doesnt have any implementaion. so the relation should be incorrect.


I don't quite understanding this. You said the service realized an interface. By definition, the service would be an implementation. So what do you mean by "this service doesn't have any implementation"? And what exactly is your question? You asked if it's possible to realize an interface in service but then immediately say that you saw a service realize an interface. Sounds to me like you just answered your own question there. Can you please clarify?
isha krishnan
Ranch Hand

Joined: Nov 10, 2008
Posts: 50
Hi Junilu,

Thanks for prompt reply.I clarified with dev team and they have implementations in service only.So interface has been realized using service. I was missing that information.

Thanks again,
Isha
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Realization/Generalization?
 
Similar Threads
Finally Got the II & III SCORE (97%)
Passed SCEA Part-2 and 3
Companies not using UML
UML Relations & Java Implementation
Passed SCEA [95%]