Results 1 to 6 of 6

Thread: BlueJ - UML

  1. #1
    Nghi97 is offline From Germany
    Join Date
    Nov 2011
    Location
    Germany, Hamburg
    Posts
    3
    Rep Power
    0

    Default BlueJ - UML

    Hey,

    I am a newbie in Java programming and started with Java in BlueJ.
    There is a UML diagram with arrows.
    What is the meaning of these arrows? I removed them, and the program is still working.

    How is it when I do not use BlueJ and have 2 different classes.
    How do I combine the 2 classes?

  2. #2
    Join Date
    Nov 2011
    Location
    Schijndel, Netherlands
    Posts
    12
    Rep Power
    0

    Default Re: BlueJ - UML

    Those arrows can mean several things, but in your case i guess it's the following:

    When there is a line pointed from class A to class B.
    BlueJ - UML-bluej8.png
    It means class A has a relationship with class B, what relationship this is, depends on what you've set.
    In this example the dotted line means: (someone correct me if I'm wrong):
    class A makes use of class B, or something what's inside class B

  3. #3
    Nghi97 is offline From Germany
    Join Date
    Nov 2011
    Location
    Germany, Hamburg
    Posts
    3
    Rep Power
    0

    Default Re: BlueJ - UML

    Hey,

    thank you for your answer.
    Is it only for overview purposes? Because it works without the arrows.
    If not, how do I let class A makes use of class B in another simple text-editor?

  4. #4
    Join Date
    Nov 2011
    Location
    Schijndel, Netherlands
    Posts
    12
    Rep Power
    0

    Default Re: BlueJ - UML

    It's been quite a long time since I used BlueJ, though what I recall is that you can safely delete these arrows and that it's only used for overview purposes indeed.
    You make classes use eachother inside your code.
    for example you have a class named Address.
    Inside this class you have some variables:
    public String streetName;
    public int houseNumber;
    public String postalCode;

    Now you have another class named Person.
    And you want to have some information about that person, for example you want to have it an Address.
    You can now do the following inside your Person class, you can declare a variable of the class Address:
    private Address personsAddress;

    You now make use of the class Address inside your class Person.
    My guess is also that BlueJ will now automatically create an arrow in your class diagram.
    This will also work in any other IDE for java.

    (sorry for the unillustrated/little example, I just hope this is clear enough for you)

  5. #5
    Nghi97 is offline From Germany
    Join Date
    Nov 2011
    Location
    Germany, Hamburg
    Posts
    3
    Rep Power
    0

    Default Re: BlueJ - UML

    Yes, I think it was very helpful, thank you :)
    So I do not have to import or declare somewhere else, that I want to use the class address?
    That fact is new, because I have programmed always in PHP.

  6. #6
    Join Date
    Nov 2011
    Location
    Schijndel, Netherlands
    Posts
    12
    Rep Power
    0

    Default Re: BlueJ - UML

    That depends if you are in the same package.
    If you have classes that exist in different packages (in .Net this is called namespace, for PHP i have no idea ;-) ) you'll have to import it.

Similar Threads

  1. Need help with blueJ
    By samd89 in forum Other IDEs
    Replies: 6
    Last Post: 12-06-2010, 05:59 PM
  2. Java BlueJ
    By miney in forum New To Java
    Replies: 4
    Last Post: 10-25-2010, 01:13 PM
  3. BlueJ help
    By Cid17 in forum New To Java
    Replies: 2
    Last Post: 06-29-2009, 08:38 PM
  4. help using BlueJ
    By zoe in forum New To Java
    Replies: 1
    Last Post: 08-07-2007, 07:07 AM
  5. BlueJ 2.2.0
    By JavaBean in forum Java Software
    Replies: 0
    Last Post: 07-07-2007, 03:28 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •