-
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.
Commitando Lista Proposta do T1 de POO.
- Loading branch information
Showing
41 changed files
with
315 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 @@ | ||
|
Binary file not shown.
Binary file not shown.
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,21 @@ | ||
package br.edu.principal; | ||
import java.util.Scanner; | ||
public class Principal { | ||
|
||
public static void main(String[] args) { | ||
|
||
System.out.println(" # Cálculo da subtração de dois números # "); | ||
|
||
Scanner sc = new Scanner (System.in); | ||
|
||
System.out.println ("\nDigite o primeiro número da operação (minuendo): "); | ||
double num1 = sc.nextDouble(); | ||
|
||
System.out.println ("\nDigite o segundo némero da operação (substraendo): "); | ||
double num2 = sc.nextDouble(); | ||
|
||
double resultado = num1 - num2; | ||
System.out.println("\nO resultado da subtraçãp de" + num1 + "por" + num2 + "é igual a: " + resultado ); | ||
} | ||
|
||
} |
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,9 @@ | ||
/** | ||
* | ||
*/ | ||
/** | ||
* @author User | ||
* | ||
*/ | ||
module q1_t1 { | ||
} |
Binary file not shown.
Binary file not shown.
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,25 @@ | ||
package br.edu.principal; | ||
|
||
import java.util.Scanner; | ||
|
||
public class Principal { | ||
|
||
public static void main(String[] args) { | ||
double number1, number2, number3, multi; | ||
Scanner sc = new Scanner(System.in); | ||
|
||
System.out.println("Digite o primeiro número: "); | ||
number1=sc.nextDouble(); | ||
|
||
System.out.println("Digite o segundo número: "); | ||
number2=sc.nextDouble(); | ||
|
||
System.out.println("Digite o terceiro número: "); | ||
number3=sc.nextDouble(); | ||
|
||
multi = number1 * number2 * number3; | ||
|
||
System.out.println("O resultado da multiplicação desses três números é "+multi); | ||
} | ||
|
||
} |
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,9 @@ | ||
/** | ||
* | ||
*/ | ||
/** | ||
* @author Dell | ||
* | ||
*/ | ||
module q2_t1 { | ||
} |
Binary file not shown.
Binary file not shown.
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,26 @@ | ||
package br.edu.principal; | ||
|
||
import java.util.Scanner; | ||
|
||
public class Principal { | ||
|
||
public static void main(String[] args) { | ||
|
||
System.out.println(" # Cálculo da divisão de dois números # "); | ||
|
||
Scanner sc = new Scanner (System.in); | ||
|
||
System.out.println ("\nDigite o primeiro número da operação (dividendo): "); | ||
double num1 = sc.nextDouble(); | ||
|
||
System.out.println ("\nDigite o segundo némero da operação (divisor): "); | ||
double num2 = sc.nextDouble(); | ||
|
||
double resultado = num1/num2; | ||
System.out.println("\nO resultado da divisão de " + num1 + " por " + num2 + " é igual a: " + resultado ); | ||
|
||
double resto = num1%num2; | ||
System.out.println("\nO resto da divisão de " + num1 + " por " + num2 + " é igual a: " + resto);*/ | ||
} | ||
|
||
} |
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,9 @@ | ||
/** | ||
* | ||
*/ | ||
/** | ||
* @author User | ||
* | ||
*/ | ||
module q3_t1 { | ||
} |
Binary file not shown.
Binary file not shown.
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,19 @@ | ||
package br.edu.principal; | ||
|
||
import java.util.Scanner; | ||
|
||
public class Principal { | ||
|
||
public static void main(String[] args) { | ||
double preço, preçoFinal; | ||
Scanner sc = new Scanner(System.in); | ||
|
||
System.out.println("Digite o preço do produto: "); | ||
preço=sc.nextDouble(); | ||
|
||
preçoFinal = preço - (preço * 10/100); | ||
|
||
System.out.println("O preço com o desconto de 10% fica "+preçoFinal+" reais."); | ||
} | ||
|
||
} |
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,9 @@ | ||
/** | ||
* | ||
*/ | ||
/** | ||
* @author Dell | ||
* | ||
*/ | ||
module q5_t1 { | ||
} |
Binary file not shown.
Binary file not shown.
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,20 @@ | ||
package br.edu.principal; | ||
|
||
import java.util.Scanner; | ||
|
||
public class Principal { | ||
|
||
public static void main(String[] args) { | ||
|
||
System.out.println(" # Conversão do peso de Kg para g # "); | ||
|
||
Scanner sc = new Scanner (System.in); | ||
|
||
System.out.println ("\nDigite seu peso em Kg (quilogramas): "); | ||
double pkg = sc.nextDouble(); | ||
|
||
double pg = pkg*1000; | ||
System.out.println("\nSeu peso em gramas é igual a: " + pg + "g"); | ||
} | ||
} | ||
|
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,9 @@ | ||
/** | ||
* | ||
*/ | ||
/** | ||
* @author User | ||
* | ||
*/ | ||
module q8_t1 { | ||
} |
Binary file not shown.
Binary file not shown.
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,25 @@ | ||
package br.edu.principal; | ||
|
||
import java.util.Scanner; | ||
|
||
public class Principal { | ||
|
||
public static void main(String[] args) { | ||
double baseMenor, baseMaior, altura, areaTrapezio; | ||
Scanner sc = new Scanner(System.in); | ||
|
||
System.out.println("Qual o valor da base menor? "); | ||
baseMenor=sc.nextDouble(); | ||
|
||
System.out.println("Qual o valor da base maior? "); | ||
baseMaior=sc.nextDouble(); | ||
|
||
System.out.println("Qual o valor da altura? "); | ||
altura=sc.nextDouble(); | ||
|
||
areaTrapezio = ((baseMaior + baseMenor) * altura)/2; | ||
|
||
System.out.println("A área desse trapézio vale "+areaTrapezio); | ||
} | ||
|
||
} |
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,9 @@ | ||
/** | ||
* | ||
*/ | ||
/** | ||
* @author Dell | ||
* | ||
*/ | ||
module q9_t1 { | ||
} |
Binary file not shown.
Binary file not shown.
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,23 @@ | ||
package br.edu.principal; | ||
|
||
import java.util.Scanner; | ||
|
||
public class Principal { | ||
|
||
public static void main(String[] args) { | ||
|
||
System.out.println(" # Cálculo da área de um losango # "); | ||
|
||
Scanner sc = new Scanner (System.in); | ||
|
||
System.out.println ("\nDigite a medida da maior diagonal do losango: "); | ||
double d_maior = sc.nextDouble(); | ||
|
||
System.out.println ("\nDigite a medida da menor diagonal do losango: "); | ||
double d_menor= sc.nextDouble(); | ||
|
||
double area = (d_maior * d_menor) / 2; | ||
System.out.println("\nA área desse losango é igual a " + area); | ||
} | ||
} | ||
|
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,9 @@ | ||
/** | ||
* | ||
*/ | ||
/** | ||
* @author User | ||
* | ||
*/ | ||
module q11_t1 { | ||
} |
Binary file not shown.
Binary file not shown.
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,22 @@ | ||
package br.edu.principal; | ||
|
||
import java.util.Scanner; | ||
|
||
public class Principal { | ||
|
||
public static void main(String[] args) { | ||
double salMinimo, salFuncionario, qntdSalario; | ||
Scanner sc = new Scanner(System.in); | ||
|
||
System.out.println("Quanto vale o salário mínimo? "); | ||
salMinimo=sc.nextDouble(); | ||
|
||
System.out.println("Quanto vale o salário do funcionário? "); | ||
salFuncionario=sc.nextDouble(); | ||
|
||
qntdSalario = salFuncionario / salMinimo; | ||
|
||
System.out.println("Esse funcionário ganha "+qntdSalario+" salários mínimos."); | ||
} | ||
|
||
} |
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,9 @@ | ||
/** | ||
* | ||
*/ | ||
/** | ||
* @author Dell | ||
* | ||
*/ | ||
module q12_t1 { | ||
} |
Binary file not shown.
Binary file not shown.
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,22 @@ | ||
package br.edu.principal; | ||
import java. util.Scanner; | ||
public class Principal { | ||
|
||
public static void main(String[] args) { | ||
double sal, conta1, conta2, RestoSal, SomaConta; | ||
Scanner sc = new Scanner(System.in); | ||
System.out.println("Digite o valor do seu salário mensal: "); | ||
sal = sc.nextDouble(); | ||
System.out.println("Digite o valor da primeira conta atrasada: "); | ||
conta1 = sc.nextDouble(); | ||
System.out.println("Digite o valor da segunda conta atrasada: "); | ||
conta2 = sc.nextDouble(); | ||
|
||
conta1 = conta1 + (conta1 * 0.02); | ||
conta2 = conta2 + (conta2 * 0.02); | ||
SomaConta = conta1 + conta2; | ||
RestoSal = sal - SomaConta; | ||
System.out.println("Valor que restará do salário: "+RestoSal); | ||
sc.close(); | ||
} | ||
} |
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,9 @@ | ||
/** | ||
* | ||
*/ | ||
/** | ||
* @author Dell | ||
* | ||
*/ | ||
module q15_t1 { | ||
} |
Binary file not shown.
Binary file not shown.
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,21 @@ | ||
package br.edu.principal; | ||
|
||
import java.util.Scanner; | ||
|
||
public class Principal { | ||
|
||
public static void main(String[] args) { | ||
double tempCel, tempFa; | ||
Scanner sc = new Scanner(System.in); | ||
|
||
System.out.println("Digite o valor da temperatura em Celcius: "); | ||
tempCel=sc.nextDouble(); | ||
|
||
tempFa=180 * (tempCel+32)/100; | ||
|
||
System.out.println("A temperatura em Fahrenheit fica "+tempFa); | ||
sc.close(); | ||
|
||
} | ||
|
||
} |
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,9 @@ | ||
/** | ||
* | ||
*/ | ||
/** | ||
* @author Dell | ||
* | ||
*/ | ||
module q18_t1 { | ||
} |