Last active
August 8, 2019 21:30
-
-
Save lukkaslt/487540567e33650cb6ba8d682523f9d1 to your computer and use it in GitHub Desktop.
Brasyu
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
class Dados{}; | |
class Executivo{}; | |
class Legislativo{}; | |
class Judiciario{}; | |
class Estado{}; | |
class DistritoFederal{}; | |
class Municipio{}; | |
class Presidente { | |
constructor(inicio_mandato) { | |
this.inicio_mandato = inicio_mandato; | |
} | |
registrarGabineteDeMinistros(gabinete) { | |
this.gabinete = gabinete; | |
} | |
registrarMinistro(ministro) { | |
this.gabinete.ministros.push(ministro); | |
} | |
get ministros() { | |
return this.gabinete.ministros | |
} | |
}; | |
class Ministro { | |
constructor(ministerio) { | |
this.ministerio = ministerio | |
} | |
}; | |
class Secretario {}; | |
class GabineteDeMinistros { | |
constructor() { | |
this.ministros = [] | |
} | |
}; | |
const Jair = new Presidente("01/01/2019"); | |
Jair.registrarGabineteDeMinistros(new GabineteDeMinistros()); | |
Jair.registrarMinistro(new Ministro("Educação")) | |
Jair.registrarMinistro(new Ministro("Economia")) | |
console.log(Jair.ministros) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment