import Sav.Processor.*;
class SetOperations {
public static void main(String args[]) throws Exception {
/** The fragment creates three concepts with string names in " " */
    Concept c1 = new Concept("Basic"),
    c2 = new Concept("C"),
    c3 = new Concept("C++");
/** Here is an example of constructing associations named in " " */
    Association a1 = new Association("Programming languages"),
    a2 = new Association("Object oriented languages"),
    a3 = new Association("Difficult languages"),
    a4 = new Association("Outmode languages");
/** The fragment fills associations by appropriate concepts */
    a1.set(c1).set(c2).set(c3).set("Java");
                            //a1 = {Basic, C, C++, Java}
    a2.set(c3).set("Java"); //a2 = {C++, Java}
    a3.set(c2).set(c3);     //a3 = {C, C++}
    a4.set(c1).set(c2);     //a4 = {Basic, C}
/** The program line selects a2 concepts from a1 */
    Association a = a1.get(a2);//a = {C++, Java}
/** The line includes a3 concepts in a4*/
    a4.set(a3);                //a4 = {Basic, C, C++};
/** The code line removes a4 concepts from a */
    a.clear(a4);               //a = {Java}

/** Control */
    Concept c;
    for (c = a.getFirst(); c != null; c = a.getNext()) {
        System.out.println(c);
    }
}//main()
}//SetOperations