-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
696eade
commit 039022a
Showing
36 changed files
with
1,798 additions
and
0 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,11 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<classpath> | ||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-18"> | ||
<attributes> | ||
<attribute name="module" value="true"/> | ||
</attributes> | ||
</classpathentry> | ||
<classpathentry kind="src" path="src"/> | ||
<classpathentry kind="lib" path="C:/Users/55799/Downloads/mysql-connector-j-8.1.0/mysql-connector-j-8.1.0.jar"/> | ||
<classpathentry kind="output" path="bin"/> | ||
</classpath> |
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,28 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<projectDescription> | ||
<name>the_discoverer_experience</name> | ||
<comment></comment> | ||
<projects> | ||
</projects> | ||
<buildSpec> | ||
<buildCommand> | ||
<name>org.eclipse.jdt.core.javabuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
</buildSpec> | ||
<natures> | ||
<nature>org.eclipse.jdt.core.javanature</nature> | ||
</natures> | ||
<filteredResources> | ||
<filter> | ||
<id>1697330209562</id> | ||
<name></name> | ||
<type>30</type> | ||
<matcher> | ||
<id>org.eclipse.core.resources.regexFilterMatcher</id> | ||
<arguments>node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments> | ||
</matcher> | ||
</filter> | ||
</filteredResources> | ||
</projectDescription> |
2 changes: 2 additions & 0 deletions
2
banco_de_dados/Java/the_discoverer_experience/.settings/org.eclipse.core.resources.prefs
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,2 @@ | ||
eclipse.preferences.version=1 | ||
encoding/<project>=UTF-8 |
14 changes: 14 additions & 0 deletions
14
banco_de_dados/Java/the_discoverer_experience/.settings/org.eclipse.jdt.core.prefs
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 @@ | ||
eclipse.preferences.version=1 | ||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled | ||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=18 | ||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve | ||
org.eclipse.jdt.core.compiler.compliance=18 | ||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate | ||
org.eclipse.jdt.core.compiler.debug.localVariable=generate | ||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate | ||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error | ||
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled | ||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error | ||
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning | ||
org.eclipse.jdt.core.compiler.release=enabled | ||
org.eclipse.jdt.core.compiler.source=18 |
Binary file added
BIN
+2.68 KB
banco_de_dados/Java/the_discoverer_experience/bin/aplicacao/Main.class
Binary file not shown.
Binary file added
BIN
+2.32 KB
banco_de_dados/Java/the_discoverer_experience/bin/aplicacao/MainDestino.class
Binary file not shown.
Binary file added
BIN
+2.31 KB
banco_de_dados/Java/the_discoverer_experience/bin/aplicacao/MainPacote.class
Binary file not shown.
Binary file added
BIN
+3.7 KB
banco_de_dados/Java/the_discoverer_experience/bin/aplicacao/MainReserva.class
Binary file not shown.
Binary file added
BIN
+1.94 KB
banco_de_dados/Java/the_discoverer_experience/bin/connection/ConnectionMySQL.class
Binary file not shown.
Binary file added
BIN
+4.96 KB
banco_de_dados/Java/the_discoverer_experience/bin/dao/DestinosDAO.class
Binary file not shown.
Binary file added
BIN
+4.88 KB
banco_de_dados/Java/the_discoverer_experience/bin/dao/PacotesDAO.class
Binary file not shown.
Binary file added
BIN
+7.05 KB
banco_de_dados/Java/the_discoverer_experience/bin/dao/ReservaDAO.class
Binary file not shown.
Binary file added
BIN
+5.34 KB
banco_de_dados/Java/the_discoverer_experience/bin/dao/UsuarioDAO.class
Binary file not shown.
Binary file added
BIN
+1.76 KB
banco_de_dados/Java/the_discoverer_experience/bin/model/Destinos.class
Binary file not shown.
Binary file added
BIN
+1.68 KB
banco_de_dados/Java/the_discoverer_experience/bin/model/Pacotes.class
Binary file not shown.
Binary file added
BIN
+3.23 KB
banco_de_dados/Java/the_discoverer_experience/bin/model/Reserva.class
Binary file not shown.
Binary file added
BIN
+2.64 KB
banco_de_dados/Java/the_discoverer_experience/bin/model/Usuario.class
Binary file not shown.
102 changes: 102 additions & 0 deletions
102
banco_de_dados/Java/the_discoverer_experience/src/aplicacao/Main.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 |
---|---|---|
@@ -0,0 +1,102 @@ | ||
package aplicacao; | ||
|
||
import java.util.Scanner; | ||
|
||
import dao.UsuarioDAO; | ||
import model.Usuario; | ||
|
||
public class Main { | ||
|
||
public static void main(String[] args) { | ||
|
||
Scanner s = new Scanner(System.in); | ||
UsuarioDAO usuarioDAO = new UsuarioDAO(); | ||
|
||
int opcao = 0, id = 0; | ||
|
||
String nome, email, senha, cpf, localizacao; | ||
|
||
|
||
do { | ||
|
||
System.out.println("\n============================== USUARIOS =================================\n"); | ||
System.out.println("1-CRIAR 2-CONSULTAR 3-ATUALIZAR 4-DELETAR 5-CONSULTAR POR ID 0-SAIR"); | ||
opcao = s.nextInt(); | ||
s.nextLine(); | ||
|
||
switch (opcao) { | ||
case 1: | ||
System.out.println("Digite a senha:"); | ||
senha = s.nextLine(); | ||
System.out.println("Digite o email:"); | ||
email = s.nextLine(); | ||
System.out.println("Digite o CPF:"); | ||
cpf = s.nextLine(); | ||
System.out.println("Digite o nome:"); | ||
nome = s.nextLine(); | ||
System.out.println("Digite a localização:"); | ||
localizacao = s.nextLine(); | ||
|
||
Usuario usuario1 = new Usuario(senha, email, cpf, nome, localizacao); | ||
|
||
usuarioDAO.create(usuario1); | ||
break; | ||
case 2: | ||
|
||
for (Usuario u : usuarioDAO.read()) { | ||
System.out.println(u.toString()); | ||
} | ||
|
||
break; | ||
case 3: | ||
|
||
System.out.println("Digite o id:"); | ||
id = s.nextInt(); | ||
s.nextLine(); | ||
System.out.println("Digite a senha:"); | ||
senha = s.nextLine(); | ||
System.out.println("Digite o email:"); | ||
email = s.nextLine(); | ||
System.out.println("Digite o CPF:"); | ||
cpf = s.nextLine(); | ||
System.out.println("Digite o nome:"); | ||
nome = s.nextLine(); | ||
System.out.println("Digite a localização:"); | ||
localizacao = s.nextLine(); | ||
|
||
|
||
Usuario usuario2 = new Usuario(id, senha, email, cpf, nome, localizacao); | ||
|
||
usuarioDAO.update(usuario2); | ||
break; | ||
case 4: | ||
System.out.println("Digite um id:"); | ||
id = s.nextInt(); | ||
s.nextLine(); | ||
|
||
usuarioDAO.delete(id); | ||
break; | ||
case 5: | ||
System.out.println("Digite um id:"); | ||
id = s.nextInt(); | ||
s.nextLine(); | ||
|
||
Usuario usuario3 = usuarioDAO.readById(id); | ||
|
||
System.out.println(usuario3.toString()); | ||
break; | ||
default: | ||
|
||
break; | ||
} | ||
|
||
} while (opcao != 0); | ||
|
||
System.out.println("Até mais!"); | ||
s.close(); | ||
|
||
} | ||
|
||
|
||
|
||
} |
85 changes: 85 additions & 0 deletions
85
banco_de_dados/Java/the_discoverer_experience/src/aplicacao/MainDestino.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 |
---|---|---|
@@ -0,0 +1,85 @@ | ||
package aplicacao; | ||
|
||
import java.util.Scanner; | ||
|
||
import dao.DestinosDAO; | ||
import model.Destinos; | ||
|
||
public class MainDestino { | ||
public static void main(String[] args) { | ||
|
||
Scanner s = new Scanner(System.in); | ||
DestinosDAO destinoDAO = new DestinosDAO(); | ||
|
||
int opcao = 0, id = 0; | ||
|
||
|
||
do { | ||
|
||
System.out.println("\n============================== DESTINOS =================================\n"); | ||
System.out.println("1-CRIAR 2-CONSULTAR 3-ATUALIZAR 4-DELETAR 5-CONSULTAR POR ID 0-SAIR"); | ||
opcao = s.nextInt(); | ||
s.nextLine(); | ||
|
||
switch (opcao) { | ||
case 1: | ||
System.out.println("Digite o seu destino:"); | ||
String nomeDestino = s.nextLine(); | ||
System.out.println("Digite a sua avaliação:"); | ||
int avaliacao = s.nextInt(); | ||
s.nextLine(); | ||
|
||
Destinos destino1 = new Destinos(nomeDestino, avaliacao); | ||
|
||
destinoDAO.create(destino1); | ||
break; | ||
case 2: | ||
|
||
for (Destinos d : destinoDAO.read()) { | ||
System.out.println(d.toString()); | ||
} | ||
|
||
break; | ||
case 3: | ||
|
||
System.out.println("Digite o id:"); | ||
id = s.nextInt(); | ||
s.nextLine(); | ||
System.out.println("Digite o seu destino:"); | ||
nomeDestino = s.nextLine(); | ||
System.out.println("Digite a sua avaliação:"); | ||
avaliacao = s.nextInt(); | ||
s.nextLine(); | ||
|
||
Destinos destino2 = new Destinos(id, nomeDestino, avaliacao); | ||
|
||
destinoDAO.update(destino2); | ||
break; | ||
case 4: | ||
System.out.println("Digite um id:"); | ||
id = s.nextInt(); | ||
s.nextLine(); | ||
|
||
destinoDAO.delete(id); | ||
break; | ||
case 5: | ||
System.out.println("Digite um id:"); | ||
id = s.nextInt(); | ||
s.nextLine(); | ||
|
||
Destinos destino3 = destinoDAO.readById(id); | ||
|
||
System.out.println(destino3.toString()); | ||
break; | ||
default: | ||
|
||
break; | ||
} | ||
|
||
} while (opcao != 0); | ||
|
||
System.out.println("Até mais!"); | ||
s.close(); | ||
|
||
} | ||
} |
88 changes: 88 additions & 0 deletions
88
banco_de_dados/Java/the_discoverer_experience/src/aplicacao/MainPacote.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 |
---|---|---|
@@ -0,0 +1,88 @@ | ||
package aplicacao; | ||
|
||
import java.util.Scanner; | ||
|
||
import dao.PacotesDAO; | ||
import model.Pacotes; | ||
|
||
public class MainPacote { | ||
public static void main(String[] args) { | ||
|
||
Scanner s = new Scanner(System.in); | ||
PacotesDAO pacoteDAO = new PacotesDAO(); | ||
|
||
int opcao = 0, id = 0; | ||
|
||
|
||
do { | ||
|
||
System.out.println("\n============================== PACOTES =================================\n"); | ||
System.out.println("1-CRIAR 2-CONSULTAR 3-ATUALIZAR 4-DELETAR 5-CONSULTAR POR ID 0-SAIR"); | ||
opcao = s.nextInt(); | ||
s.nextLine(); | ||
|
||
switch (opcao) { | ||
case 1: | ||
System.out.println("Digite o desconto do pacote:"); | ||
double descPacote = s.nextDouble(); | ||
s.nextLine(); | ||
System.out.println("Digite o valor do pacote:"); | ||
double valorPacote = s.nextDouble(); | ||
s.nextLine(); | ||
|
||
Pacotes pacote1 = new Pacotes(descPacote, valorPacote); | ||
|
||
pacoteDAO.create(pacote1); | ||
break; | ||
case 2: | ||
|
||
for (Pacotes p : pacoteDAO.read()) { | ||
System.out.println(p.toString()); | ||
} | ||
|
||
break; | ||
case 3: | ||
|
||
System.out.println("Digite o id:"); | ||
id = s.nextInt(); | ||
s.nextLine(); | ||
System.out.println("Digite o desconto do pacote:"); | ||
descPacote = s.nextDouble(); | ||
s.nextLine(); | ||
System.out.println("Digite o valor do pacote:"); | ||
valorPacote = s.nextDouble(); | ||
s.nextLine(); | ||
|
||
Pacotes pacote2 = new Pacotes(id, descPacote, valorPacote); | ||
|
||
pacoteDAO.update(pacote2); | ||
break; | ||
case 4: | ||
System.out.println("Digite um id:"); | ||
id = s.nextInt(); | ||
s.nextLine(); | ||
|
||
pacoteDAO.delete(id); | ||
break; | ||
case 5: | ||
System.out.println("Digite um id:"); | ||
id = s.nextInt(); | ||
s.nextLine(); | ||
|
||
Pacotes pacote3 = pacoteDAO.readById(id); | ||
|
||
System.out.println(pacote3.toString()); | ||
break; | ||
default: | ||
|
||
break; | ||
} | ||
|
||
} while (opcao != 0); | ||
|
||
System.out.println("Até mais!"); | ||
s.close(); | ||
|
||
} | ||
|
||
} |
Oops, something went wrong.