Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Desafio sintaxe lucas #66

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions .idea/trilha-java-basico.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

124 changes: 124 additions & 0 deletions .idea/uiDesigner.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions codigo-fonte/codigo-fonte.iml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/tipos-variaveis/src" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
11 changes: 11 additions & 0 deletions desafios/desafios.iml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/controle-fluxo" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
33 changes: 33 additions & 0 deletions desafios/sintaxe/BancoTerminal.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@

import java.util.Scanner;

public class BancoTerminal {

public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int numero = 0;
String agencia = new String("");
String nomeCliente = new String("");
double saldo = 0;
try{
System.out.println("Informe seu nome:");
nomeCliente = scan.nextLine();
System.out.println("Informe sua agência:");
agencia = scan.nextLine();
System.out.println("Informe o numero da conta:");
numero = scan.nextInt();
System.out.println("Informe o saldo da conta:");
saldo = scan.nextDouble();


System.out.println("Olá "+nomeCliente+", obrigado por criar uma conta em nosso banco, sua agencia é "+agencia+", conta "+numero+" e seu saldo "+saldo+" já está disponível para saque");

}catch (Exception e){

}


scan.close();
System.exit(0);
}
}
2 changes: 1 addition & 1 deletion desafios/sintaxe/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ www.dio.me
Vamos exercitar todo o conteúdo apresentado no módulo de Sintaxe codificando o seguinte cenário.

1. Crie o projeto `ContaBanco` que receberá dados via terminal contendo as características de conta em banco conforme atributos abaixo:
2. Dentro do projeto, crie a classe `ContaTerminal.java` para realizar toda a codificação do nosso programa.
2. Dentro do projeto, crie a classe `BancoTerminal.java` para realizar toda a codificação do nosso programa.

###### Revise sobre regras de declaração de variáveis

Expand Down
25 changes: 25 additions & 0 deletions exercicios/banco-terminal/BancoTerminal.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import java.util.Scanner;

public class BancoTerminal {

public static void main(String[] args){
Scanner scan = new Scanner(System.in);
int numero = 0;
String agencia = new String("");
String nomeCliente = new String("");
double valorSolicitado = 18;
double saldo = 25;

System.out.println("Informe seu nome:");
nomeCliente = scan.nextLine();
System.out.println("Informe sua agência:");
agencia = scan.nextLine();
System.out.println("Informe o numero da conta:");
numero = scan.nextInt();
System.out.println("Informe o saldo da conta:");
saldo = scan.nextDouble();


System.out.println("Olá "+nomeCliente+", obrigado por criar uma conta em nosso banco, sua agencia é "+agencia+", conta "+numero+" e seu saldo "+saldo+" já está disponível para saque");
}
}
11 changes: 11 additions & 0 deletions exercicios/exercicios.iml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/banco-terminal" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>