[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Rational Rose for J - aggregation

Posted on 2002-07-25
2
Medium Priority
?
525 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 150 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

Enroll in October's Free Course of the Month

Do you work with and analyze data? Enroll in October's Course of the Month for 7+ hours of SQL training, allowing you to quickly and efficiently store or retrieve data. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
Suggested Courses

649 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