Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6566789
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T14:15:27+00:00 2026-05-25T14:15:27+00:00

I am designing a class diagram and I got a doubt: I have a

  • 0

I am designing a class diagram and I got a doubt:

I have a class which have several attributes referring to Java enums and other classes that will be mapped as DB catalogs.

For example, there is a class called BankAccount which has an attribute called type:BankAccountType (enum) and other which is bank:Bank (catalog class).

Is it recommendable to mark the association between classes or it can be obviated? If yes, should they be aggregated (a BankAccount HAS a bankAccountType) or simply associated?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T14:15:28+00:00Added an answer on May 25, 2026 at 2:15 pm

    Regardless of whether the attribute type is an enum, there are two ways to represent attributes in UML: as proper attributes, and as directed associations.

    The two ways of representing attributes in UML

    The two styles of attribute declarations are semantically equivalent: they mean exactly the same thing. In other words, which one you choose comes down to a matter of style.

    Using attributes makes for a simpler diagram, and in some tools is required in order for the attribute to be visible in the tree view of the model.

    Using directed associations means you must include the target type (the enum) in the diagram, which means you can see the literals. Of course, you can include it in the other case too, as I’ve done with An_Enum above.

    I don’t normally use aggregations or compositions for code-level modeling; I feel they’re better suited for describing more abstract relationships between classes (as in an information model) and conceptually they don’t really match anything in source code. Attributes do, possibly supplemented by “dependency” or “use” relationships to classes which are used as local variable types or whose methods are called.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I was designing a class and I realize that I've got several methods that
I am designing a class which comprises of objects of other classes, right now
I'm designing a class that has two dependencies. One of the dependency classes has
I have a c# question that im struggling with. I am designing a class
I'm working on a site, which will have several modules that either fully available
I have a Java class that looks like this: public class My_ABC { int
I have trouble when designing classes like this class C1 { public: void foo();
I am designing a class for log entries of my mail server. I have
I am currently designing a class library that will provide data to a web
Suppose I am designing a class that can handle any database technology to create

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.