AL07

mail@pastecode.io avatar
unknown
plain_text
2 years ago
1.6 kB
8
Indexable
Never
Mall:
pakett: ee.ttu.algoritmid.bond


AL07.java

package ee.ttu.algoritmid.bond;

public class AL07 {

    public enum Network {
        FRIENDLY, UNFRIENDLY, UNKNOWN;
    }

    private DisjointSubsets disjointSubsets = new DisjointSubsets();

    public AL07() {
        // don't remove
    }

    public DisjointSubsets getDisjointSubsets() {
        return disjointSubsets;
    }

    public void talkedToEachOther(String name1, String name2) {
        // TODO
    }

    public void addPerson(String name) {
        // TODO
    }

    public void friendly(String name) {
        // TODO
    }

    public void unfriendly(String name) {
        // TODO
    }

    public Network memberOfNetwork(String name) {
        // TODO
        return null;
    }

}

DisjointSubsets.java

package ee.ttu.algoritmid.bond;

public class DisjointSubsets {

    public String find(String element) throws IllegalArgumentException {
        // TODO
        // should throw IllegalArgumentException if the element is not present
        return null;
    }

    // should throw IllegalArgumentException if any of elements is not present
    public void union(String element1, String element2) throws IllegalArgumentException {
        // TODO
        // should throw IllegalArgumentException if any of elements is not present
    }

    public void addSubset(String element) throws IllegalArgumentException {
        // TODO
        // should throw IllegalArgumentException if the element is already present
    }

}