Solved

Rational Rose for J - aggregation

Posted on 2002-07-25
2
510 Views
Last Modified: 2012-08-13
I have two classes in Rose, which are connected with aggregation relationship.

When I generate Java code, local variable is generated in both classes, like they aggregate each other.

How can I change this behaviour to create one way aggregation? i.e. generate variable only in one class?
0
Comment
Question by:Sektor
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 

Accepted Solution

by:
dt19643 earned 50 total points
ID: 7177124
If you don't make the relationship an aggregation associates, just an association, you will see that the member variable to the class will only be defined in one class.  On the side of the arrow, you should be able to right click and assign the role name to define the attribute name as well as public or private access.  Regenerate the code, and it should perform as expected.
0
 

Author Comment

by:Sektor
ID: 7177161
I already found out that the Navigable checkbox is what makes the difference :).
I just had to uncheck it for the role, which I don't need to be generated.

But thanks anyway!
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:

724 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question