Re: Object Constraint Language and Inheritance



Me once again.

Achims solution looks like this:

context A
inv: self.allInstancesOf()->forall(c | c.oclIsTypeOf(A))

I question myself if that is right. A should have no subclass but a
possible subclass should be B. When I regard to object oriented
programming every B-subobject is also an A. So if you type
'c.oclIsTypeOf(A)' and c is an B-Subobject then of couse c is also of
type A. If so this would not prohibit that A cannot have subclasses.
Right?

Regards,
Uli

.



Relevant Pages

  • Re: Object Constraint Language and Inheritance
    ... possible subclass should be B. When I regard to object oriented ... programming every B-subobject is also an A. So if you type ... given type), and a "sloppy" one, i.e., oclIsKindOf("is it of the ...
    (comp.object)
  • Re: Design help...an explosion of interfaces......
    ... >>comment on any subclass access problem. ... > Its pretty clear that some transactions between client code and Pipe ... one has logical encapsulation of the context ...
    (comp.object)
  • Re: Design help...an explosion of interfaces......
    ... > pipe implementations have the same interface signatures their ... I agree with Daniel T. et al that the context needs to be explained ... comment on any subclass access problem. ... If your client cares whether the pipe is buffered or not, ...
    (comp.object)
  • Re: Division by zero: float vs. int
    ... You can, of course, subclass Double, and provide your own definition ... And, of course, sqrtis not the only function which returns NaN. ... Are you perhaps thinking that the range for floating point ... In what context do you want to be able to say ...
    (comp.lang.java.programmer)
  • Re: Global variable
    ... There's a way around this, thought its not direct, depending on the context ... that is inside of a hidden field (make sure that the hidden field is set to ... You could subclass your page class. ... > function myFunction1() ...
    (microsoft.public.dotnet.framework.aspnet)