Access the answers to your technology questions today.
Subscribe Now
30-day free trial. Register in 60 seconds.
What Makes Experts Exchange Unique?
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.
Try it out and discover for yourself.
Subscribe Now
30-day free trial. Register in 60 seconds.
Join the Community
Give a Little. Get a Lot.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Join the Community
by: KelvinYPosted on 2007-04-23 at 15:19:17ID: 18961960
Hi akpp,
From your description it sounds like there is no relationship between the CalcIOConsole class and the Stacks class. Neither class is contained in the other through inheritance or composition. The methods that interact with the CalcIOConsole class and the Stacks class are both contained within the Calculator class, so Calculator is the class that would have a relationship with the other two.
A class that contains methods that return a certain type does not necessarily have a relationship with the returned type unless you actually have a member of the calling class that is of that type. So, for instance, if your Calculator implements a stack object that contains an aggregation of Rational objects then there is a relationship between the stack class (StackInt) and the Rational class (and between the Calculator class and the StackInt class).
Regards,
KelvinY