-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain.java
More file actions
32 lines (23 loc) · 904 Bytes
/
Copy pathMain.java
File metadata and controls
32 lines (23 loc) · 904 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package com.paulosa.questao7;
import java.util.ArrayList;
import java.util.List;
public class Main {
public static void main(String[] args) {
Conjunto conjunto1 = new Conjunto();
conjunto1.adicionarElemento("arthur");
conjunto1.adicionarElemento("paulosa");
conjunto1.adicionarElemento("tuzin");
Conjunto conjunto2 = new Conjunto();
conjunto2.adicionarElemento("levi");
conjunto2.adicionarElemento("gordao");
conjunto2.adicionarElemento("tuzin");
Conjunto conjunto3 = conjunto1.uniao(conjunto2);
Conjunto conjunto4 = conjunto1.inter(conjunto2);
Conjunto conjunto5 = conjunto1.menos(conjunto2);
conjunto3.exibir();
System.out.println("----------");
conjunto4.exibir();
System.out.println("-----------");
conjunto5.exibir();
}
}