Eroxl's Notes
Package Relationship Diagram

A Package relationship diagram is a type of diagram that shows the structure and dependencies of different packages.

Example

Consider the following simplified code

Packages

UI

package ui;

import travellers.Nomad;

public class WinterWonderland {
    public static void main(String[] args) {
        Nomad nomad = new Nomad();
    }
}

Travellers

package travellers;

import places.FrostyForest;
import places.HuddledHill;

public class Nomad {
    private FrostyForest frostyForest;
    private HuddledHill huddledHill;
}
package travellers;

import places.ShiveringSea;

public class Tourist {
    private ShiveringSea shiveringSea;
}

Places

package places;

public class FrostyForest {}

<br />

package places;

public class ShiveringSea {}

package places;

public class HuddledHill {}

Diagram

The class WinterWonderland requires Nomad so there is an arrow connecting them, additionally, Nomad requires both FrostyForest and HuddledHill so they both have arrows and Tourist just requires ShiveringSea so it also has an arrow connecting it.