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
package classes; | |
/** | |
* A classe Conta representa uma conta bancaria simples. | |
* | |
* @author Samuel Santos | |
* | |
*/ | |
public class Conta { |
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
package classes; | |
/** | |
* A classe Conta representa uma conta bancaria simples. | |
* | |
* @author Samuel Santos | |
* | |
*/ | |
public class Conta { |
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
/** | |
* Constroi uma Conta com o nome do titular, numero da conta e com um saldo inicial. | |
* | |
* @param titularDaConta Uma String com o nome de um titular. | |
* @param numeroDaConta int com o numero da conta. | |
* @param SaldoInicial Um double com um saldo para a conta. | |
*/ | |
public Conta (int numeroDaConta , double saldoInicial ) { | |
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
/** | |
* Mostra os dados de uma conta. | |
*/ | |
public String toString(){ | |
SimpleDateFormat formataData = new SimpleDateFormat("dd 'de' MMMM 'de' yyyy - HH:mm:ss"); | |
return " Data de Criação: " + formataData.format( getDataDeCriacao().getTime() ) + | |
" Numero: " + getNumero() + " Saldo: " + getSaldo(); | |
} |
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
algoritmo "variaveis" | |
// Função : declarar variaveis | |
// Autor : samuel t. c. santos | |
// Data : 16/04/2014 | |
// Seção de Declarações | |
var | |
numero: inteiro | |
vetNotas: vetor[1..10] de real | |
matriz : vetor[0..4,0..10] de inteiro | |
sinalizador : logico |
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
algoritmo "atribuicao" | |
// Função : atribuir variaveis para variaveis declaradas | |
// Autor : samuel t. c. santos | |
// Data : 16/04/2014 | |
// Seção de Declarações | |
var | |
numero: inteiro | |
vetNotas: vetor[1..10] de real | |
matriz : vetor[0..4,0..10] de inteiro | |
sinalizador : logico |
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
algoritmo "operadores" | |
// Função : operadores aritmeticos | |
// Autor : samuel t. c. santos | |
// Data : 16/04/2014 | |
// Seção de Declarações | |
var | |
a : inteiro | |
b : inteiro | |
c : inteiro | |
d : real |
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
''' | |
Created on 18/04/2014 | |
@author: Samuel T. C. Santos | |
Programa alô mundo em python. | |
''' | |
print("Olá, Mundo!") |
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
''' | |
Created on 18/04/2014 | |
@author: Samuel T. C. Santos | |
Como saber o tipo de uma variável em python. | |
''' | |
print type(4) | |
print type(3.445) |
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
''' | |
Created on 18/04/2014 | |
@author: Samuel T. C. Santos | |
Declarando variaves no python. | |
''' | |
#variaveis tipo string |
OlderNewer