Book a Demo

Author Topic: Issues with inheritance  (Read 5583 times)

RealAlex

  • EA Novice
  • *
  • Posts: 13
  • Karma: +0/-0
    • View Profile
Issues with inheritance
« on: July 11, 2008, 01:48:51 am »
Hello to everybody,

During a period of time we were tracing relationships between Analysis and Design with "Realisation" connectors.

Due to "special" circumstances, everything in the Analysis are classes, so the Realisation connector makes my design class inherit methods from the analysis (which, by the way, made my repository work MUCH slower)

Seen that, we decided to delete every "Realisation" connector and change them with some "Directed Association". The issue is that (in some random cases) the class keeps showing the inherited methods.

How can I solve it? I've been searching (adding everything related, querying the database with advanced search, recreating and deleting connectors) and I've been unable to remove those methods.

Any ideas?

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Issues with inheritance
« Reply #1 on: July 11, 2008, 04:20:08 am »
Just a guess...

Have you tried a project integrity check? Perhaps the database got whacked around the time the extra methods showed up.
No, you can't have it!

RealAlex

  • EA Novice
  • *
  • Posts: 13
  • Karma: +0/-0
    • View Profile
Re: Issues with inheritance
« Reply #2 on: July 11, 2008, 08:40:30 pm »
Well, I've gone with that test and yes, my repository had a couple of errors (i guess it is good to have cleaned it) but the inheritance issue is still there... Thanks for the try...

I'll keep on searching, meanwhile... Any other idea?

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Issues with inheritance
« Reply #3 on: July 14, 2008, 06:37:55 pm »
Quote
Well, I've gone with that test and yes, my repository had a couple of errors (i guess it is good to have cleaned it) but the inheritance issue is still there... Thanks for the try...

I'll keep on searching, meanwhile... Any other idea?
Did you really mean Realization?  Realization ISN'T inheritance - that's Generalization/Specialization.

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Issues with inheritance
« Reply #4 on: July 14, 2008, 09:12:00 pm »
But of course it can look a bit like generalization, perhaps with different lines.

That's the 'beauty' of Visio: if it looks OK just drop it on the page. Semantic rigor is for the weak!

Sigh...
No, you can't have it!

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Issues with inheritance
« Reply #5 on: July 15, 2008, 04:18:39 pm »
Quote
But of course it can look a bit like generalization, perhaps with different lines.

That's the 'beauty' of Visio: if it looks OK just drop it on the page. Semantic rigor is for the weak!

Sigh...
Now just to be clear...  My previous postings have suggested that, for a UML tool (such as EA), there is a lot to be said for implementing a similar mechanism WITHN THE EDGE ITSELF to manage the relationship between a feature in the client and a feature in the supplier in both concepts.  So that evolution of the supplier makes it easier to determine how the client shoudl also evolve.

But the two concepts are distinct...

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

RealAlex

  • EA Novice
  • *
  • Posts: 13
  • Karma: +0/-0
    • View Profile
Re: Issues with inheritance
« Reply #6 on: July 15, 2008, 05:42:14 pm »
Yes, I am aware that realisation is for classes to realise functional requirements and that spezialization is for inheritance.

The issue was when I wanted to add a relation between high-level analysis and technical design classes, so I had CustomerEntity in the analysis that become a CustomerObject in my design, so we needed to trace CustomerObject against CustomerEntity, and it was done with realisation (CustomerObjetc in fact realises the functionality required by CustomerEntity) but adding that relationship also added methods inherited that I do not want ¿Is that normal? ¿is there a way to avoid it?

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Issues with inheritance
« Reply #7 on: July 16, 2008, 12:19:57 am »
If you realize an interface (or whatever) you get the whole thing. You don't have to do anything in methods you realize, but they've got to be there. [You language or IDE or compiler may handle this for you, but it is still happening.]

If you need to realize some but not all of an interface, consider refactoring your design to split the interface into the parts you'll need. For those classes that need the entire interface, you should do something like realize all of the interfaces you need, or create a hierarchy of interfaces (and perhaps classes) that provide the combination you require.

David
No, you can't have it!

RealAlex

  • EA Novice
  • *
  • Posts: 13
  • Karma: +0/-0
    • View Profile
Re: Issues with inheritance
« Reply #8 on: July 16, 2008, 05:38:33 pm »
Found the problem.

During the analysis of the project, they did wrong the relationship between use cases & classes & tables, so the use case realises classes & tables.

When I realise the use case, I inherited every single method, key & attribute of every table and class related to the use case.

Now I only need to find a fast way to clean that mess.

Thanks for your help.