Skip to content

Commit 2b7adaa

Browse files
committed
add adapter files
1 parent 34d2a9c commit 2b7adaa

File tree

2 files changed

+83
-0
lines changed

2 files changed

+83
-0
lines changed
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
package br.com.fag.adapter;
2+
3+
import java.util.ArrayList;
4+
5+
public class Enterprise {
6+
private String nome;
7+
private ArrayList<Filial> filiais;
8+
9+
public Enterprise() {
10+
}
11+
12+
public Enterprise(String nome, ArrayList<Filial> filiais) {
13+
this.nome = nome;
14+
this.filiais = filiais;
15+
}
16+
17+
18+
public String getNome() {
19+
return this.nome;
20+
}
21+
22+
public void setNome(String nome) {
23+
this.nome = nome;
24+
}
25+
26+
public ArrayList<Filial> getFiliais() {
27+
return this.filiais;
28+
}
29+
30+
public void setFiliais(ArrayList<Filial> filiais) {
31+
this.filiais = filiais;
32+
}
33+
34+
@Override
35+
public String toString() {
36+
return "{" +
37+
" nome='" + getNome() + "'" +
38+
", filiais='" + getFiliais() + "'" +
39+
"}";
40+
}
41+
42+
43+
}
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
package br.com.fag.adapter;
2+
3+
public class Filial {
4+
private String nome;
5+
private float vendaMensal;
6+
7+
8+
public Filial() {
9+
}
10+
11+
public Filial(String nome, float vendaMensal) {
12+
this.nome = nome;
13+
this.vendaMensal = vendaMensal;
14+
}
15+
16+
public String getNome() {
17+
return this.nome;
18+
}
19+
20+
public void setNome(String nome) {
21+
this.nome = nome;
22+
}
23+
24+
public float getVendaMensal() {
25+
return this.vendaMensal;
26+
}
27+
28+
public void setVendaMensal(float vendaMensal) {
29+
this.vendaMensal = vendaMensal;
30+
}
31+
32+
@Override
33+
public String toString() {
34+
return "{" +
35+
" nome='" + getNome() + "'" +
36+
", vendaMensal='" + getVendaMensal() + "'" +
37+
"}";
38+
}
39+
40+
}

0 commit comments

Comments
 (0)