From 3ec83e61a45744a40cfc574db20d35de5860c9d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Santanch=C3=A8?= Date: Tue, 16 Jun 2020 14:50:34 -0300 Subject: [PATCH] feat (jupyter / lab): exception lab --- notebooks/pt/{c02oo => c02oo-java}/README.md | 0 .../s01basico/classe-objeto-basico.ipynb | 0 .../s01basico/emprestimo-oo-java-class.ipynb | 0 ...ntacao-objetos-exercicio-financiamento.png | Bin .../s02acoisa/s01lab/acoisa-01-basico.ipynb | 0 .../s02lab/s02acoisa/s01lab/lab-a-coisa.pdf | Bin .../s02lab/s02acoisa/s01lab/lab-a-coisa.png | Bin .../s01resposta/acoisa-01-basico.ipynb | 0 .../s02acoisa/s01resposta/lab-a-coisa.pdf | Bin .../s02acoisa/s01resposta/lab-a-coisa.png | Bin .../s01exercicios/garoto-zumbi-01.png | Bin .../s01exercicios/garoto-zumbi-02.png | Bin .../s01exercicios/garoto-zumbi-03.png | Bin .../s01exercicios/zombie-health-01.ipynb | 0 .../zombie-health-02-garoto.ipynb | 0 .../zombie-health-03-garoto-plus.ipynb | 0 .../s02zombie/s01exercicios/zombie-health.png | Bin .../s02resolucoes/garoto-zumbi-01.png | Bin .../s02resolucoes/garoto-zumbi-02.png | Bin .../s02resolucoes/garoto-zumbi-03.png | Bin .../s02resolucoes/zombie-health-01.ipynb | 0 .../zombie-health-02-garoto.ipynb | 0 .../zombie-health-03-garoto-plus.ipynb | 0 .../s02zombie/s02resolucoes/zombie-health.png | Bin .../zombie-health-04-heranca.ipynb | 0 .../zombie-health-04-heranca.ipynb | 0 .../relacionamento1-classe-objeto.ipynb | 0 .../relacionamento2-agregacao.ipynb | 0 .../relacionamento2-agregacao.ipynb | 0 .../relacionamento3-small-challenges.ipynb | 0 .../relacionamento3b-small-challenges.ipynb | 0 .../relacionamento4-small-challenges.ipynb | 0 .../s04lab/acoisa-02-relacionamento.ipynb | 0 .../s04lab/lab-a-coisa-relacionamento.pdf | Bin .../s04lab/lab-a-coisa-relacionamento.png | Bin .../s05estatico/s01tarefa/estatica-chat.ipynb | 0 .../s01tarefa/exercicio-singleton.ipynb | 0 .../s02resolucao/exercicio-singleton.ipynb | 0 .../s01tarefa/encapsulamento-circulo.ipynb | 0 .../s01aula-tarefa/heranca-lista.ipynb | 0 .../s01acoisa/s01lab/acoisa-03-heranca.ipynb | 0 .../s08lab/s01acoisa/s01lab/lab-a-coisa.pdf | Bin .../s08lab/s01acoisa/s01lab/lab-a-coisa.png | Bin .../s01resposta/acoisa-03-heranca.ipynb | 0 .../s01acoisa/s01resposta/lab-a-coisa.pdf | Bin .../s01acoisa/s01resposta/lab-a-coisa.png | Bin .../s01aula-tarefa/classe-circulo.png | Bin .../s01aula-tarefa/sobrecarga-horario.ipynb | 0 .../polimorfismo-emprestimo.ipynb | 0 .../polimorfismo-emprestimo2.ipynb | 0 .../s01aula-tarefa/polimorfismo-pessoa.ipynb | 0 .../polimorfismo-poligono.ipynb | 0 .../s01aula-tarefa/polimorfismo-zumbi.ipynb | 0 .../s02resolucoes/polimorfismo-java.ipynb | 0 .../s01tarefa/small-challenges-01.ipynb | 0 .../s01tarefa/small-challenges-02.ipynb | 0 .../s02resolucao/small-challenges-02.ipynb | 0 .../s01aula-tarefa/abstrata-poligono.ipynb | 0 .../s02resolucoes/abstrata-java.ipynb | 0 .../s02resolucoes/abstrata-poligono.ipynb | 0 .../s11abstrata/s03lab/abstrata-tiam.ipynb | 0 .../s11abstrata/s03lab/tiam-parte1.png | Bin .../s11abstrata/s03lab/tiam-parte2.png | Bin .../s11abstrata/s03lab/tim.png | Bin .../s01aula-tarefa/interface-poligono.ipynb | 0 .../s02resolucoes/interface-java.ipynb | 0 .../s14exception/excecoes-jogo.ipynb | 267 ++++++++++++++++++ .../s14exception/exception-hierarchy.png | Bin 0 -> 10074 bytes 68 files changed, 267 insertions(+) rename notebooks/pt/{c02oo => c02oo-java}/README.md (100%) rename notebooks/pt/{c02oo => c02oo-java}/s01basico/classe-objeto-basico.ipynb (100%) rename notebooks/pt/{c02oo => c02oo-java}/s01basico/emprestimo-oo-java-class.ipynb (100%) rename notebooks/pt/{c02oo => c02oo-java}/s01basico/poo01-orientacao-objetos-exercicio-financiamento.png (100%) rename notebooks/pt/{c02oo => c02oo-java}/s02lab/s02acoisa/s01lab/acoisa-01-basico.ipynb (100%) rename notebooks/pt/{c02oo => c02oo-java}/s02lab/s02acoisa/s01lab/lab-a-coisa.pdf (100%) rename notebooks/pt/{c02oo => c02oo-java}/s02lab/s02acoisa/s01lab/lab-a-coisa.png (100%) rename notebooks/pt/{c02oo => c02oo-java}/s02lab/s02acoisa/s01resposta/acoisa-01-basico.ipynb (100%) rename notebooks/pt/{c02oo => c02oo-java}/s02lab/s02acoisa/s01resposta/lab-a-coisa.pdf (100%) rename notebooks/pt/{c02oo => c02oo-java}/s02lab/s02acoisa/s01resposta/lab-a-coisa.png (100%) rename notebooks/pt/{c02oo => c02oo-java}/s02lab/s02zombie/s01exercicios/garoto-zumbi-01.png (100%) rename notebooks/pt/{c02oo => c02oo-java}/s02lab/s02zombie/s01exercicios/garoto-zumbi-02.png (100%) rename notebooks/pt/{c02oo => c02oo-java}/s02lab/s02zombie/s01exercicios/garoto-zumbi-03.png (100%) rename notebooks/pt/{c02oo => c02oo-java}/s02lab/s02zombie/s01exercicios/zombie-health-01.ipynb (100%) rename notebooks/pt/{c02oo => c02oo-java}/s02lab/s02zombie/s01exercicios/zombie-health-02-garoto.ipynb (100%) rename notebooks/pt/{c02oo => c02oo-java}/s02lab/s02zombie/s01exercicios/zombie-health-03-garoto-plus.ipynb (100%) rename notebooks/pt/{c02oo => c02oo-java}/s02lab/s02zombie/s01exercicios/zombie-health.png (100%) rename notebooks/pt/{c02oo => c02oo-java}/s02lab/s02zombie/s02resolucoes/garoto-zumbi-01.png (100%) rename notebooks/pt/{c02oo => c02oo-java}/s02lab/s02zombie/s02resolucoes/garoto-zumbi-02.png (100%) rename notebooks/pt/{c02oo => c02oo-java}/s02lab/s02zombie/s02resolucoes/garoto-zumbi-03.png (100%) rename notebooks/pt/{c02oo => c02oo-java}/s02lab/s02zombie/s02resolucoes/zombie-health-01.ipynb (100%) rename notebooks/pt/{c02oo => c02oo-java}/s02lab/s02zombie/s02resolucoes/zombie-health-02-garoto.ipynb (100%) rename notebooks/pt/{c02oo => c02oo-java}/s02lab/s02zombie/s02resolucoes/zombie-health-03-garoto-plus.ipynb (100%) rename notebooks/pt/{c02oo => c02oo-java}/s02lab/s02zombie/s02resolucoes/zombie-health.png (100%) rename notebooks/pt/{c02oo => c02oo-java}/s02lab/s03zombies/s01exercicios/zombie-health-04-heranca.ipynb (100%) rename notebooks/pt/{c02oo => c02oo-java}/s02lab/s03zombies/s02resolucoes/zombie-health-04-heranca.ipynb (100%) rename notebooks/pt/{c02oo => c02oo-java}/s03relacionamento/s01aula-tarefa/relacionamento1-classe-objeto.ipynb (100%) rename notebooks/pt/{c02oo => c02oo-java}/s03relacionamento/s01aula-tarefa/relacionamento2-agregacao.ipynb (100%) rename notebooks/pt/{c02oo => c02oo-java}/s03relacionamento/s02resolucao/relacionamento2-agregacao.ipynb (100%) rename notebooks/pt/{c02oo => c02oo-java}/s03relacionamento/s03-small-challenges/relacionamento3-small-challenges.ipynb (100%) rename notebooks/pt/{c02oo => c02oo-java}/s03relacionamento/s03-small-challenges/relacionamento3b-small-challenges.ipynb (100%) rename notebooks/pt/{c02oo => c02oo-java}/s03relacionamento/s03-small-challenges/relacionamento4-small-challenges.ipynb (100%) rename notebooks/pt/{c02oo => c02oo-java}/s04lab/acoisa-02-relacionamento.ipynb (100%) rename notebooks/pt/{c02oo => c02oo-java}/s04lab/lab-a-coisa-relacionamento.pdf (100%) rename notebooks/pt/{c02oo => c02oo-java}/s04lab/lab-a-coisa-relacionamento.png (100%) rename notebooks/pt/{c02oo => c02oo-java}/s05estatico/s01tarefa/estatica-chat.ipynb (100%) rename notebooks/pt/{c02oo => c02oo-java}/s05estatico/s01tarefa/exercicio-singleton.ipynb (100%) rename notebooks/pt/{c02oo => c02oo-java}/s05estatico/s02resolucao/exercicio-singleton.ipynb (100%) rename notebooks/pt/{c02oo => c02oo-java}/s06encapsulamento/s01tarefa/encapsulamento-circulo.ipynb (100%) rename notebooks/pt/{c02oo => c02oo-java}/s07heranca/s01aula-tarefa/heranca-lista.ipynb (100%) rename notebooks/pt/{c02oo => c02oo-java}/s08lab/s01acoisa/s01lab/acoisa-03-heranca.ipynb (100%) rename notebooks/pt/{c02oo => c02oo-java}/s08lab/s01acoisa/s01lab/lab-a-coisa.pdf (100%) rename notebooks/pt/{c02oo => c02oo-java}/s08lab/s01acoisa/s01lab/lab-a-coisa.png (100%) rename notebooks/pt/{c02oo => c02oo-java}/s08lab/s01acoisa/s01resposta/acoisa-03-heranca.ipynb (100%) rename notebooks/pt/{c02oo => c02oo-java}/s08lab/s01acoisa/s01resposta/lab-a-coisa.pdf (100%) rename notebooks/pt/{c02oo => c02oo-java}/s08lab/s01acoisa/s01resposta/lab-a-coisa.png (100%) rename notebooks/pt/{c02oo => c02oo-java}/s09sobrecarga/s01aula-tarefa/classe-circulo.png (100%) rename notebooks/pt/{c02oo => c02oo-java}/s09sobrecarga/s01aula-tarefa/sobrecarga-horario.ipynb (100%) rename notebooks/pt/{c02oo => c02oo-java}/s10polimorfismo/s01aula-tarefa/polimorfismo-emprestimo.ipynb (100%) rename notebooks/pt/{c02oo => c02oo-java}/s10polimorfismo/s01aula-tarefa/polimorfismo-emprestimo2.ipynb (100%) rename notebooks/pt/{c02oo => c02oo-java}/s10polimorfismo/s01aula-tarefa/polimorfismo-pessoa.ipynb (100%) rename notebooks/pt/{c02oo => c02oo-java}/s10polimorfismo/s01aula-tarefa/polimorfismo-poligono.ipynb (100%) rename notebooks/pt/{c02oo => c02oo-java}/s10polimorfismo/s01aula-tarefa/polimorfismo-zumbi.ipynb (100%) rename notebooks/pt/{c02oo => c02oo-java}/s10polimorfismo/s02resolucoes/polimorfismo-java.ipynb (100%) rename notebooks/pt/{c02oo => c02oo-java}/s10small-challenges/s01tarefa/small-challenges-01.ipynb (100%) rename notebooks/pt/{c02oo => c02oo-java}/s10small-challenges/s01tarefa/small-challenges-02.ipynb (100%) rename notebooks/pt/{c02oo => c02oo-java}/s10small-challenges/s02resolucao/small-challenges-02.ipynb (100%) rename notebooks/pt/{c02oo => c02oo-java}/s11abstrata/s01aula-tarefa/abstrata-poligono.ipynb (100%) rename notebooks/pt/{c02oo => c02oo-java}/s11abstrata/s02resolucoes/abstrata-java.ipynb (100%) rename notebooks/pt/{c02oo => c02oo-java}/s11abstrata/s02resolucoes/abstrata-poligono.ipynb (100%) rename notebooks/pt/{c02oo => c02oo-java}/s11abstrata/s03lab/abstrata-tiam.ipynb (100%) rename notebooks/pt/{c02oo => c02oo-java}/s11abstrata/s03lab/tiam-parte1.png (100%) rename notebooks/pt/{c02oo => c02oo-java}/s11abstrata/s03lab/tiam-parte2.png (100%) rename notebooks/pt/{c02oo => c02oo-java}/s11abstrata/s03lab/tim.png (100%) rename notebooks/pt/{c02oo => c02oo-java}/s12interface/s01aula-tarefa/interface-poligono.ipynb (100%) rename notebooks/pt/{c02oo => c02oo-java}/s12interface/s02resolucoes/interface-java.ipynb (100%) create mode 100644 notebooks/pt/c02oo-java/s14exception/excecoes-jogo.ipynb create mode 100644 notebooks/pt/c02oo-java/s14exception/exception-hierarchy.png diff --git a/notebooks/pt/c02oo/README.md b/notebooks/pt/c02oo-java/README.md similarity index 100% rename from notebooks/pt/c02oo/README.md rename to notebooks/pt/c02oo-java/README.md diff --git a/notebooks/pt/c02oo/s01basico/classe-objeto-basico.ipynb b/notebooks/pt/c02oo-java/s01basico/classe-objeto-basico.ipynb similarity index 100% rename from notebooks/pt/c02oo/s01basico/classe-objeto-basico.ipynb rename to notebooks/pt/c02oo-java/s01basico/classe-objeto-basico.ipynb diff --git a/notebooks/pt/c02oo/s01basico/emprestimo-oo-java-class.ipynb b/notebooks/pt/c02oo-java/s01basico/emprestimo-oo-java-class.ipynb similarity index 100% rename from notebooks/pt/c02oo/s01basico/emprestimo-oo-java-class.ipynb rename to notebooks/pt/c02oo-java/s01basico/emprestimo-oo-java-class.ipynb diff --git a/notebooks/pt/c02oo/s01basico/poo01-orientacao-objetos-exercicio-financiamento.png b/notebooks/pt/c02oo-java/s01basico/poo01-orientacao-objetos-exercicio-financiamento.png similarity index 100% rename from notebooks/pt/c02oo/s01basico/poo01-orientacao-objetos-exercicio-financiamento.png rename to notebooks/pt/c02oo-java/s01basico/poo01-orientacao-objetos-exercicio-financiamento.png diff --git a/notebooks/pt/c02oo/s02lab/s02acoisa/s01lab/acoisa-01-basico.ipynb b/notebooks/pt/c02oo-java/s02lab/s02acoisa/s01lab/acoisa-01-basico.ipynb similarity index 100% rename from notebooks/pt/c02oo/s02lab/s02acoisa/s01lab/acoisa-01-basico.ipynb rename to notebooks/pt/c02oo-java/s02lab/s02acoisa/s01lab/acoisa-01-basico.ipynb diff --git a/notebooks/pt/c02oo/s02lab/s02acoisa/s01lab/lab-a-coisa.pdf b/notebooks/pt/c02oo-java/s02lab/s02acoisa/s01lab/lab-a-coisa.pdf similarity index 100% rename from notebooks/pt/c02oo/s02lab/s02acoisa/s01lab/lab-a-coisa.pdf rename to notebooks/pt/c02oo-java/s02lab/s02acoisa/s01lab/lab-a-coisa.pdf diff --git a/notebooks/pt/c02oo/s02lab/s02acoisa/s01lab/lab-a-coisa.png b/notebooks/pt/c02oo-java/s02lab/s02acoisa/s01lab/lab-a-coisa.png similarity index 100% rename from notebooks/pt/c02oo/s02lab/s02acoisa/s01lab/lab-a-coisa.png rename to notebooks/pt/c02oo-java/s02lab/s02acoisa/s01lab/lab-a-coisa.png diff --git a/notebooks/pt/c02oo/s02lab/s02acoisa/s01resposta/acoisa-01-basico.ipynb b/notebooks/pt/c02oo-java/s02lab/s02acoisa/s01resposta/acoisa-01-basico.ipynb similarity index 100% rename from notebooks/pt/c02oo/s02lab/s02acoisa/s01resposta/acoisa-01-basico.ipynb rename to notebooks/pt/c02oo-java/s02lab/s02acoisa/s01resposta/acoisa-01-basico.ipynb diff --git a/notebooks/pt/c02oo/s02lab/s02acoisa/s01resposta/lab-a-coisa.pdf b/notebooks/pt/c02oo-java/s02lab/s02acoisa/s01resposta/lab-a-coisa.pdf similarity index 100% rename from notebooks/pt/c02oo/s02lab/s02acoisa/s01resposta/lab-a-coisa.pdf rename to notebooks/pt/c02oo-java/s02lab/s02acoisa/s01resposta/lab-a-coisa.pdf diff --git a/notebooks/pt/c02oo/s02lab/s02acoisa/s01resposta/lab-a-coisa.png b/notebooks/pt/c02oo-java/s02lab/s02acoisa/s01resposta/lab-a-coisa.png similarity index 100% rename from notebooks/pt/c02oo/s02lab/s02acoisa/s01resposta/lab-a-coisa.png rename to notebooks/pt/c02oo-java/s02lab/s02acoisa/s01resposta/lab-a-coisa.png diff --git a/notebooks/pt/c02oo/s02lab/s02zombie/s01exercicios/garoto-zumbi-01.png b/notebooks/pt/c02oo-java/s02lab/s02zombie/s01exercicios/garoto-zumbi-01.png similarity index 100% rename from notebooks/pt/c02oo/s02lab/s02zombie/s01exercicios/garoto-zumbi-01.png rename to notebooks/pt/c02oo-java/s02lab/s02zombie/s01exercicios/garoto-zumbi-01.png diff --git a/notebooks/pt/c02oo/s02lab/s02zombie/s01exercicios/garoto-zumbi-02.png b/notebooks/pt/c02oo-java/s02lab/s02zombie/s01exercicios/garoto-zumbi-02.png similarity index 100% rename from notebooks/pt/c02oo/s02lab/s02zombie/s01exercicios/garoto-zumbi-02.png rename to notebooks/pt/c02oo-java/s02lab/s02zombie/s01exercicios/garoto-zumbi-02.png diff --git a/notebooks/pt/c02oo/s02lab/s02zombie/s01exercicios/garoto-zumbi-03.png b/notebooks/pt/c02oo-java/s02lab/s02zombie/s01exercicios/garoto-zumbi-03.png similarity index 100% rename from notebooks/pt/c02oo/s02lab/s02zombie/s01exercicios/garoto-zumbi-03.png rename to notebooks/pt/c02oo-java/s02lab/s02zombie/s01exercicios/garoto-zumbi-03.png diff --git a/notebooks/pt/c02oo/s02lab/s02zombie/s01exercicios/zombie-health-01.ipynb b/notebooks/pt/c02oo-java/s02lab/s02zombie/s01exercicios/zombie-health-01.ipynb similarity index 100% rename from notebooks/pt/c02oo/s02lab/s02zombie/s01exercicios/zombie-health-01.ipynb rename to notebooks/pt/c02oo-java/s02lab/s02zombie/s01exercicios/zombie-health-01.ipynb diff --git a/notebooks/pt/c02oo/s02lab/s02zombie/s01exercicios/zombie-health-02-garoto.ipynb b/notebooks/pt/c02oo-java/s02lab/s02zombie/s01exercicios/zombie-health-02-garoto.ipynb similarity index 100% rename from notebooks/pt/c02oo/s02lab/s02zombie/s01exercicios/zombie-health-02-garoto.ipynb rename to notebooks/pt/c02oo-java/s02lab/s02zombie/s01exercicios/zombie-health-02-garoto.ipynb diff --git a/notebooks/pt/c02oo/s02lab/s02zombie/s01exercicios/zombie-health-03-garoto-plus.ipynb b/notebooks/pt/c02oo-java/s02lab/s02zombie/s01exercicios/zombie-health-03-garoto-plus.ipynb similarity index 100% rename from notebooks/pt/c02oo/s02lab/s02zombie/s01exercicios/zombie-health-03-garoto-plus.ipynb rename to notebooks/pt/c02oo-java/s02lab/s02zombie/s01exercicios/zombie-health-03-garoto-plus.ipynb diff --git a/notebooks/pt/c02oo/s02lab/s02zombie/s01exercicios/zombie-health.png b/notebooks/pt/c02oo-java/s02lab/s02zombie/s01exercicios/zombie-health.png similarity index 100% rename from notebooks/pt/c02oo/s02lab/s02zombie/s01exercicios/zombie-health.png rename to notebooks/pt/c02oo-java/s02lab/s02zombie/s01exercicios/zombie-health.png diff --git a/notebooks/pt/c02oo/s02lab/s02zombie/s02resolucoes/garoto-zumbi-01.png b/notebooks/pt/c02oo-java/s02lab/s02zombie/s02resolucoes/garoto-zumbi-01.png similarity index 100% rename from notebooks/pt/c02oo/s02lab/s02zombie/s02resolucoes/garoto-zumbi-01.png rename to notebooks/pt/c02oo-java/s02lab/s02zombie/s02resolucoes/garoto-zumbi-01.png diff --git a/notebooks/pt/c02oo/s02lab/s02zombie/s02resolucoes/garoto-zumbi-02.png b/notebooks/pt/c02oo-java/s02lab/s02zombie/s02resolucoes/garoto-zumbi-02.png similarity index 100% rename from notebooks/pt/c02oo/s02lab/s02zombie/s02resolucoes/garoto-zumbi-02.png rename to notebooks/pt/c02oo-java/s02lab/s02zombie/s02resolucoes/garoto-zumbi-02.png diff --git a/notebooks/pt/c02oo/s02lab/s02zombie/s02resolucoes/garoto-zumbi-03.png b/notebooks/pt/c02oo-java/s02lab/s02zombie/s02resolucoes/garoto-zumbi-03.png similarity index 100% rename from notebooks/pt/c02oo/s02lab/s02zombie/s02resolucoes/garoto-zumbi-03.png rename to notebooks/pt/c02oo-java/s02lab/s02zombie/s02resolucoes/garoto-zumbi-03.png diff --git a/notebooks/pt/c02oo/s02lab/s02zombie/s02resolucoes/zombie-health-01.ipynb b/notebooks/pt/c02oo-java/s02lab/s02zombie/s02resolucoes/zombie-health-01.ipynb similarity index 100% rename from notebooks/pt/c02oo/s02lab/s02zombie/s02resolucoes/zombie-health-01.ipynb rename to notebooks/pt/c02oo-java/s02lab/s02zombie/s02resolucoes/zombie-health-01.ipynb diff --git a/notebooks/pt/c02oo/s02lab/s02zombie/s02resolucoes/zombie-health-02-garoto.ipynb b/notebooks/pt/c02oo-java/s02lab/s02zombie/s02resolucoes/zombie-health-02-garoto.ipynb similarity index 100% rename from notebooks/pt/c02oo/s02lab/s02zombie/s02resolucoes/zombie-health-02-garoto.ipynb rename to notebooks/pt/c02oo-java/s02lab/s02zombie/s02resolucoes/zombie-health-02-garoto.ipynb diff --git a/notebooks/pt/c02oo/s02lab/s02zombie/s02resolucoes/zombie-health-03-garoto-plus.ipynb b/notebooks/pt/c02oo-java/s02lab/s02zombie/s02resolucoes/zombie-health-03-garoto-plus.ipynb similarity index 100% rename from notebooks/pt/c02oo/s02lab/s02zombie/s02resolucoes/zombie-health-03-garoto-plus.ipynb rename to notebooks/pt/c02oo-java/s02lab/s02zombie/s02resolucoes/zombie-health-03-garoto-plus.ipynb diff --git a/notebooks/pt/c02oo/s02lab/s02zombie/s02resolucoes/zombie-health.png b/notebooks/pt/c02oo-java/s02lab/s02zombie/s02resolucoes/zombie-health.png similarity index 100% rename from notebooks/pt/c02oo/s02lab/s02zombie/s02resolucoes/zombie-health.png rename to notebooks/pt/c02oo-java/s02lab/s02zombie/s02resolucoes/zombie-health.png diff --git a/notebooks/pt/c02oo/s02lab/s03zombies/s01exercicios/zombie-health-04-heranca.ipynb b/notebooks/pt/c02oo-java/s02lab/s03zombies/s01exercicios/zombie-health-04-heranca.ipynb similarity index 100% rename from notebooks/pt/c02oo/s02lab/s03zombies/s01exercicios/zombie-health-04-heranca.ipynb rename to notebooks/pt/c02oo-java/s02lab/s03zombies/s01exercicios/zombie-health-04-heranca.ipynb diff --git a/notebooks/pt/c02oo/s02lab/s03zombies/s02resolucoes/zombie-health-04-heranca.ipynb b/notebooks/pt/c02oo-java/s02lab/s03zombies/s02resolucoes/zombie-health-04-heranca.ipynb similarity index 100% rename from notebooks/pt/c02oo/s02lab/s03zombies/s02resolucoes/zombie-health-04-heranca.ipynb rename to notebooks/pt/c02oo-java/s02lab/s03zombies/s02resolucoes/zombie-health-04-heranca.ipynb diff --git a/notebooks/pt/c02oo/s03relacionamento/s01aula-tarefa/relacionamento1-classe-objeto.ipynb b/notebooks/pt/c02oo-java/s03relacionamento/s01aula-tarefa/relacionamento1-classe-objeto.ipynb similarity index 100% rename from notebooks/pt/c02oo/s03relacionamento/s01aula-tarefa/relacionamento1-classe-objeto.ipynb rename to notebooks/pt/c02oo-java/s03relacionamento/s01aula-tarefa/relacionamento1-classe-objeto.ipynb diff --git a/notebooks/pt/c02oo/s03relacionamento/s01aula-tarefa/relacionamento2-agregacao.ipynb b/notebooks/pt/c02oo-java/s03relacionamento/s01aula-tarefa/relacionamento2-agregacao.ipynb similarity index 100% rename from notebooks/pt/c02oo/s03relacionamento/s01aula-tarefa/relacionamento2-agregacao.ipynb rename to notebooks/pt/c02oo-java/s03relacionamento/s01aula-tarefa/relacionamento2-agregacao.ipynb diff --git a/notebooks/pt/c02oo/s03relacionamento/s02resolucao/relacionamento2-agregacao.ipynb b/notebooks/pt/c02oo-java/s03relacionamento/s02resolucao/relacionamento2-agregacao.ipynb similarity index 100% rename from notebooks/pt/c02oo/s03relacionamento/s02resolucao/relacionamento2-agregacao.ipynb rename to notebooks/pt/c02oo-java/s03relacionamento/s02resolucao/relacionamento2-agregacao.ipynb diff --git a/notebooks/pt/c02oo/s03relacionamento/s03-small-challenges/relacionamento3-small-challenges.ipynb b/notebooks/pt/c02oo-java/s03relacionamento/s03-small-challenges/relacionamento3-small-challenges.ipynb similarity index 100% rename from notebooks/pt/c02oo/s03relacionamento/s03-small-challenges/relacionamento3-small-challenges.ipynb rename to notebooks/pt/c02oo-java/s03relacionamento/s03-small-challenges/relacionamento3-small-challenges.ipynb diff --git a/notebooks/pt/c02oo/s03relacionamento/s03-small-challenges/relacionamento3b-small-challenges.ipynb b/notebooks/pt/c02oo-java/s03relacionamento/s03-small-challenges/relacionamento3b-small-challenges.ipynb similarity index 100% rename from notebooks/pt/c02oo/s03relacionamento/s03-small-challenges/relacionamento3b-small-challenges.ipynb rename to notebooks/pt/c02oo-java/s03relacionamento/s03-small-challenges/relacionamento3b-small-challenges.ipynb diff --git a/notebooks/pt/c02oo/s03relacionamento/s03-small-challenges/relacionamento4-small-challenges.ipynb b/notebooks/pt/c02oo-java/s03relacionamento/s03-small-challenges/relacionamento4-small-challenges.ipynb similarity index 100% rename from notebooks/pt/c02oo/s03relacionamento/s03-small-challenges/relacionamento4-small-challenges.ipynb rename to notebooks/pt/c02oo-java/s03relacionamento/s03-small-challenges/relacionamento4-small-challenges.ipynb diff --git a/notebooks/pt/c02oo/s04lab/acoisa-02-relacionamento.ipynb b/notebooks/pt/c02oo-java/s04lab/acoisa-02-relacionamento.ipynb similarity index 100% rename from notebooks/pt/c02oo/s04lab/acoisa-02-relacionamento.ipynb rename to notebooks/pt/c02oo-java/s04lab/acoisa-02-relacionamento.ipynb diff --git a/notebooks/pt/c02oo/s04lab/lab-a-coisa-relacionamento.pdf b/notebooks/pt/c02oo-java/s04lab/lab-a-coisa-relacionamento.pdf similarity index 100% rename from notebooks/pt/c02oo/s04lab/lab-a-coisa-relacionamento.pdf rename to notebooks/pt/c02oo-java/s04lab/lab-a-coisa-relacionamento.pdf diff --git a/notebooks/pt/c02oo/s04lab/lab-a-coisa-relacionamento.png b/notebooks/pt/c02oo-java/s04lab/lab-a-coisa-relacionamento.png similarity index 100% rename from notebooks/pt/c02oo/s04lab/lab-a-coisa-relacionamento.png rename to notebooks/pt/c02oo-java/s04lab/lab-a-coisa-relacionamento.png diff --git a/notebooks/pt/c02oo/s05estatico/s01tarefa/estatica-chat.ipynb b/notebooks/pt/c02oo-java/s05estatico/s01tarefa/estatica-chat.ipynb similarity index 100% rename from notebooks/pt/c02oo/s05estatico/s01tarefa/estatica-chat.ipynb rename to notebooks/pt/c02oo-java/s05estatico/s01tarefa/estatica-chat.ipynb diff --git a/notebooks/pt/c02oo/s05estatico/s01tarefa/exercicio-singleton.ipynb b/notebooks/pt/c02oo-java/s05estatico/s01tarefa/exercicio-singleton.ipynb similarity index 100% rename from notebooks/pt/c02oo/s05estatico/s01tarefa/exercicio-singleton.ipynb rename to notebooks/pt/c02oo-java/s05estatico/s01tarefa/exercicio-singleton.ipynb diff --git a/notebooks/pt/c02oo/s05estatico/s02resolucao/exercicio-singleton.ipynb b/notebooks/pt/c02oo-java/s05estatico/s02resolucao/exercicio-singleton.ipynb similarity index 100% rename from notebooks/pt/c02oo/s05estatico/s02resolucao/exercicio-singleton.ipynb rename to notebooks/pt/c02oo-java/s05estatico/s02resolucao/exercicio-singleton.ipynb diff --git a/notebooks/pt/c02oo/s06encapsulamento/s01tarefa/encapsulamento-circulo.ipynb b/notebooks/pt/c02oo-java/s06encapsulamento/s01tarefa/encapsulamento-circulo.ipynb similarity index 100% rename from notebooks/pt/c02oo/s06encapsulamento/s01tarefa/encapsulamento-circulo.ipynb rename to notebooks/pt/c02oo-java/s06encapsulamento/s01tarefa/encapsulamento-circulo.ipynb diff --git a/notebooks/pt/c02oo/s07heranca/s01aula-tarefa/heranca-lista.ipynb b/notebooks/pt/c02oo-java/s07heranca/s01aula-tarefa/heranca-lista.ipynb similarity index 100% rename from notebooks/pt/c02oo/s07heranca/s01aula-tarefa/heranca-lista.ipynb rename to notebooks/pt/c02oo-java/s07heranca/s01aula-tarefa/heranca-lista.ipynb diff --git a/notebooks/pt/c02oo/s08lab/s01acoisa/s01lab/acoisa-03-heranca.ipynb b/notebooks/pt/c02oo-java/s08lab/s01acoisa/s01lab/acoisa-03-heranca.ipynb similarity index 100% rename from notebooks/pt/c02oo/s08lab/s01acoisa/s01lab/acoisa-03-heranca.ipynb rename to notebooks/pt/c02oo-java/s08lab/s01acoisa/s01lab/acoisa-03-heranca.ipynb diff --git a/notebooks/pt/c02oo/s08lab/s01acoisa/s01lab/lab-a-coisa.pdf b/notebooks/pt/c02oo-java/s08lab/s01acoisa/s01lab/lab-a-coisa.pdf similarity index 100% rename from notebooks/pt/c02oo/s08lab/s01acoisa/s01lab/lab-a-coisa.pdf rename to notebooks/pt/c02oo-java/s08lab/s01acoisa/s01lab/lab-a-coisa.pdf diff --git a/notebooks/pt/c02oo/s08lab/s01acoisa/s01lab/lab-a-coisa.png b/notebooks/pt/c02oo-java/s08lab/s01acoisa/s01lab/lab-a-coisa.png similarity index 100% rename from notebooks/pt/c02oo/s08lab/s01acoisa/s01lab/lab-a-coisa.png rename to notebooks/pt/c02oo-java/s08lab/s01acoisa/s01lab/lab-a-coisa.png diff --git a/notebooks/pt/c02oo/s08lab/s01acoisa/s01resposta/acoisa-03-heranca.ipynb b/notebooks/pt/c02oo-java/s08lab/s01acoisa/s01resposta/acoisa-03-heranca.ipynb similarity index 100% rename from notebooks/pt/c02oo/s08lab/s01acoisa/s01resposta/acoisa-03-heranca.ipynb rename to notebooks/pt/c02oo-java/s08lab/s01acoisa/s01resposta/acoisa-03-heranca.ipynb diff --git a/notebooks/pt/c02oo/s08lab/s01acoisa/s01resposta/lab-a-coisa.pdf b/notebooks/pt/c02oo-java/s08lab/s01acoisa/s01resposta/lab-a-coisa.pdf similarity index 100% rename from notebooks/pt/c02oo/s08lab/s01acoisa/s01resposta/lab-a-coisa.pdf rename to notebooks/pt/c02oo-java/s08lab/s01acoisa/s01resposta/lab-a-coisa.pdf diff --git a/notebooks/pt/c02oo/s08lab/s01acoisa/s01resposta/lab-a-coisa.png b/notebooks/pt/c02oo-java/s08lab/s01acoisa/s01resposta/lab-a-coisa.png similarity index 100% rename from notebooks/pt/c02oo/s08lab/s01acoisa/s01resposta/lab-a-coisa.png rename to notebooks/pt/c02oo-java/s08lab/s01acoisa/s01resposta/lab-a-coisa.png diff --git a/notebooks/pt/c02oo/s09sobrecarga/s01aula-tarefa/classe-circulo.png b/notebooks/pt/c02oo-java/s09sobrecarga/s01aula-tarefa/classe-circulo.png similarity index 100% rename from notebooks/pt/c02oo/s09sobrecarga/s01aula-tarefa/classe-circulo.png rename to notebooks/pt/c02oo-java/s09sobrecarga/s01aula-tarefa/classe-circulo.png diff --git a/notebooks/pt/c02oo/s09sobrecarga/s01aula-tarefa/sobrecarga-horario.ipynb b/notebooks/pt/c02oo-java/s09sobrecarga/s01aula-tarefa/sobrecarga-horario.ipynb similarity index 100% rename from notebooks/pt/c02oo/s09sobrecarga/s01aula-tarefa/sobrecarga-horario.ipynb rename to notebooks/pt/c02oo-java/s09sobrecarga/s01aula-tarefa/sobrecarga-horario.ipynb diff --git a/notebooks/pt/c02oo/s10polimorfismo/s01aula-tarefa/polimorfismo-emprestimo.ipynb b/notebooks/pt/c02oo-java/s10polimorfismo/s01aula-tarefa/polimorfismo-emprestimo.ipynb similarity index 100% rename from notebooks/pt/c02oo/s10polimorfismo/s01aula-tarefa/polimorfismo-emprestimo.ipynb rename to notebooks/pt/c02oo-java/s10polimorfismo/s01aula-tarefa/polimorfismo-emprestimo.ipynb diff --git a/notebooks/pt/c02oo/s10polimorfismo/s01aula-tarefa/polimorfismo-emprestimo2.ipynb b/notebooks/pt/c02oo-java/s10polimorfismo/s01aula-tarefa/polimorfismo-emprestimo2.ipynb similarity index 100% rename from notebooks/pt/c02oo/s10polimorfismo/s01aula-tarefa/polimorfismo-emprestimo2.ipynb rename to notebooks/pt/c02oo-java/s10polimorfismo/s01aula-tarefa/polimorfismo-emprestimo2.ipynb diff --git a/notebooks/pt/c02oo/s10polimorfismo/s01aula-tarefa/polimorfismo-pessoa.ipynb b/notebooks/pt/c02oo-java/s10polimorfismo/s01aula-tarefa/polimorfismo-pessoa.ipynb similarity index 100% rename from notebooks/pt/c02oo/s10polimorfismo/s01aula-tarefa/polimorfismo-pessoa.ipynb rename to notebooks/pt/c02oo-java/s10polimorfismo/s01aula-tarefa/polimorfismo-pessoa.ipynb diff --git a/notebooks/pt/c02oo/s10polimorfismo/s01aula-tarefa/polimorfismo-poligono.ipynb b/notebooks/pt/c02oo-java/s10polimorfismo/s01aula-tarefa/polimorfismo-poligono.ipynb similarity index 100% rename from notebooks/pt/c02oo/s10polimorfismo/s01aula-tarefa/polimorfismo-poligono.ipynb rename to notebooks/pt/c02oo-java/s10polimorfismo/s01aula-tarefa/polimorfismo-poligono.ipynb diff --git a/notebooks/pt/c02oo/s10polimorfismo/s01aula-tarefa/polimorfismo-zumbi.ipynb b/notebooks/pt/c02oo-java/s10polimorfismo/s01aula-tarefa/polimorfismo-zumbi.ipynb similarity index 100% rename from notebooks/pt/c02oo/s10polimorfismo/s01aula-tarefa/polimorfismo-zumbi.ipynb rename to notebooks/pt/c02oo-java/s10polimorfismo/s01aula-tarefa/polimorfismo-zumbi.ipynb diff --git a/notebooks/pt/c02oo/s10polimorfismo/s02resolucoes/polimorfismo-java.ipynb b/notebooks/pt/c02oo-java/s10polimorfismo/s02resolucoes/polimorfismo-java.ipynb similarity index 100% rename from notebooks/pt/c02oo/s10polimorfismo/s02resolucoes/polimorfismo-java.ipynb rename to notebooks/pt/c02oo-java/s10polimorfismo/s02resolucoes/polimorfismo-java.ipynb diff --git a/notebooks/pt/c02oo/s10small-challenges/s01tarefa/small-challenges-01.ipynb b/notebooks/pt/c02oo-java/s10small-challenges/s01tarefa/small-challenges-01.ipynb similarity index 100% rename from notebooks/pt/c02oo/s10small-challenges/s01tarefa/small-challenges-01.ipynb rename to notebooks/pt/c02oo-java/s10small-challenges/s01tarefa/small-challenges-01.ipynb diff --git a/notebooks/pt/c02oo/s10small-challenges/s01tarefa/small-challenges-02.ipynb b/notebooks/pt/c02oo-java/s10small-challenges/s01tarefa/small-challenges-02.ipynb similarity index 100% rename from notebooks/pt/c02oo/s10small-challenges/s01tarefa/small-challenges-02.ipynb rename to notebooks/pt/c02oo-java/s10small-challenges/s01tarefa/small-challenges-02.ipynb diff --git a/notebooks/pt/c02oo/s10small-challenges/s02resolucao/small-challenges-02.ipynb b/notebooks/pt/c02oo-java/s10small-challenges/s02resolucao/small-challenges-02.ipynb similarity index 100% rename from notebooks/pt/c02oo/s10small-challenges/s02resolucao/small-challenges-02.ipynb rename to notebooks/pt/c02oo-java/s10small-challenges/s02resolucao/small-challenges-02.ipynb diff --git a/notebooks/pt/c02oo/s11abstrata/s01aula-tarefa/abstrata-poligono.ipynb b/notebooks/pt/c02oo-java/s11abstrata/s01aula-tarefa/abstrata-poligono.ipynb similarity index 100% rename from notebooks/pt/c02oo/s11abstrata/s01aula-tarefa/abstrata-poligono.ipynb rename to notebooks/pt/c02oo-java/s11abstrata/s01aula-tarefa/abstrata-poligono.ipynb diff --git a/notebooks/pt/c02oo/s11abstrata/s02resolucoes/abstrata-java.ipynb b/notebooks/pt/c02oo-java/s11abstrata/s02resolucoes/abstrata-java.ipynb similarity index 100% rename from notebooks/pt/c02oo/s11abstrata/s02resolucoes/abstrata-java.ipynb rename to notebooks/pt/c02oo-java/s11abstrata/s02resolucoes/abstrata-java.ipynb diff --git a/notebooks/pt/c02oo/s11abstrata/s02resolucoes/abstrata-poligono.ipynb b/notebooks/pt/c02oo-java/s11abstrata/s02resolucoes/abstrata-poligono.ipynb similarity index 100% rename from notebooks/pt/c02oo/s11abstrata/s02resolucoes/abstrata-poligono.ipynb rename to notebooks/pt/c02oo-java/s11abstrata/s02resolucoes/abstrata-poligono.ipynb diff --git a/notebooks/pt/c02oo/s11abstrata/s03lab/abstrata-tiam.ipynb b/notebooks/pt/c02oo-java/s11abstrata/s03lab/abstrata-tiam.ipynb similarity index 100% rename from notebooks/pt/c02oo/s11abstrata/s03lab/abstrata-tiam.ipynb rename to notebooks/pt/c02oo-java/s11abstrata/s03lab/abstrata-tiam.ipynb diff --git a/notebooks/pt/c02oo/s11abstrata/s03lab/tiam-parte1.png b/notebooks/pt/c02oo-java/s11abstrata/s03lab/tiam-parte1.png similarity index 100% rename from notebooks/pt/c02oo/s11abstrata/s03lab/tiam-parte1.png rename to notebooks/pt/c02oo-java/s11abstrata/s03lab/tiam-parte1.png diff --git a/notebooks/pt/c02oo/s11abstrata/s03lab/tiam-parte2.png b/notebooks/pt/c02oo-java/s11abstrata/s03lab/tiam-parte2.png similarity index 100% rename from notebooks/pt/c02oo/s11abstrata/s03lab/tiam-parte2.png rename to notebooks/pt/c02oo-java/s11abstrata/s03lab/tiam-parte2.png diff --git a/notebooks/pt/c02oo/s11abstrata/s03lab/tim.png b/notebooks/pt/c02oo-java/s11abstrata/s03lab/tim.png similarity index 100% rename from notebooks/pt/c02oo/s11abstrata/s03lab/tim.png rename to notebooks/pt/c02oo-java/s11abstrata/s03lab/tim.png diff --git a/notebooks/pt/c02oo/s12interface/s01aula-tarefa/interface-poligono.ipynb b/notebooks/pt/c02oo-java/s12interface/s01aula-tarefa/interface-poligono.ipynb similarity index 100% rename from notebooks/pt/c02oo/s12interface/s01aula-tarefa/interface-poligono.ipynb rename to notebooks/pt/c02oo-java/s12interface/s01aula-tarefa/interface-poligono.ipynb diff --git a/notebooks/pt/c02oo/s12interface/s02resolucoes/interface-java.ipynb b/notebooks/pt/c02oo-java/s12interface/s02resolucoes/interface-java.ipynb similarity index 100% rename from notebooks/pt/c02oo/s12interface/s02resolucoes/interface-java.ipynb rename to notebooks/pt/c02oo-java/s12interface/s02resolucoes/interface-java.ipynb diff --git a/notebooks/pt/c02oo-java/s14exception/excecoes-jogo.ipynb b/notebooks/pt/c02oo-java/s14exception/excecoes-jogo.ipynb new file mode 100644 index 0000000..f41a883 --- /dev/null +++ b/notebooks/pt/c02oo-java/s14exception/excecoes-jogo.ipynb @@ -0,0 +1,267 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Exception\n", + "\n", + "# Tarefa\n", + "\n", + "Planeje um conjunto de exceções a ser usado no jogo que está sendo desenvolvido. Isso envolve criar classes de exceções específicas para controlar falhas do jogo e montar pequenos testes ilustrativos conforme detalhado a seguir.\n", + "\n", + "No exemplo a seguir, é criado um cenário de uma divisão inteira em que não é aceita uma divisão por 1, nem uma divisão que não gere um número inteiro. Note que este é um cenário fictício simplificado.\n", + "\n", + "Segue abaixo o modelo de como deve ser documentado o plano de exceções. Tudo o que for indicado entre `<...>` indica algo que deve ser substituído pelo indicado. No modelo são colocados exemplos ilustrativos, que serão substituídos pelos do seu projeto." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Modelo do Plano de Exceções\n", + "\n", + "## Diagrama da hierarquia de exceções\n", + "``\n", + "\n", + "![Hierarquia Exceções](exception-hierarchy.png)\n", + "\n", + "## Descrição das classes de exceção\n", + "\n", + "`:`\n", + "\n", + "Classe | Descrição\n", + "----- | -----\n", + "DivisaoInvalida | Engloba todas as exceções de divisões não aceitas.\n", + "DivisaoInutil | Indica que a divisão por 1 é inútil.\n", + "DivisaoNaoInteira | Indica uma divisão não inteira.\n", + "\n", + "## Testes da Hierarquia de Exceções\n", + "\n", + "Monte um código que teste a sua hierarquia exceções (todas elas) conforme o exemplo a seguir." + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "com.twosigma.beaker.javash.bkrdb57d720.DivisaoInvalida" + ] + }, + "execution_count": 1, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "public class DivisaoInvalida extends Exception {\n", + " public DivisaoInvalida() {\n", + " super();\n", + " }\n", + "\n", + " public DivisaoInvalida(String message) {\n", + " super(message);\n", + " }\n", + "}" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "com.twosigma.beaker.javash.bkrdb57d720.DivisaoInutil" + ] + }, + "execution_count": 2, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "public class DivisaoInutil extends DivisaoInvalida {\n", + " public DivisaoInutil() {\n", + " super();\n", + " }\n", + "\n", + " public DivisaoInutil(String message) {\n", + " super(message);\n", + " }\n", + "}" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "com.twosigma.beaker.javash.bkrdb57d720.DivisaoNaoInteira" + ] + }, + "execution_count": 3, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "public class DivisaoNaoInteira extends DivisaoInvalida {\n", + " public DivisaoNaoInteira() {\n", + " super();\n", + " }\n", + "\n", + " public DivisaoNaoInteira(String message) {\n", + " super(message);\n", + " }\n", + "}" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "com.twosigma.beaker.javash.bkrdb57d720.Util" + ] + }, + "execution_count": 4, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "public class Util {\n", + " public static int divide(int x, int y) throws DivisaoInvalida {\n", + " int divisao;\n", + " if (y == 1)\n", + " throw new DivisaoInutil(\"Esta divisao eh inutil\");\n", + " if (x%y > 0)\n", + " throw new DivisaoNaoInteira(\"Esta divisao nao eh inteira\");\n", + " divisao = x / y;\n", + " return divisao;\n", + " }\n", + "}" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "=== Primeiro teste\n", + "Resultado da divisao: 4\n", + "=== Segundo teste\n", + "Esta divisao eh inutil\n", + "=== Terceiro teste\n", + "Esta divisao nao eh inteira\n", + "=== Quarto teste\n", + "Ocorreu um erro nao esperado na divisao\n", + "--> Esta divisao nao eh inteira\n" + ] + }, + { + "data": { + "text/plain": [ + "null" + ] + }, + "execution_count": 5, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "// codigo testando a Excecao criada\n", + "int numerador = 8;\n", + "int denominador = 2;\n", + "\n", + "System.out.println(\"=== Primeiro teste\");\n", + "\n", + "// testando uma divisao valida\n", + "try {\n", + " int divisao = Util.divide(numerador, denominador);\n", + " System.out.println(\"Resultado da divisao: \" + divisao);\n", + "} catch (DivisaoInvalida erro) {\n", + " System.out.println(\"Ocorreu um erro nao esperado na divisao\");\n", + " System.out.println(erro.getMessage());\n", + "} catch (Exception erro) {\n", + " System.out.println(\"Outro erro: \" + erro.getMessage());\n", + "}\n", + "\n", + "System.out.println(\"=== Segundo teste\");\n", + "\n", + "denominador = 1;\n", + "\n", + "// testando a divisao inutil\n", + "try {\n", + " int divisao = Util.divide(numerador, denominador);\n", + " System.out.println(\"Resultado da divisao: \" + divisao);\n", + "} catch (DivisaoInutil erro) {\n", + " System.out.println(erro.getMessage());\n", + "} catch (Exception erro) {\n", + " System.out.println(\"Outro erro: \" + erro.getMessage());\n", + "}\n", + "\n", + "System.out.println(\"=== Terceiro teste\");\n", + "\n", + "denominador = 3;\n", + "\n", + "// testando a divisao nao inteira\n", + "try {\n", + " int divisao = Util.divide(numerador, denominador);\n", + " System.out.println(\"Resultado da divisao: \" + divisao);\n", + "} catch (DivisaoNaoInteira erro) {\n", + " System.out.println(erro.getMessage());\n", + "} catch (Exception erro) {\n", + " System.out.println(\"Outro erro: \" + erro.getMessage());\n", + "}\n", + "\n", + "System.out.println(\"=== Quarto teste\");\n", + "\n", + "// testando a super classe\n", + "try {\n", + " int divisao = Util.divide(numerador, denominador);\n", + " System.out.println(\"Resultado da divisao: \" + divisao);\n", + "} catch (DivisaoInvalida erro) {\n", + " System.out.println(\"Ocorreu um erro nao esperado na divisao\");\n", + " System.out.println(\"--> \" + erro.getMessage());\n", + "} catch (Exception erro) {\n", + " System.out.println(\"Outro erro: \" + erro.getMessage());\n", + "}" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Java", + "language": "java", + "name": "java" + }, + "language_info": { + "codemirror_mode": "text/x-java", + "file_extension": ".java", + "mimetype": "", + "name": "Java", + "nbconverter_exporter": "", + "version": "11.0.7" + } + }, + "nbformat": 4, + "nbformat_minor": 4 +} diff --git a/notebooks/pt/c02oo-java/s14exception/exception-hierarchy.png b/notebooks/pt/c02oo-java/s14exception/exception-hierarchy.png new file mode 100644 index 0000000000000000000000000000000000000000..4affbc589aa6b790db944fd31c2b5221c7db14b5 GIT binary patch literal 10074 zcmaL7Wl$YJ6D5kf2Dmr`cXxLS?(XjH1ixHdg1fuBy9IZ52<{SGUcT?`+gG()yYs87 zW@>tBy8E2dQxl=2Acc&8hX4i!hAbm3t^x)IZt%~xg@gHLNnfl}f`L(y$cT%md1YN@ z!|Gv-VUGsDle3G|9i! zuLSF&v}4Y5r}sH4A$3&ST`vKBHt~q_U$P>NWpmG5cBw8`o<}vYbaJ2TD{<)`}Z6BgY`Sqt}SCL|4I zx!d7|lRk)y_^8in#=F9uYkm*0x^bqtkm+qcWDxN_PEIX-jHB~=q}n^&39n;VLyI0S zjo%PyOAy{2OCvSgV;ht>|H^J2kZS9Y;S`3@wv zlu8!PZf7JWs+QNNsoAD-Gss7%izaztR8`pDg-ZFf23B7~uC-+EkcoS7&{?y1Q`h%x z>GF_1o70{US^R0#oSj<|rsLz%^TfU`^>yZ|c^|EEWdIf4j|ykW?a?Ui-ZQD1pSK`S zrJ0X_8XK6cnHUG6UXR_&iiZE>lS9BJYoN-C)kAAoD8@*hW)q)TK?6$BlNgujb#+SIZZ=7U$A1ORq6H$J_+F3TXGm_$RPFtw5BH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