Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
26 changed files
with
276 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import java.awt.*; | ||
|
||
public interface Colecionavel { | ||
|
||
Image getImagem(); | ||
|
||
int getPosicao(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
public class ColecionavelFactory { | ||
|
||
public static Colecionavel create(String tipo, int posicao, String urlDaImagem) { | ||
|
||
switch (tipo.toLowerCase()) { | ||
case "figurinha": | ||
return new Figurinha(posicao, urlDaImagem); | ||
case "selo": | ||
return new Selo(posicao, urlDaImagem, 0); | ||
default: | ||
return null; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import java.awt.*; | ||
|
||
public class Selo implements Colecionavel { | ||
|
||
public Selo(int posicao, String urlDaImagem, float valorMonetario) { | ||
|
||
} | ||
|
||
@Override | ||
public Image getImagem() { | ||
return null; | ||
} | ||
|
||
@Override | ||
public int getPosicao() { | ||
return 0; | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
package exception; | ||
|
||
public class ItemEsgotadoException extends Exception { | ||
} |
2 changes: 2 additions & 0 deletions
2
LojaVirtual/src/Usuario.java → LojaVirtual/src/modelo/Usuario.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
package modelo; | ||
|
||
import java.util.Objects; | ||
|
||
public class Usuario { | ||
|
2 changes: 2 additions & 0 deletions
2
LojaVirtual/src/Brinquedo.java → ...Virtual/src/modelo/produto/Brinquedo.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
LojaVirtual/src/LivroOuBrinquedo.java → .../src/modelo/produto/LivroOuBrinquedo.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
package modelo.produto; | ||
|
||
import util.Vendavel; | ||
|
||
public interface LivroOuBrinquedo extends Vendavel { | ||
|
||
} |
6 changes: 6 additions & 0 deletions
6
LojaVirtual/src/Produto.java → LojaVirtual/src/modelo/produto/Produto.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
LojaVirtual/src/Servico.java → LojaVirtual/src/modelo/servico/Servico.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
package modelo.servico; | ||
|
||
import java.util.Date; | ||
|
||
public class Servico { | ||
|
5 changes: 5 additions & 0 deletions
5
LojaVirtual/src/ServicoEntregas.java → ...l/src/modelo/servico/ServicoEntregas.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
LojaVirtual/src/ServicoImpressao.java → .../src/modelo/servico/ServicoImpressao.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.