This file contains hidden or 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 banco | |
| class Banco() { | |
| val taxaJuros: Double = 0.11 | |
| var contas: List[Conta] = Nil; | |
| var proximoNumero: Int = 1; | |
| def abrirContaEspecial(quantia: Double): Option[Conta] = { | |
| if (quantia > 0) { | |
| val c = new ContaEspecial(proximoNumero.toString, quantia, 500); |
This file contains hidden or 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
| var numero := leia_inteiro | |
| var r :="" | |
| enquanto numero>0 faca | |
| n = numero/2 | |
| resto = numero - n*2 | |
| r := r + resto.toString | |
| numero := n | |
| fim | |
| escreva r.inverta |
This file contains hidden or 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 br.edu.ifrn.calculadora; | |
| import org.antlr.v4.runtime.misc.NotNull; | |
| import org.antlr.v4.runtime.tree.ParseTree; | |
| import org.antlr.v4.runtime.tree.ParseTreeProperty; | |
| public class MinhaCalculadora extends CalculadoraBaseListener { | |
| ParseTreeProperty<Integer> values = new ParseTreeProperty<>(); | |
| public void setValue(ParseTree node, int value) { |
This file contains hidden or 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
| grammar Enquanto; | |
| programa : seqComando; // sequência de comandos | |
| seqComando: comando (';' comando)* ; | |
| comando: ID ':=' expressao # atribuicao | |
| | 'skip' # skip | |
| | 'se' bool 'entao' comando 'senao' comando # se | |
| | 'enquanto' bool 'faca' comando # enquanto |
This file contains hidden or 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
| Figurinhas Repetidas | |
| 1, 8, 13, 15, 21, 23, 27, 31, 39, 41, 46, 51, 54, 55, 60, 68, 72, 73, 75, 79, 80, 81, 82, 83, 84, 85, 87, 91, 95, 96, 97, 102, 104, 108, 110, 111, 113, 114, 116, 118, 124, 126, 127, 138, 143, 145, 148, 150, 151, 152, 153, 156, 158, 163, 178, 192, 193, 197, 200, 201, 207, 208, 210, 212, 213, 214, 216, 217, 226, 227, 230, 232, 233, 234, 237, 238, 245, 248, 250, 254, 265, 282, 284, 290, 296, 297, 312, 317, 320, 324, 350, 355, 358, 370, 374, 385, 387, 389, 392, 399, 404, 416, 417, 419, 421, 422, 427, 432, 446, 449, 450, 455, 456, 472, 481, 491, 493, 494, 496, 500, 505, 507, 509, 510, 511, 513, 523, 528, 529, 531, 539, 543, 546, 551, 574, 580, 584, 587, 588, 604, 605, 606, 621, 628, J2, L1 |
This file contains hidden or 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
| Figurinhas que faltam | |
| 3, 4, 5, 7, 17, 19, 122, 123, 129, 130, 136, 140, 141, 147, 171, 175, 189, 219, 258, 259, 262, 263, 264, 267, 270, 271, 280, 288, 302, 303, 305, 308, 318, 337, 342, 344, 346, 347, 360, 364, 365, 372, 383, 396, 414, 433, 439, 442, 443, 465, 467, 479, 485, 486, 506, 514, 515, 522, 524, 525, 547, 548, 549, 553, 564, 565, 566, 569, 570, 576, 582, 590, 591, 599, 608, 630, 631, 632, 639 |
This file contains hidden or 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 agenda2 | |
| class Contato(val nome: String, val telefone: String = "", | |
| val endereco: String = "", val eMail: String = "") | |
| object Teste { | |
| val joao = new Contato("Joao") | |
| val jose = new Contato("Jose", "99999-9999", "Rua do Bobo, 0", "[email protected]") | |
| } |
This file contains hidden or 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
| escreva "Jogo Maior - Menor" | |
| escreva "Eu escolhi um número entre 1 e 100. Tente adivinhar." | |
| jogo(numero, tentativas: Inteiro): Inteiro | |
| palpite = leia_inteiro | |
| se palpite < numero então | |
| escreva "O número é maior do que {palpite}" | |
| jogo(numero, tentativas + 1) | |
| senãose palpite > numero | |
| escreva "O número é menor do que {palpite}" |
This file contains hidden or 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
| escreva "Jogo Maior - Menor" | |
| numero = aleatório(1, 100) | |
| escreva "Eu escolhi um número entre 1 e 100. Tente adivinhar." | |
| var palpite := leia_inteiro | |
| enquanto palpite <> numero faça | |
| se palpite < numero então |
This file contains hidden or 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 br.edu.ifrn.linguagem; | |
| import org.antlr.v4.runtime.ParserRuleContext; | |
| import org.antlr.v4.runtime.misc.NotNull; | |
| import org.antlr.v4.runtime.tree.ParseTree; | |
| import org.antlr.v4.runtime.tree.ParseTreeProperty; | |
| import org.antlr.v4.runtime.tree.TerminalNode; | |
| public class MinhaLinguagem extends linguagemBaseListener { | |
| private final ParseTreeProperty<String> values = new ParseTreeProperty<String>(); |