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 8856517
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T14:22:27+00:00 2026-06-14T14:22:27+00:00

I have this UML Association class. Note that: horizontal line is a solid line

  • 0

I have this UML Association class. Note that: horizontal line is a solid line and the vertical line is a dashed line.

 ---------                  ---------
|         |*(a)        *(b)|         |
| CLASS   |________________|  CLASS  |
|STUDENT  |     |          |  COURSE |
 ---------      |           ---------
                |*(c)
          ______|______
         |             |
         |             |
         |  CLASS      |
         | TRANSCRIPT  |
         |_____________|

I understand this relationship but I have met some problems when implement this UML to code. I can implement relation between class Student and class Course to code. Here is my code:

class Student {
  Vector<Course> b;
}

class Course {
   Vector<Student> a;
}

But, at class Transcript, I don’t understand so much, how to use this class in code. Is it the property of both class Student and Course. So, if that’s true then the code will be:

class Student {
  Vector<Course> b;
  Vector<Transcript> c;
}

class Course {
  Vector<Student> a;
  Vector<Transcript> c;
}

Is it true? If this is wrong, please teach me how to implement this UML.

Thanks 🙂

  • 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-06-14T14:22:28+00:00Added an answer on June 14, 2026 at 2:22 pm

    First of all, don’t use Vector, as it’s an old class that shouldn’t be used anymore for more than 10 years. Use either a Set or a List.

    If the Transcript class contains information about the way a student attends a course (for example, the date of its subscription to the course), you could implement it like this:

    class Student {
        Set<Transcript> transcripts;
    }
    
    class Transcript {
        Student student;
        Course course;
        Date subscriptionDate;
    }
    
    class Course {
        Set<Transcript> transcripts;
    }
    

    That doesn’t prevent you from providing a method in Student that returns all his courses: 

    public Set<Course> getCourses() {
        Set<Course> result = new HashSet<Course>();
        for (Transcript transcript : transcripts) {
            result.add(transcript.getCourse());
        }
        return result;
    }
    

    If Transcript doesn’t contain any information, then it’s probably there to model how these classes would be mapped in database tables, where the only way to have a many-to-many association between two tables is to use a join table holding the IDs of the two associated tables.

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

Sidebar

Related Questions

I have a class in UML that looks like this (it's in German, but
I have read some UML class diagram. I see some UML design this way:
I have this form: <%= form_tag posts_path, :method => :get, :class => search_nav do
I have this class: Class B { private String D; private String E; }
Because I have a big project I must generate the UML for this. Writing
I'm making an UML class diagram and I don't know how to do this:
I have three packages in NetBeans 6.7 that i want to generate a UML
look the UML image. I've got a generic class called BinaryProblem, this one receives
I have created a complex UML class diagram in my VS2010 IDE. I am
I have watched this keynote that talk about develop an app based on an

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.