diff --git a/.idea/.gitignore b/.idea/.gitignore
new file mode 100644
index 00000000..26d33521
--- /dev/null
+++ b/.idea/.gitignore
@@ -0,0 +1,3 @@
+# Default ignored files
+/shelf/
+/workspace.xml
diff --git a/.idea/aprenda-kotlin-com-exemplos-lab.iml b/.idea/aprenda-kotlin-com-exemplos-lab.iml
new file mode 100644
index 00000000..f392c3c0
--- /dev/null
+++ b/.idea/aprenda-kotlin-com-exemplos-lab.iml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/jpa-buddy.xml b/.idea/jpa-buddy.xml
new file mode 100644
index 00000000..966d5f56
--- /dev/null
+++ b/.idea/jpa-buddy.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/kotlinc.xml b/.idea/kotlinc.xml
new file mode 100644
index 00000000..0dd4b354
--- /dev/null
+++ b/.idea/kotlinc.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/KotlinJavaRuntime.xml b/.idea/libraries/KotlinJavaRuntime.xml
new file mode 100644
index 00000000..b6883dbc
--- /dev/null
+++ b/.idea/libraries/KotlinJavaRuntime.xml
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
new file mode 100644
index 00000000..497a6efb
--- /dev/null
+++ b/.idea/misc.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
new file mode 100644
index 00000000..e52c8043
--- /dev/null
+++ b/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
index 00000000..35eb1ddf
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/desafio.kt b/desafio.kt
index f2ebe619..2e1c11af 100644
--- a/desafio.kt
+++ b/desafio.kt
@@ -1,21 +1,49 @@
+import java.util.function.Predicate
+import java.util.stream.Collectors
+
// [Template no Kotlin Playground](https://pl.kotl.in/WcteahpyN)
enum class Nivel { BASICO, INTERMEDIARIO, DIFICIL }
-class Usuario
+class Usuario (val name: String)
data class ConteudoEducacional(var nome: String, val duracao: Int = 60)
-data class Formacao(val nome: String, var conteudos: List) {
+data class Formacao(val nome: String, var conteudos: List, val nivel: Nivel) {
+
+ val inscritos: MutableList = mutableListOf()
+
+ fun matricular(vararg usuario: Usuario) {
+
+ for (user in usuario) {
+ inscritos.add(user)
+ }
+
+ }
+
+ override fun toString(): String {
+
+ val nomeDosConteudos = conteudos.map { c -> c.nome }.toList()
+
+ val estudantes = inscritos.map { u -> u.name }.toList()
+
+ return "Formacao: {\n" +
+ " Name: \"${nome}\",\n" +
+ " Conteudos: {\n" +
+ " ${nomeDosConteudos}\n" +
+ " }\n" +
+ " Nivel: \"${nivel}\"\n" +
+ " Inscritos: {\n" +
+ " ${estudantes}\n" +
+ " }"
- val inscritos = mutableListOf()
-
- fun matricular(usuario: Usuario) {
- TODO("Utilize o parâmetro $usuario para simular uma matrícula (usar a lista de $inscritos).")
}
}
fun main() {
- TODO("Analise as classes modeladas para este domínio de aplicação e pense em formas de evoluí-las.")
- TODO("Simule alguns cenários de teste. Para isso, crie alguns objetos usando as classes em questão.")
-}
+ val formacaoKotlin = Formacao("Formacao em kotlin", listOf(ConteudoEducacional("Algoritmos"), ConteudoEducacional("POO Kotlin")), Nivel.BASICO)
+
+ formacaoKotlin.matricular(Usuario("Eduardo"), Usuario("Cathiely"))
+
+ println(formacaoKotlin.toString())
+}
\ No newline at end of file
diff --git a/out/production/aprenda-kotlin-com-exemplos-lab/.idea/.gitignore b/out/production/aprenda-kotlin-com-exemplos-lab/.idea/.gitignore
new file mode 100644
index 00000000..26d33521
--- /dev/null
+++ b/out/production/aprenda-kotlin-com-exemplos-lab/.idea/.gitignore
@@ -0,0 +1,3 @@
+# Default ignored files
+/shelf/
+/workspace.xml
diff --git a/out/production/aprenda-kotlin-com-exemplos-lab/.idea/aprenda-kotlin-com-exemplos-lab.iml b/out/production/aprenda-kotlin-com-exemplos-lab/.idea/aprenda-kotlin-com-exemplos-lab.iml
new file mode 100644
index 00000000..f392c3c0
--- /dev/null
+++ b/out/production/aprenda-kotlin-com-exemplos-lab/.idea/aprenda-kotlin-com-exemplos-lab.iml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/out/production/aprenda-kotlin-com-exemplos-lab/.idea/jpa-buddy.xml b/out/production/aprenda-kotlin-com-exemplos-lab/.idea/jpa-buddy.xml
new file mode 100644
index 00000000..966d5f56
--- /dev/null
+++ b/out/production/aprenda-kotlin-com-exemplos-lab/.idea/jpa-buddy.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/out/production/aprenda-kotlin-com-exemplos-lab/.idea/kotlinc.xml b/out/production/aprenda-kotlin-com-exemplos-lab/.idea/kotlinc.xml
new file mode 100644
index 00000000..0dd4b354
--- /dev/null
+++ b/out/production/aprenda-kotlin-com-exemplos-lab/.idea/kotlinc.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/out/production/aprenda-kotlin-com-exemplos-lab/.idea/libraries/KotlinJavaRuntime.xml b/out/production/aprenda-kotlin-com-exemplos-lab/.idea/libraries/KotlinJavaRuntime.xml
new file mode 100644
index 00000000..b6883dbc
--- /dev/null
+++ b/out/production/aprenda-kotlin-com-exemplos-lab/.idea/libraries/KotlinJavaRuntime.xml
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/out/production/aprenda-kotlin-com-exemplos-lab/.idea/misc.xml b/out/production/aprenda-kotlin-com-exemplos-lab/.idea/misc.xml
new file mode 100644
index 00000000..497a6efb
--- /dev/null
+++ b/out/production/aprenda-kotlin-com-exemplos-lab/.idea/misc.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/out/production/aprenda-kotlin-com-exemplos-lab/.idea/modules.xml b/out/production/aprenda-kotlin-com-exemplos-lab/.idea/modules.xml
new file mode 100644
index 00000000..e52c8043
--- /dev/null
+++ b/out/production/aprenda-kotlin-com-exemplos-lab/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/out/production/aprenda-kotlin-com-exemplos-lab/.idea/vcs.xml b/out/production/aprenda-kotlin-com-exemplos-lab/.idea/vcs.xml
new file mode 100644
index 00000000..35eb1ddf
--- /dev/null
+++ b/out/production/aprenda-kotlin-com-exemplos-lab/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/out/production/aprenda-kotlin-com-exemplos-lab/ConteudoEducacional.class b/out/production/aprenda-kotlin-com-exemplos-lab/ConteudoEducacional.class
new file mode 100644
index 00000000..9e5596ee
Binary files /dev/null and b/out/production/aprenda-kotlin-com-exemplos-lab/ConteudoEducacional.class differ
diff --git a/out/production/aprenda-kotlin-com-exemplos-lab/DesafioKt.class b/out/production/aprenda-kotlin-com-exemplos-lab/DesafioKt.class
new file mode 100644
index 00000000..908fa2a3
Binary files /dev/null and b/out/production/aprenda-kotlin-com-exemplos-lab/DesafioKt.class differ
diff --git a/out/production/aprenda-kotlin-com-exemplos-lab/Formacao.class b/out/production/aprenda-kotlin-com-exemplos-lab/Formacao.class
new file mode 100644
index 00000000..ab615b73
Binary files /dev/null and b/out/production/aprenda-kotlin-com-exemplos-lab/Formacao.class differ
diff --git a/out/production/aprenda-kotlin-com-exemplos-lab/META-INF/aprenda-kotlin-com-exemplos-lab.kotlin_module b/out/production/aprenda-kotlin-com-exemplos-lab/META-INF/aprenda-kotlin-com-exemplos-lab.kotlin_module
new file mode 100644
index 00000000..dac889e0
Binary files /dev/null and b/out/production/aprenda-kotlin-com-exemplos-lab/META-INF/aprenda-kotlin-com-exemplos-lab.kotlin_module differ
diff --git a/out/production/aprenda-kotlin-com-exemplos-lab/Nivel.class b/out/production/aprenda-kotlin-com-exemplos-lab/Nivel.class
new file mode 100644
index 00000000..9d43d9c0
Binary files /dev/null and b/out/production/aprenda-kotlin-com-exemplos-lab/Nivel.class differ
diff --git a/out/production/aprenda-kotlin-com-exemplos-lab/README.md b/out/production/aprenda-kotlin-com-exemplos-lab/README.md
new file mode 100644
index 00000000..da5dfd34
--- /dev/null
+++ b/out/production/aprenda-kotlin-com-exemplos-lab/README.md
@@ -0,0 +1,10 @@
+# Aprenda Kotlin Com Exemplos: Desafio de Projeto (Lab)
+
+Desafio de Projeto criado para avaliação do conteúdo técnico explorado no repositório [aprenda-kotlin-com-exemplos](https://github.com/digitalinnovationone/aprenda-kotlin-com-exemplos). **Nesse contexto, iremos abstrair o seguinte domínio de aplicação:**
+
+**A [DIO](https://web.dio.me) possui `Formacoes` incríveis que têm como objetivo oferecer um conjunto de `ConteudosEducacionais` voltados para uma stack tecnológica específica, preparando profissionais de TI para o mercado de trabalho. `Formacoes` possuem algumas características importantes, como `nome`, `nivel` e seus respectivos `conteudosEducacionais`. Além disso, tais experiências educacionais têm um comportamento relevante ao nosso domínio, definido pela capacidade de `matricular` um ou mais `Alunos`.**
+
+
+```kotlin
+TODO("Crie uma solução em Koltin abstraindo esse domínio. O arquivo [desafio.kt] te ajudará 😉")
+```
diff --git a/out/production/aprenda-kotlin-com-exemplos-lab/Usuario.class b/out/production/aprenda-kotlin-com-exemplos-lab/Usuario.class
new file mode 100644
index 00000000..435dcdff
Binary files /dev/null and b/out/production/aprenda-kotlin-com-exemplos-lab/Usuario.class differ