如何从UML转换为java。虚线关系

如何从UML转换为java。虚线关系,java,uml,Java,Uml,我试图将UML转换为java,但我不知道如何进行这种转换: 我参加了以下课程: public class Participant extends User { List<Competition> competitions; public Participant(String username, String password, String fullname) { super(username, password, fullname);

我试图将UML转换为java,但我不知道如何进行这种转换:

我参加了以下课程:

public class Participant extends User {

    List<Competition> competitions;

    public Participant(String username, String password, String fullname) {
        super(username, password, fullname);
    }

    public Submission submitPrediction(Competition competition, float prediction) {
        return null;
    }

    public ArrayList<Submission> getSumissions() {
        return null;
    }
}
但我不知道如何转换3个类之间的虚线关系


我怎样才能做到这一点?

这是一个关联类。这是一条捷径


另见

所以,如果我不理解错了,那就意味着(例如)在竞争中没有,比如:`私人组织者所有者;私人名单参与者;专用平台它“转换”成如下内容:
private-Organizer-owner;提交私人名单;专用平台
或我不删除
私人列表参与者我在两个类中都添加了关系(只是看提交竞争)。对不起,我的Java非常有限。我用一幅画代替了它。想象一下图表中缺少的属性/方法。还添加了角色名称。非常感谢!现在我完全明白了。我对角色的安排感到困惑。
public class Competition {

    private int id;
    private String title;
    private float target;
    private boolean isActive;

    private Organizer owner;
    private List<Participant> participants;
    private Platform platform;

    public Competition(int id, String title, float target, boolean isActive, Organizer owner, List<Participant> participants, Platform platform) {
        this.id = id;
        this.title = title;
        this.target = target;
        this.isActive = isActive;
        this.owner = owner;
        this.participants = participants;
        this.platform = platform;
    }
    .......... all methods, getters/setters, ectc............
}
public class Submission {
    private int id;
    private SubmissionStatus status;
    private Date submitedAt;
    private float prediction;
    private float error;

    public Submission(int id, SubmissionStatus status, Date submitedAt, float prediction, float error) {
        this.id = id;
        this.status = status;
        this.submitedAt = submitedAt;
        this.prediction = prediction;
        this.error = error;
    }
        .......... all methods, getters/setters, ectc............
}