Rational Rose - JAVA interface modeling problem
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   sangeeta_kasturi
Posted On:   Tuesday, September 10, 2002 06:38 AM

I have a problem with modeling JAVA Interfaces & their implementations in a Class Diagram. I am evaluating Rational Rose 2002 and created a Class Diagram with J2EE as my package. I clicked on the "lollipop" icon to create an Interface called "myInterface" and defined 2 methods - m1() & m2(). I then clickedon the Class icon & created 2 classes "implementation1" & "implementation2", and made them realize "myInterface" by clicking on the "realize" icon (I also tried by inserting the Implements class in the Specification wizard by right clicking on "Open Specification") Now when I write custom Comments in each of the Implementation classes, it is reflected in the otehr 2 clas   More>>

I have a problem with modeling JAVA Interfaces & their implementations in a Class Diagram. I am evaluating Rational Rose 2002 and created a Class Diagram with J2EE as my package. I clicked on the "lollipop" icon to create an Interface called "myInterface" and defined 2 methods - m1() & m2().
I then clickedon the Class icon & created 2 classes "implementation1" & "implementation2", and made them realize "myInterface" by clicking on the "realize" icon (I also tried by inserting the Implements class in the Specification wizard by right clicking on "Open Specification") Now when I write custom Comments in each of the Implementation classes, it is reflected in the otehr 2 classes, which I do not want! I want the 2 concrete classes to implement the interface but do it their own way! How do I acheive this in UML. I noticed that when I view the Operations in the Implementation classes, their base class is the interface "myInterface" and hence I think any changes made in the Implementation classes is reflected in the other classes too! Please help since my Modeling is stuck in Rational Rose!

   <<Less

Re: Rational Rose - JAVA interface modeling problem

Posted By:   rajeev_kumar  
Posted On:   Wednesday, September 11, 2002 08:54 AM

Hi,

When Click on the Operations Tab after clicking on the specifications, there is checkbox..to toggle the view of the inherited methods, just try that and generate the code after that, i think what u should comment in the interafce is "These methods needs to be implemented by the Classes that are extending(implements) the interface"

SO the person who is going to code understands he has to provide the implementation of these methods
About | Sitemap | Contact