Buscar

Desenvolvimento de Jogo em Java para Reflexão sobre Sustentabilidade


Faça como milhares de estudantes: teste grátis o Passei Direto

Esse e outros conteúdos desbloqueados

16 milhões de materiais de várias disciplinas

Impressão de materiais

Agora você pode testar o

Passei Direto grátis

Você também pode ser Premium ajudando estudantes

Faça como milhares de estudantes: teste grátis o Passei Direto

Esse e outros conteúdos desbloqueados

16 milhões de materiais de várias disciplinas

Impressão de materiais

Agora você pode testar o

Passei Direto grátis

Você também pode ser Premium ajudando estudantes

Faça como milhares de estudantes: teste grátis o Passei Direto

Esse e outros conteúdos desbloqueados

16 milhões de materiais de várias disciplinas

Impressão de materiais

Agora você pode testar o

Passei Direto grátis

Você também pode ser Premium ajudando estudantes
Você viu 3, do total de 34 páginas

Faça como milhares de estudantes: teste grátis o Passei Direto

Esse e outros conteúdos desbloqueados

16 milhões de materiais de várias disciplinas

Impressão de materiais

Agora você pode testar o

Passei Direto grátis

Você também pode ser Premium ajudando estudantes

Faça como milhares de estudantes: teste grátis o Passei Direto

Esse e outros conteúdos desbloqueados

16 milhões de materiais de várias disciplinas

Impressão de materiais

Agora você pode testar o

Passei Direto grátis

Você também pode ser Premium ajudando estudantes

Faça como milhares de estudantes: teste grátis o Passei Direto

Esse e outros conteúdos desbloqueados

16 milhões de materiais de várias disciplinas

Impressão de materiais

Agora você pode testar o

Passei Direto grátis

Você também pode ser Premium ajudando estudantes
Você viu 6, do total de 34 páginas

Faça como milhares de estudantes: teste grátis o Passei Direto

Esse e outros conteúdos desbloqueados

16 milhões de materiais de várias disciplinas

Impressão de materiais

Agora você pode testar o

Passei Direto grátis

Você também pode ser Premium ajudando estudantes

Faça como milhares de estudantes: teste grátis o Passei Direto

Esse e outros conteúdos desbloqueados

16 milhões de materiais de várias disciplinas

Impressão de materiais

Agora você pode testar o

Passei Direto grátis

Você também pode ser Premium ajudando estudantes

Faça como milhares de estudantes: teste grátis o Passei Direto

Esse e outros conteúdos desbloqueados

16 milhões de materiais de várias disciplinas

Impressão de materiais

Agora você pode testar o

Passei Direto grátis

Você também pode ser Premium ajudando estudantes
Você viu 9, do total de 34 páginas

Faça como milhares de estudantes: teste grátis o Passei Direto

Esse e outros conteúdos desbloqueados

16 milhões de materiais de várias disciplinas

Impressão de materiais

Agora você pode testar o

Passei Direto grátis

Você também pode ser Premium ajudando estudantes

Continue navegando


Prévia do material em texto

Universidade Paulista
WDSON DE SOUZA SANTOS – RA: N2862F0
NELSON RAMOS ROCHA – RA: N2663G5
HEITOR FERNANDES CRUZ – RA: N213DA3
PATRICK ROMAO PINTO – RA: D7018A8
DIEGO DO CARMO – RA: D6859D4
HENRIQUE ALEXANDRE DE SOUZA RA: D662JC0
ATIVIDADE PRÁTICA SUPERVISIONADA
Jogo em Java
São Paulo
2019
WDSON DE SOUZA SANTOS – RA: N2862F0
NELSON RAMOS ROCHA – RA: N2663G5
HEITOR FERNANDES CRUZ – RA: N213DA3
PATRICK ROMAO PINTO – RA: D7018A8
DIEGO DO CARMO – RA: D6859D4
HENRIQUE ALEXANDRE DE SOUZA RA: D662JC0
ATIVIDADE PRÁTICA SUPERVISIONADA
Jogo em Java
Atividade pratica supervisionada apresentada junto ao Curso de Ciência da Computação da instituição Universidade Paulista.
São Paulo
2019
LISTA DE IMAGENS
Figura 1 – Criadores do JAVA	6
Figura 2 – Ambiente de desenvolvimento do NetBeans	9
Figura 3 – Painel das perguntas	10
Figura 4 – Painel do Resultado do jogo	12
1 Objetivo do Trabalho
Objetivo Geral
Desenvolver um jogo para que o mesmo promova uma reflexão sobre o conceito de sustentabilidade e ecologia.
Objetivos Específicos
Pesquisar e ter total compreensão sobre as funcionalidades da linguagem Java, no processo de gerenciamento de suas configurações em um jogo de perguntas e respostas.
Estudar todas as ferramentas disponíveis e competentes para a construção do algoritmo.
Definir o escopo do algoritmo.
Modelar o sistema e sua implementação em software.
Testar e validar a implementação do jogo.
.
2
2 Introdução
Nosso trabalho tem como objetivo a pesquisa e desenvolvimento de um jogo de perguntas e respostas, utilizando o material nos apresentado em sala de aula, tal como pesquisas sobre o assunto, explicações, e orientação do professor.
Nossa maior dificuldade acerca do trabalho foi na hora de programar tendo de utilizar diversas condicionais que variavam de acordo com as respostas do jogador, sendo elas erradas ou corretas.
Com um mundo cada vez mais digital, aonde os jogos evoluem e se tornam mais intensos a cada dia, temas simples, mas de extrema importância como sustentabilidade e ecologia acabam sendo deixados de lados cada vez mais.
Nossa pesquisa foi feita em conjunto de todos os membros do grupo, utilizando os mais variados métodos disponíveis, deis dos mais variados livros sobre o assunto, até artigos e pesquisa online sobre o tema.
3 Linguagem Orientada a Objetos.
3.1 O que é uma linguagem orientada a objetos.
A Orientação a Objetos, ou Programação Orientada a Objetos (POO), é um tipo de paradigma de análise, para a programação de sistemas no qual todos os elementos inseridos são objetos. Foi uma das tentativas de trazer a programação para um nível de linguagem mais semelhante ao cotidiano.
A orientação a objetos se dá ao fato de a escrita do código tentar trazer objetos do mundo real para se tornar parte do código. Com o uso de classes, podemos encapsular estes objetos e utilizá-los apenas se estivermos estas classes instanciadas e se ela permitir o uso externo ou não. Outra parte importante da orientação é podermos usufruir de camadas de programação. 
Na internet, por exemplo, podemos ter a camada de interface, onde os métodos da linguagem base do site ou sistema conversam através de métodos com a linguagem HTML. Então, temos a camada de interface, a camada de métodos de união entre a interface e o backend (camada de inteligência e mecanismo de manipulação dos dados). 
Ainda podemos dizer que a linguagem de orientação a objetos é uma forma melhor de se reaproveitar códigos, pois todos os métodos criados têm uma finalidade e podem ser invocados toda vez que se fizer necessário. Exemplo: Um método para inserir um registro no banco de dados. Esta função vai ser chamada toda vez que você quiser inserir um registro em uma determinada tabela, desta forma, precisa-se fazer uma vez o código e sempre reutilizá-lo.
3.1.2 Abstração
A abstração consiste em um dos pontos mais importantes dentro de qualquer linguagem Orientada a Objetos. Como estamos lidando com uma representação de um objeto real (o que dá nome ao paradigma), temos que imaginar o que esse objeto irá realizar dentro de nosso sistema. São três pontos que devem ser levados em consideração nessa abstração.
O primeiro ponto é darmos uma identidade ao objeto que iremos criar. Essa identidade deve ser única dentro do sistema para que não haja conflito. Na maior parte das linguagens, há o conceito de pacotes. Nessas linguagens, a identidade do objeto não pode ser repetida dentro do pacote, e não necessariamente no sistema inteiro.
A segunda parte diz respeito a características do objeto. Como sabemos, no mundo real qualquer objeto possui elementos que o definem. Dentro da programação orientada a objetos, essas características são nomeadas propriedades. Por exemplo, as propriedades de um objeto “Cachorro” poderiam ser “Tamanho”, “Raça” e “Idade”.
Por fim, a terceira parte é definirmos as ações que o objeto irá executar. Essas ações, ou eventos, são chamados método.
3.1.3 Encapsulamento 
Se trata de um dos elementos que adicionam segurança à aplicação em uma programação orientada a objetos pelo fato de esconder as propriedades, criando uma espécie de caixa preta.
A maior parte das linguagens orientadas a objetos implementam o encapsulamento baseado em propriedades privadas, ligadas a métodos especiais chamados getters e setters, que irão retornar e setar o valor da propriedade, respectivamente.
3.2.1 Herança
O reuso de código é uma das grandes vantagens da programação orientada a objetos. Muito disso se dá por uma questão que é conhecida como herança. Essa característica otimiza a produção da aplicação em tempo e linhas de código.
Os “objetos” abaixo na hierarquia irão herdar características de todos os objetos acima deles, seus “ancestrais”. A herança a partir das características do objeto mais acima é considerada herança direta, enquanto as demais são consideradas heranças indiretas.
 3.2.2 Polimorfismo
O polimorfismo consiste na alteração do funcionamento interno de um método herdado de um objeto pai.
Como um exemplo, temos um objeto genérico “Televisão”. Esse objeto possui um método, ou ação, “Ligar”. Temos dois objetos, “Vídeo game” e “Geladeira”, que não irão ser ligados da mesma forma. Assim, precisamos, para cada uma das classes filhas, reescrever o método “Ligar”. 
3.3 JAVA
3.3.1 O que é JAVA?
O Java é, muito provavelmente, a linguagem de programação mais utilizada no mercado atual. Auxiliado pela presença do JRE (Java Runtime Environment), ou variações dele, em quase todos os dispositivos eletrônicos do momento, a linguagem Java é um grande sucesso entre os desenvolvedores. O sucesso da linguagem aumentou ainda mais com o Google Android, que escolheu o Java como linguagem preferencial de desenvolvimento de aplicações.
O Java implementa os quatro pilares de forma bastante intuitiva, o que facilita o entendimento por parte do desenvolvedor. A abstração, o primeiro pilar, é implementado através de classes, que contém propriedades e métodos, de forma bastante simples. Já o encapsulamento é realizado através de propriedades privadas, auxiliadas por métodos especiais getters e setters. 
As questões de herança e polimorfismo no Java são um pouco mais complexas. O Java possui herança simples, o que significa que cada classe pode herdar de apenas uma outra. Entretanto, o Java possui as chamadas Interfaces, que possuem propriedades e assinaturas de métodos. Essas interfaces precisam ser implementadas para funcionar, o que significa que uma classe pode implementar várias interfaces e herdar de apenas uma classe. Na questão de polimorfismo, o atributo @Override é responsável por informar ao Java que o método em questão está sendo reescrito.
3.3.2 CriaçãoTudo começou a ser criado em 1991, na Sun Microsystems. Teve início com o Green Project, no qual os mentores foram Patrick Naughton, Mike Sheridan, e James Gosling. Este projeto não tinha intenção de criar uma linguagem de programação, mais sim de antecipar a “próxima onda” que aconteceria na área da informática e programação. Os idealizadores do projeto acreditavam que em pouco tempo os aparelhos domésticos e os computadores teriam uma ligação.
A primeira invenção desta equipe foi o *7 (StarSeven), um controle remoto com interface touchscreen, o aparelho tinha uma “mascote” que ensinava o usuário a utilizar o controle. Um dos desenvolvedores do controle nomeou a linguagem de programação de Oak, o nome de uma árvore. Este controle foi um antecessor da ideia de interação digital, que está presente nos televisores digitais atualmente, infelizmente a tecnologia da época não estava preparada para tamanho avanço.
A tecnologia Java teve uma enorme utilização, e logo grandes empresas como a IBM, anunciaram que estariam dando suporte ao Java, ou seja, os produtos destas empresas iriam rodar aplicativos feitos em Java, Estimativas apontam que a tecnologia Java foi a mais rapidamente incorporada na história da informática. Em 2003 o Java já tinha mais de 4 milhões de desenvolvedores. A ideia inicial do Green Project começou a se concretizar. A linguagem deles passou a ser utilizada em dezenas de produtos diferentes. Computadores, celulares, palmtops, e a maioria dos produtos da Apple.
 
The Green Team. Da esquerda para a direita,Al Frazier, Joe Palrang, Mike Sheridan, Ed Frank, Don Jackson, Faye Baxter, Patrick Naughton, Chris Warth, James Gosling, Bob Weisblatt, David Lavallee e Jon Payne. Ausentes: Cindy Long, Chuck Clanton, Sheueling Chang e Craig Forrest. Fonte: https://duke.dev.java.net/green/GreenBBQ.jpg.
4 Ambiente de Desenvolvimento
4.1 NetBeans
O NetBeans começou como um projeto estudantil (originalmente denominado Xelfi) na República Tcheca em 1996. O objetivo era escrever um Java IDE similar ao Delphi no Java. O Xelfi foi o primeiro Java IDE (Ambiente Integrado de Desenvolvimento) escrito em Java, com sua pré-versões em 1997.
O Xelfi foi um projeto divertido no qual trabalhar, especialmente porque o espaço Java IDE era um território inexplorado naquela época. O projeto atraiu bastante interesse por estes estudantes, e quando se graduaram, decidiram que o poderiam o comercializar como um produto comercial. Pedindo recurso de amigos e parentes para um espaço na Web, eles formaram uma empresa em torno do mesmo.
Logo depois, eles foram contratados por Roman Stanek, um empreendedor que já tinha se envolvido em diversas empresas embrionárias na República Tcheca. Ele estava procurando por uma boa ideia na qual investir e descobriu o Xelfi. Ele se encontrou com os fundadores, eles se entenderam, e nascia um negócio.
O plano de negócios original era o de desenvolver componentes Java ativados para rede. Jarda Tulach, que projetou a arquitetura básica do IDE, teve a ideia do nome NetBeans,para descrever o que os componentes fariam. O IDE seria o meio para entregar os mesmos. Quando a especificação para o Enterprise Java Beans surgiu, fez mais sentido trabalhar com o padrão para tais componentes do que competir com ele- mas o nome colou.
4.1.2 A plataforma
Ao longo do tempo, aconteceu uma coisa interessante: as pessoas começaram a desenvolver aplicativos usando o executável núcleo do NetBeans e seus próprios plug-ins de aplicativos que não eram de fato ferramentas de desenvolvimento. De fato, isso acabou por se tornar um bom mercado. Em 2000 e 2001, bastante trabalho foi feito para retirar partes que faziam a suposição de um aplicativo desenvolvido no NetBeans era um IDE, para que a plataforma fosse um aplicativo de desktop adequado para qualquer propósito. Esse trabalho também se tornou saudável para a base de código do IDE encorajando um projeto de API limpo e uma separação de preocupações.
O NetBeans IDE oferece suporte abrangente e de primeira classe para as tecnologias e melhorias de especificação Java mais recentes, antes de outros ides. É o primeiro IDE gratuito a oferecer suporte a JDK 8, JDK 7, Java EE 7, inclusive a seus aprimoramentos de HTML5 relacionados, e a JavaFX2. 
Com seu Editor Java em constante aprimoramento, muitas funcionalidades avançadas e uma extensa linha de ferramentas, modelos e exemplos, o NetBeans IDE define o padrão de desenvolvimento com suas tecnologias inovadoras.
 
 
 Fonte: https://netbeans.org/welcome_pt_BR.ht
5 Dissertação
5.1 Interdisciplinaridade Envolvida
LPA – Lógica de programação e algoritmo no nosso projeto, nos ajudou na criação e desenvolvimento do projeto com dicas sobre formatação de código e simplificação, além de nos mostrar métodos de organizar pensamentos de maneira alternativa como por exemplo o fluxograma, pseudocódigo e afins.
LPO – Lógica de programação orientada a objetos, teve papel fundamental no projeto sendo a base para todo o resto, utilizando as ferramentas que aprendemos em aula, tal como as que aprendemos individualmente, juntando as idéias que todos membros do grupo adquiriram individualmente para montar um projeto concreto e funcional.
HS – Homem e sociedade, essa matéria mesmo sendo a distância (AVA), também se encontra no projeto, passando uma experiência para o usuário do jogo, um enriquecimento social, cultural, afetivo e cognitivo usuário.
PL – Paradigmas de linguagens, foi muito útil no desenvolvimento do projeto porque aprendemos muito sobre estruturas de controle, em que são abordadas as estruturas condicionais e as estruturas de repetição. Nas estruturas condicionais, são discutidas a instrução de seleção unidirecional, a instrução de seleção bidirecional, o alinhamento de seletores e a instrução de seleção múltipla. Nas estruturas de repetição, os laços de repetição controlados por contador, e os laços de repetição controlados por condição lógica.	
EP – Estatística e probabilidade, nos ajudou no desenvolvimento da habilidade de efetuar testes e hipóteses, para conseguirmos ter um melhor funcionamento do projeto evitando o cometimento de erros.
AL – Álgebra linear nos ajudou a desenvolver nosso raciocínio lógico e abstrato, tornando mais fácil imaginar o programa em funcionamento e possíveis problemas de projeto.
6 Código
JavaQuizApp
package javaquiz;
public class JavaQuizApp {
 
 public static void main(String[] args) {
 // TODO code application logic here
 try {
 for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
 if ("Nimbus".equals(info.getName())) {
 javax.swing.UIManager.setLookAndFeel(info.getClassName());
 break;
 }
 }
 } catch (ClassNotFoundException ex) {
 java.util.logging.Logger.getLogger(StartPage.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
 } catch (InstantiationException ex) {
 java.util.logging.Logger.getLogger(StartPage.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
 } catch (IllegalAccessException ex) {
 java.util.logging.Logger.getLogger(StartPage.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
 } catch (javax.swing.UnsupportedLookAndFeelException ex) {
 java.util.logging.Logger.getLogger(StartPage.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
 }
 
 java.awt.EventQueue.invokeLater(new Runnable() {
 public void run() {
 new StartPage().setVisible(true);
 }
 });
 }
 ProgQuiz
package javaquiz;
public class ProggQuiz {
 public static void main(String[] args) {
 java.awt.EventQueue.invokeLater(new Runnable() {
 public void run() {new StartPage().setVisible(true);
 }
 });
 }
 
}
package javaquiz;
public class Quiz extends javax.swing.JFrame {
 public Quiz() {
 initComponents();
 }
public double marks=0.0;
 
 public double Points=0.0;
 public void calPoint(){
 marks=0.0;
 if(jRadioButton2.isSelected()==true){
 marks+=10.0;
 }
 if(jRadioButton10.isSelected()==true){
 marks+=10.0;
 }
 if(jRadioButton14.isSelected()==true){
 marks+=10.0;
 }
 if(jRadioButton20.isSelected()==true){
 marks+=10.0;
 }
 
 Points=marks;
 }
 @SuppressWarnings("unchecked")
 // <editor-fold defaultstate="collapsed" desc="Generated Code"> 
 private void initComponents() {
 buttonGroup1 = new javax.swing.ButtonGroup();
 buttonGroup2 = new javax.swing.ButtonGroup();
 buttonGroup3 = new javax.swing.ButtonGroup();
 buttonGroup4 = new javax.swing.ButtonGroup();
 buttonGroup5 = new javax.swing.ButtonGroup();
 buttonGroup6 = new javax.swing.ButtonGroup();
 buttonGroup7 = new javax.swing.ButtonGroup();
 buttonGroup8 = new javax.swing.ButtonGroup();
 buttonGroup9 = new javax.swing.ButtonGroup();
 buttonGroup10 = new javax.swing.ButtonGroup();
 buttonGroup11 = new javax.swing.ButtonGroup();
 buttonGroup12 = new javax.swing.ButtonGroup();
 buttonGroup13 = new javax.swing.ButtonGroup();
 buttonGroup14 = new javax.swing.ButtonGroup();
 buttonGroup15 = new javax.swing.ButtonGroup();
 buttonGroup16 = new javax.swing.ButtonGroup();
 buttonGroup17 = new javax.swing.ButtonGroup();
 buttonGroup18 = new javax.swing.ButtonGroup();
 buttonGroup19 = new javax.swing.ButtonGroup();
 buttonGroup20 = new javax.swing.ButtonGroup();
 buttonGroup21 = new javax.swing.ButtonGroup();
 buttonGroup22 = new javax.swing.ButtonGroup();
 buttonGroup23 = new javax.swing.ButtonGroup();
 buttonGroup24 = new javax.swing.ButtonGroup();
 buttonGroup25 = new javax.swing.ButtonGroup();
 buttonGroup26 = new javax.swing.ButtonGroup();
 buttonGroup27 = new javax.swing.ButtonGroup();
 buttonGroup28 = new javax.swing.ButtonGroup();
 buttonGroup29 = new javax.swing.ButtonGroup();
 buttonGroup30 = new javax.swing.ButtonGroup();
 jPanel2 = new javax.swing.JPanel();
 jPanel1 = new javax.swing.JPanel();
 jButton1 = new javax.swing.JButton();
 jButton3 = new javax.swing.JButton();
 jButton4 = new javax.swing.JButton();
 jButton5 = new javax.swing.JButton();
 jPanel4 = new javax.swing.JPanel();
 jPanel5 = new javax.swing.JPanel();
 jPanel3 = new javax.swing.JPanel();
 jLabel2 = new javax.swing.JLabel();
 jRadioButton1 = new javax.swing.JRadioButton();
 jRadioButton2 = new javax.swing.JRadioButton();
 jRadioButton3 = new javax.swing.JRadioButton();
 jRadioButton4 = new javax.swing.JRadioButton();
 jPanel7 = new javax.swing.JPanel();
 jPanel36 = new javax.swing.JPanel();
 jLabel4 = new javax.swing.JLabel();
 jRadioButton9 = new javax.swing.JRadioButton();
 jRadioButton10 = new javax.swing.JRadioButton();
 jRadioButton11 = new javax.swing.JRadioButton();
 jRadioButton12 = new javax.swing.JRadioButton();
 jPanel8 = new javax.swing.JPanel();
 jPanel37 = new javax.swing.JPanel();
 jLabel5 = new javax.swing.JLabel();
 jRadioButton13 = new javax.swing.JRadioButton();
 jRadioButton14 = new javax.swing.JRadioButton();
 jRadioButton15 = new javax.swing.JRadioButton();
 jRadioButton16 = new javax.swing.JRadioButton();
 jPanel9 = new javax.swing.JPanel();
 jPanel38 = new javax.swing.JPanel();
 jLabel6 = new javax.swing.JLabel();
 jRadioButton17 = new javax.swing.JRadioButton();
 jRadioButton18 = new javax.swing.JRadioButton();
 jRadioButton19 = new javax.swing.JRadioButton();
 jRadioButton20 = new javax.swing.JRadioButton();
 jPanel64 = new javax.swing.JPanel();
 jCheckBox1 = new javax.swing.JCheckBox();
 jButton31 = new javax.swing.JButton();
 setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
 jPanel2.setBackground(new java.awt.Color(0, 0, 153));
 jPanel1.setBackground(new java.awt.Color(102, 102, 102));
 jPanel1.setLayout(new java.awt.GridLayout(10, 0, 5, 5));
 jButton1.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
 jButton1.setText("Questão 1");
 jButton1.addActionListener(new java.awt.event.ActionListener() {
 public void actionPerformed(java.awt.event.ActionEvent evt) {
 jButton1ActionPerformed(evt);
 }
 });
 jPanel1.add(jButton1);
 jButton3.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
 jButton3.setText("Questão 2");
 jButton3.addActionListener(new java.awt.event.ActionListener() {
 public void actionPerformed(java.awt.event.ActionEvent evt) {
 jButton3ActionPerformed(evt);
 }
 });
 jPanel1.add(jButton3);
 jButton4.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
 jButton4.setText("Questão 3");
 jButton4.addActionListener(new java.awt.event.ActionListener() {
 public void actionPerformed(java.awt.event.ActionEvent evt) {
 jButton4ActionPerformed(evt);
 }
 });
 jPanel1.add(jButton4);
 jButton5.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
 jButton5.setText("Questão 4");
 jButton5.addActionListener(new java.awt.event.ActionListener() {
 public void actionPerformed(java.awt.event.ActionEvent evt) {
 jButton5ActionPerformed(evt);
 }
 });
 jPanel1.add(jButton5);
 javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
 jPanel2.setLayout(jPanel2Layout);
 jPanel2Layout.setHorizontalGroup(
 jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
 .addGroup(jPanel2Layout.createSequentialGroup()
 .addGap(40, 40, 40)
 .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 269, javax.swing.GroupLayout.PREFERRED_SIZE)
 .addContainerGap(51, Short.MAX_VALUE))
 );
 jPanel2Layout.setVerticalGroup(
 jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
 .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
 .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
 .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 565, javax.swing.GroupLayout.PREFERRED_SIZE)
 .addGap(152, 152, 152))
 );
 jPanel4.setBorder(javax.swing.BorderFactory.createEtchedBorder());
 jPanel4.setLayout(new java.awt.CardLayout());
 jPanel3.setBackground(new java.awt.Color(255, 255, 255));
 jLabel2.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
 jLabel2.setText("1) Qual desses materia demora mais tempo para degradar?");
 buttonGroup1.add(jRadioButton1);
 jRadioButton1.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
 jRadioButton1.setText("Plastico");
 jRadioButton1.addActionListener(new java.awt.event.ActionListener() {
 public void actionPerformed(java.awt.event.ActionEventevt) {
 jRadioButton1ActionPerformed(evt);
 }
 });
 buttonGroup1.add(jRadioButton2);
 jRadioButton2.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
 jRadioButton2.setText("Vidro");
 buttonGroup1.add(jRadioButton3);
 jRadioButton3.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
 jRadioButton3.setText("Alumínio");
 jRadioButton3.addActionListener(new java.awt.event.ActionListener() {
 public void actionPerformed(java.awt.event.ActionEvent evt) {
 jRadioButton3ActionPerformed(evt);
 }
 });
 buttonGroup1.add(jRadioButton4);
 jRadioButton4.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
 jRadioButton4.setText("Borracha");
 javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
 jPanel3.setLayout(jPanel3Layout);
 jPanel3Layout.setHorizontalGroup(
 jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
 .addGroup(jPanel3Layout.createSequentialGroup()
 .addGap(189, 189, 189)
 .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
 .addComponent(jRadioButton2)
 .addComponent(jRadioButton1)
 .addComponent(jRadioButton3)
 .addComponent(jRadioButton4)
 .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 563, javax.swing.GroupLayout.PREFERRED_SIZE))
 .addContainerGap(174, Short.MAX_VALUE))
 );
 jPanel3Layout.setVerticalGroup(
 jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
 .addGroup(jPanel3Layout.createSequentialGroup()
 .addGap(87, 87, 87)
 .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 82, javax.swing.GroupLayout.PREFERRED_SIZE)
 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
 .addComponent(jRadioButton1)
 .addGap(18, 18, 18)
 .addComponent(jRadioButton2)
 .addGap(18, 18, 18)
 .addComponent(jRadioButton3)
 .addGap(18, 18, 18)
 .addComponent(jRadioButton4)
 .addContainerGap(162, Short.MAX_VALUE))
 );
 javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
 jPanel5.setLayout(jPanel5Layout);
 jPanel5Layout.setHorizontalGroup(
 jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
 .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel5Layout.createSequentialGroup()
 .addGap(0, 0, Short.MAX_VALUE)
 .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
 );
 jPanel5Layout.setVerticalGroup(
 jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
 .addComponent(jPanel3, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
 );
 jPanel4.add(jPanel5, "card2");
 jPanel36.setBackground(new java.awt.Color(255, 255, 255));
 jLabel4.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
 jLabel4.setText("2 ) Qual desses insetos é mais importante para a polimerização?");
 buttonGroup3.add(jRadioButton9);
 jRadioButton9.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
 jRadioButton9.setText("Azul");
 buttonGroup3.add(jRadioButton10);
 jRadioButton10.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
 jRadioButton10.setText("Amarela");
 buttonGroup3.add(jRadioButton11);
 jRadioButton11.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
 jRadioButton11.setText("Vermelha");
 buttonGroup3.add(jRadioButton12);
 jRadioButton12.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
 jRadioButton12.setText("Cinza");
 javax.swing.GroupLayout jPanel36Layout = new javax.swing.GroupLayout(jPanel36);
 jPanel36.setLayout(jPanel36Layout);
 jPanel36Layout.setHorizontalGroup(
 jPanel36Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
 .addGroup(jPanel36Layout.createSequentialGroup()
 .addGap(189, 189, 189)
 .addGroup(jPanel36Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
 .addComponent(jRadioButton10)
 .addComponent(jRadioButton9)
 .addComponent(jRadioButton11)
 .addComponent(jRadioButton12)
 .addComponent(jLabel4, javax.swing.GroupLayout.DEFAULT_SIZE, 523, Short.MAX_VALUE))
 .addGap(206, 206, 206))
 );
 jPanel36Layout.setVerticalGroup(
 jPanel36Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
 .addGroup(jPanel36Layout.createSequentialGroup()
 .addGap(87, 87, 87)
 .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 103, javax.swing.GroupLayout.PREFERRED_SIZE)
 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
 .addComponent(jRadioButton9)
 .addGap(18, 18, 18)
 .addComponent(jRadioButton10)
 .addGap(18, 18, 18)
 .addComponent(jRadioButton11)
 .addGap(18, 18, 18)
 .addComponent(jRadioButton12)
 .addContainerGap(141, Short.MAX_VALUE))
 );
 javax.swing.GroupLayout jPanel7Layout = new javax.swing.GroupLayout(jPanel7);
 jPanel7.setLayout(jPanel7Layout);
 jPanel7Layout.setHorizontalGroup(
 jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
 .addComponent(jPanel36, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
 );
 jPanel7Layout.setVerticalGroup(
 jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
 .addComponent(jPanel36, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
 );
 jPanel4.add(jPanel7, "card2");
 jPanel37.setBackground(new java.awt.Color(255, 255, 255));
 jLabel5.setFont(new java.awt.Font("Tahoma", 1, 18));
 jLabel5.setText("3) Qual a cor da lata de lixo reciclável"
 + " é destinada a metais? ");
 buttonGroup4.add(jRadioButton13);
 jRadioButton13.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
 jRadioButton13.setText("Azul");
 buttonGroup4.add(jRadioButton14);
 jRadioButton14.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
 jRadioButton14.setText("Amarelo");
 buttonGroup4.add(jRadioButton15);
 jRadioButton15.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
 jRadioButton15.setText("Vermelho ");
 buttonGroup4.add(jRadioButton16);
 jRadioButton16.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
 jRadioButton16.setText("Cinza");
 javax.swing.GroupLayout jPanel37Layout = new javax.swing.GroupLayout(jPanel37);
 jPanel37.setLayout(jPanel37Layout);
 jPanel37Layout.setHorizontalGroup(
 jPanel37Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
 .addGroup(jPanel37Layout.createSequentialGroup().addGap(189, 189, 189)
 .addGroup(jPanel37Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
 .addComponent(jRadioButton14)
 .addComponent(jRadioButton13)
 .addComponent(jRadioButton15)
 .addComponent(jRadioButton16)
 .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 687, javax.swing.GroupLayout.PREFERRED_SIZE))
 .addContainerGap(42, Short.MAX_VALUE))
 );
 jPanel37Layout.setVerticalGroup(
 jPanel37Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
 .addGroup(jPanel37Layout.createSequentialGroup()
 .addGap(87, 87, 87)
 .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 82, javax.swing.GroupLayout.PREFERRED_SIZE)
 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
 .addComponent(jRadioButton13)
 .addGap(18, 18, 18)
 .addComponent(jRadioButton14)
 .addGap(18, 18, 18)
 .addComponent(jRadioButton15)
 .addGap(18, 18, 18)
 .addComponent(jRadioButton16)
 .addContainerGap(162, Short.MAX_VALUE))
 );
 javax.swing.GroupLayout jPanel8Layout = new javax.swing.GroupLayout(jPanel8);
 jPanel8.setLayout(jPanel8Layout);
 jPanel8Layout.setHorizontalGroup(
 jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
 .addComponent(jPanel37, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
 );
 jPanel8Layout.setVerticalGroup(
 jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
 .addComponent(jPanel37, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
 );
 jPanel4.add(jPanel8, "card2");
 jPanel38.setBackground(new java.awt.Color(255, 255, 255));
 jLabel6.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
 jLabel6.setText("4 ) Quanto tempo o vidro demora para se degradar? ");
 buttonGroup5.add(jRadioButton17);
 jRadioButton17.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
 jRadioButton17.setText("Cinco anos");
 buttonGroup5.add(jRadioButton18);
 jRadioButton18.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
 jRadioButton18.setText("Vinte anos");
 buttonGroup5.add(jRadioButton19);
 jRadioButton19.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
 jRadioButton19.setText("Cem anos");
 buttonGroup5.add(jRadioButton20);
 jRadioButton20.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
 jRadioButton20.setText("Nunca se degrada");
 javax.swing.GroupLayout jPanel38Layout = new javax.swing.GroupLayout(jPanel38);
 jPanel38.setLayout(jPanel38Layout);
 jPanel38Layout.setHorizontalGroup(
 jPanel38Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
 .addGroup(jPanel38Layout.createSequentialGroup()
 .addGap(189, 189, 189)
 .addGroup(jPanel38Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
 .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 575, javax.swing.GroupLayout.PREFERRED_SIZE)
 .addComponent(jRadioButton18)
 .addComponent(jRadioButton17)
 .addComponent(jRadioButton19)
 .addComponent(jRadioButton20))
 .addContainerGap(144, Short.MAX_VALUE))
 );
 jPanel38Layout.setVerticalGroup(
 jPanel38Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
 .addGroup(jPanel38Layout.createSequentialGroup()
 .addGap(76, 76, 76)
 .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 79, javax.swing.GroupLayout.PREFERRED_SIZE)
 .addGap(18, 18, 18)
 .addComponent(jRadioButton17)
 .addGap(18, 18, 18)
 .addComponent(jRadioButton18)
 .addGap(18, 18, 18)
 .addComponent(jRadioButton19)
 .addGap(18, 18, 18)
 .addComponent(jRadioButton20)
 .addContainerGap(165, Short.MAX_VALUE))
 );
 javax.swing.GroupLayout jPanel9Layout = new javax.swing.GroupLayout(jPanel9);
 jPanel9.setLayout(jPanel9Layout);
 jPanel9Layout.setHorizontalGroup(
 jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
 .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel9Layout.createSequentialGroup()
 .addComponent(jPanel38, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
 .addContainerGap())
 );
 jPanel9Layout.setVerticalGroup(
 jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
 .addComponent(jPanel38, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
 );
 jPanel4.add(jPanel9, "card2");
 jPanel64.setBorder(javax.swing.BorderFactory.createEtchedBorder());
 jCheckBox1.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
 jCheckBox1.setForeground(new java.awt.Color(0, 0, 204));
 jCheckBox1.setText("Chequei todas questões!");
 jCheckBox1.addActionListener(new java.awt.event.ActionListener() {
 public void actionPerformed(java.awt.event.ActionEvent evt) {
 jCheckBox1ActionPerformed(evt);
 }
 });
 jButton31.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
 jButton31.setText("Enviar dados");
 jButton31.setEnabled(false);
 jButton31.addActionListener(new java.awt.event.ActionListener() {
 public void actionPerformed(java.awt.event.ActionEvent evt) {
 jButton31ActionPerformed(evt);
 }
 });
 javax.swing.GroupLayout jPanel64Layout = new javax.swing.GroupLayout(jPanel64);
 jPanel64.setLayout(jPanel64Layout);
 jPanel64Layout.setHorizontalGroup(
 jPanel64Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
 .addGroup(jPanel64Layout.createSequentialGroup()
 .addGap(39, 39, 39)
 .addComponent(jCheckBox1)
 .addContainerGap(697, Short.MAX_VALUE))
 .addGroup(jPanel64Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
 .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel64Layout.createSequentialGroup()
 .addContainerGap(414, Short.MAX_VALUE)
 .addComponent(jButton31, javax.swing.GroupLayout.PREFERRED_SIZE, 327, javax.swing.GroupLayout.PREFERRED_SIZE)
 .addContainerGap(172, Short.MAX_VALUE)))
 );
 jPanel64Layout.setVerticalGroup(
 jPanel64Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
 .addGroup(jPanel64Layout.createSequentialGroup()
 .addGap(33, 33, 33)
 .addComponent(jCheckBox1)
 .addContainerGap(49, Short.MAX_VALUE))
 .addGroup(jPanel64Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
 .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel64Layout.createSequentialGroup()
 .addContainerGap(32, Short.MAX_VALUE).addComponent(jButton31, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
 .addContainerGap(33, Short.MAX_VALUE)))
 );
 javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
 getContentPane().setLayout(layout);
 layout.setHorizontalGroup(
 layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
 .addGroup(layout.createSequentialGroup()
 .addGap(21, 21, 21)
 .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
 .addGap(18, 18, 18)
 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
 .addComponent(jPanel64, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
 .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, 922, javax.swing.GroupLayout.PREFERRED_SIZE))
 .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
 );
 layout.setVerticalGroup(
 layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
 .addGroup(layout.createSequentialGroup()
 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
 .addGroup(layout.createSequentialGroup()
 .addGap(21, 21, 21)
 .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, 496, javax.swing.GroupLayout.PREFERRED_SIZE))
 .addGroup(layout.createSequentialGroup()
 .addGap(125, 125, 125)
 .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, 237, javax.swing.GroupLayout.PREFERRED_SIZE)))
 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
 .addComponent(jPanel64, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
 .addContainerGap(473, Short.MAX_VALUE))
 );
 pack();
 setLocationRelativeTo(null);
 }// </editor-fold> 
 private void jButton31ActionPerformed(java.awt.event.ActionEvent evt) { 
 
 try{
 this.calPoint();
 System.out.println(this.Points);
 Result obj=new Result();
 obj.setVisible(true);
 obj.getPoints(this.Points);
 this.dispose();
 }
 catch(Exception e){
 e.printStackTrace();
 }
 
 } 
 private void jCheckBox1ActionPerformed(java.awt.event.ActionEvent evt) { 
 // TODO add your handling code here:
 jButton31.setEnabled(true);
 } 
 private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) { 
 // TODO add your handling code here:
 jPanel4.removeAll();
 jPanel4.repaint();
 jPanel4.revalidate();
 jPanel4.add(jPanel8);
 jPanel4.repaint();
 jPanel4.revalidate();
 } 
 private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) { 
 // TODO add your handling code here:
 jPanel4.removeAll();
 jPanel4.repaint();
 jPanel4.revalidate();
 jPanel4.add(jPanel7);
 jPanel4.repaint();
 jPanel4.revalidate();
 } 
 private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) { 
 // TODO add your handling code here:
 jPanel4.removeAll();
 jPanel4.repaint();
 jPanel4.revalidate();
 jPanel4.add(jPanel5);
 jPanel4.repaint();
 jPanel4.revalidate();
 } 
 private void jRadioButton3ActionPerformed(java.awt.event.ActionEvent evt) { 
 // TODO add your handling code here:
 } 
 private void jRadioButton1ActionPerformed(java.awt.event.ActionEvent evt) { 
 // TODO add your handling code here:
 } 
 private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) { 
 // TODO add your handling code here:
 jPanel4.removeAll();
 jPanel4.repaint();
 jPanel4.revalidate();
 jPanel4.add(jPanel9);
 jPanel4.repaint();
 jPanel4.revalidate();
 } 
 /**
 * @param args the command line arguments
 */
 public static void main(String args[]) {
 /* Set the Nimbus look and feel */
 //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
 /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
 * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
 */
 try {
 for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
 if ("Nimbus".equals(info.getName())) {
 javax.swing.UIManager.setLookAndFeel(info.getClassName());
 break;
 }
 }
 } catch (ClassNotFoundException ex) {
 java.util.logging.Logger.getLogger(Quiz.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
 } catch (InstantiationException ex) {
 java.util.logging.Logger.getLogger(Quiz.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
 } catch (IllegalAccessException ex) {
 java.util.logging.Logger.getLogger(Quiz.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
 } catch (javax.swing.UnsupportedLookAndFeelException ex) {
 java.util.logging.Logger.getLogger(Quiz.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
 }
 //</editor-fold>
 /* Create and display the form */
 java.awt.EventQueue.invokeLater(new Runnable() {
 public void run() {
 new Quiz().setVisible(true);
 }
 });
 }
 // Variables declaration - do not modify 
 private javax.swing.ButtonGroup buttonGroup1;
 private javax.swing.ButtonGroup buttonGroup10;
 private javax.swing.ButtonGroup buttonGroup11;
 private javax.swing.ButtonGroup buttonGroup12;
 private javax.swing.ButtonGroup buttonGroup13;
 private javax.swing.ButtonGroup buttonGroup14;
 private javax.swing.ButtonGroup buttonGroup15;
 private javax.swing.ButtonGroup buttonGroup16;
 private javax.swing.ButtonGroup buttonGroup17;
 private javax.swing.ButtonGroup buttonGroup18;
 private javax.swing.ButtonGroup buttonGroup19;
 private javax.swing.ButtonGroup buttonGroup2;
 private javax.swing.ButtonGroup buttonGroup20;
 private javax.swing.ButtonGroup buttonGroup21;
 private javax.swing.ButtonGroup buttonGroup22;
 private javax.swing.ButtonGroup buttonGroup23;
 private javax.swing.ButtonGroup buttonGroup24;
 private javax.swing.ButtonGroup buttonGroup25;
 private javax.swing.ButtonGroup buttonGroup26;
 private javax.swing.ButtonGroup buttonGroup27;
 private javax.swing.ButtonGroup buttonGroup28;
 privatejavax.swing.ButtonGroup buttonGroup29;
 private javax.swing.ButtonGroup buttonGroup3;
 private javax.swing.ButtonGroup buttonGroup30;
 private javax.swing.ButtonGroup buttonGroup4;
 private javax.swing.ButtonGroup buttonGroup5;
 private javax.swing.ButtonGroup buttonGroup6;
 private javax.swing.ButtonGroup buttonGroup7;
 private javax.swing.ButtonGroup buttonGroup8;
 private javax.swing.ButtonGroup buttonGroup9;
 private javax.swing.JButton jButton1;
 private javax.swing.JButton jButton3;
 private javax.swing.JButton jButton31;
 private javax.swing.JButton jButton4;
 private javax.swing.JButton jButton5;
 private javax.swing.JCheckBox jCheckBox1;
 private javax.swing.JLabel jLabel2;
 private javax.swing.JLabel jLabel4;
 private javax.swing.JLabel jLabel5;
 private javax.swing.JLabel jLabel6;
 private javax.swing.JPanel jPanel1;
 private javax.swing.JPanel jPanel2;
 private javax.swing.JPanel jPanel3;
 private javax.swing.JPanel jPanel36;
 private javax.swing.JPanel jPanel37;
 private javax.swing.JPanel jPanel38;
 private javax.swing.JPanel jPanel4;
 private javax.swing.JPanel jPanel5;
 private javax.swing.JPanel jPanel64;
 private javax.swing.JPanel jPanel7;
 private javax.swing.JPanel jPanel8;
 private javax.swing.JPanel jPanel9;
 private javax.swing.JRadioButton jRadioButton1;
 private javax.swing.JRadioButton jRadioButton10;
 private javax.swing.JRadioButton jRadioButton11;
 private javax.swing.JRadioButton jRadioButton12;
 private javax.swing.JRadioButton jRadioButton13;
 private javax.swing.JRadioButton jRadioButton14;
 private javax.swing.JRadioButton jRadioButton15;
 private javax.swing.JRadioButton jRadioButton16;
 private javax.swing.JRadioButton jRadioButton17;
 private javax.swing.JRadioButton jRadioButton18;
 private javax.swing.JRadioButton jRadioButton19;
 private javax.swing.JRadioButton jRadioButton2;
 private javax.swing.JRadioButton jRadioButton20;
 private javax.swing.JRadioButton jRadioButton3;
 private javax.swing.JRadioButton jRadioButton4;
 private javax.swing.JRadioButton jRadioButton9;
 // End of variables declaration 
}
package javaquiz;
public class Result extends javax.swing.JFrame {
 public Result() {
 initComponents();
 }
double gp=0.0;
 @SuppressWarnings("unchecked")
 // <editor-fold defaultstate="collapsed" desc="Generated Code"> 
 private void initComponents() {
 jPanel1 = new javax.swing.JPanel();
 lbl = new javax.swing.JLabel();
 ProBar = new javax.swing.JProgressBar();
 jButton1 = new javax.swing.JButton();
 setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
 jPanel1.setBackground(new java.awt.Color(255, 255, 255));
 lbl.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
 lbl.setBorder(javax.swing.BorderFactory.createEtchedBorder());
 ProBar.setMaximum(100);
 ProBar.setStringPainted(true);
 jButton1.setFont(new java.awt.Font("Tahoma", 1, 24)); // NOI18N
 jButton1.setText("Clique e veja o resultado");
 jButton1.addActionListener(new java.awt.event.ActionListener() {
 public void actionPerformed(java.awt.event.ActionEvent evt) {
 jButton1ActionPerformed(evt);
 }
 });
 javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
 jPanel1.setLayout(jPanel1Layout);
 jPanel1Layout.setHorizontalGroup(
 jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
 .addGroup(jPanel1Layout.createSequentialGroup()
 .addGap(158, 158, 158)
 .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
 .addComponent(lbl, javax.swing.GroupLayout.DEFAULT_SIZE, 572, Short.MAX_VALUE)
 .addComponent(ProBar, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
 .addContainerGap(129, Short.MAX_VALUE))
 .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
 .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
 .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 328, javax.swing.GroupLayout.PREFERRED_SIZE)
 .addGap(251, 251, 251))
 );
 jPanel1Layout.setVerticalGroup(
 jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
 .addGroup(jPanel1Layout.createSequentialGroup()
 .addGap(62, 62, 62)
 .addComponent(lbl, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
 .addGap(56, 56, 56)
 .addComponent(ProBar, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 41, Short.MAX_VALUE)
 .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 69, javax.swing.GroupLayout.PREFERRED_SIZE)
 .addGap(31, 31, 31))
 );
 javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
 getContentPane().setLayout(layout);
 layout.setHorizontalGroup(
 layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
 .addGroup(layout.createSequentialGroup()
 .addGap(106, 106, 106)
 .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
 .addContainerGap(122, Short.MAX_VALUE))
 );
 layout.setVerticalGroup(
 layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
 .addGroup(layout.createSequentialGroup()
 .addGap(52, 52, 52)
 .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
 .addContainerGap(242, Short.MAX_VALUE))
 );
 pack();
 setLocationRelativeTo(null);
 }// </editor-fold> 
 private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) { 
 // TODO add your handling code here:
 String str="";
 if(this.gp<10){
 str="Vai estudar!!!";
 }
 else{
 if(this.gp>=20 && this.gp<=300){
 str="Bom trabalho";
 }
 else{
 str="Excelente trabalho! ";
 }
 }
 lbl.setText("Seu resultado foi:: "+this.gp + " "+str);
 ProBar.setValue((int)this.gp);
 } 
public void getPoints(double pts){
 gp=pts;
}
 public static void main(String args[]) {
 /* Set the Nimbus look and feel */
 //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
 /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
 try {
 for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
 if ("Nimbus".equals(info.getName())) {
 javax.swing.UIManager.setLookAndFeel(info.getClassName());
 break;
 }
 }
 } catch (ClassNotFoundException ex) {
 java.util.logging.Logger.getLogger(Result.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
 } catch (InstantiationExceptionex) {
 java.util.logging.Logger.getLogger(Result.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
 } catch (IllegalAccessException ex) {
 java.util.logging.Logger.getLogger(Result.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
 } catch (javax.swing.UnsupportedLookAndFeelException ex) {
 java.util.logging.Logger.getLogger(Result.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
 }
 //</editor-fold>
 /* Create and display the form */
 java.awt.EventQueue.invokeLater(new Runnable() {
 public void run() {
 new Result().setVisible(true);
 }
 });
 }
 // Variables declaration - do not modify 
 private javax.swing.JProgressBar ProBar;
 private javax.swing.JButton jButton1;
 private javax.swing.JPanel jPanel1;
 private javax.swing.JLabel lbl;
 // End of variables declaration 
}
package javaquiz;
public class StartPage extends javax.swing.JFrame {
 public StartPage() {
 initComponents();
 }
 @SuppressWarnings("unchecked")
 // <editor-fold defaultstate="collapsed" desc="Generated Code"> 
 private void initComponents() {
 jPanel1 = new javax.swing.JPanel();
 jLabel3 = new javax.swing.JLabel();
 jButton1 = new javax.swing.JButton();
 setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
 jPanel1.setBackground(new java.awt.Color(255, 255, 255));
 jPanel1.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(51, 204, 0), 1, true));
 jLabel3.setFont(new java.awt.Font("Tahoma", 1, 24)); // NOI18N
 jLabel3.setText("QUIZ DE SUSTENTABILIDADE");
 jButton1.setBackground(new java.awt.Color(51, 255, 51));
 jButton1.setFont(new java.awt.Font("Tahoma", 1, 24)); // NOI18N
 jButton1.setText("START QUIZ ");
 jButton1.addActionListener(new java.awt.event.ActionListener() {
 public void actionPerformed(java.awt.event.ActionEvent evt) {
 jButton1ActionPerformed(evt);
 }
 });
 javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
 jPanel1.setLayout(jPanel1Layout);
 jPanel1Layout.setHorizontalGroup(
 jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
 .addGroup(jPanel1Layout.createSequentialGroup()
 .addContainerGap(176, Short.MAX_VALUE)
 .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
 .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
 .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 223, javax.swing.GroupLayout.PREFERRED_SIZE)
 .addGap(215, 215, 215))
 .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
 .addComponent(jLabel3)
 .addGap(146, 146, 146))))
 );
 jPanel1Layout.setVerticalGroup(
 jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
 .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
 .addContainerGap(147, Short.MAX_VALUE)
 .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 46, javax.swing.GroupLayout.PREFERRED_SIZE)
 .addGap(39, 39, 39)
 .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 48, javax.swing.GroupLayout.PREFERRED_SIZE)
 .addGap(171, 171, 171))
 );
 javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
 getContentPane().setLayout(layout);
 layout.setHorizontalGroup(
 layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
 .addGroup(layout.createSequentialGroup()
 .addGap(341, 341, 341)
 .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
 .addContainerGap(1500, Short.MAX_VALUE))
 );
 layout.setVerticalGroup(
 layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
 .addGroup(layout.createSequentialGroup()
 .addGap(116, 116, 116)
 .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
 .addContainerGap(765, Short.MAX_VALUE))
 );
 pack();
 setLocationRelativeTo(null);
 }// </editor-fold> 
 private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) { 
 // TODO add your handling code here:
 this.setVisible(false);
 new Quiz().setVisible(true);
 } 
 public static void main(String args[]) {
 /* Set the Nimbus look and feel */
 //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
 /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
 try {
 for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
 if ("Nimbus".equals(info.getName())) {
 javax.swing.UIManager.setLookAndFeel(info.getClassName());
 break;
 }
 }
 } catch (ClassNotFoundException ex) {
 java.util.logging.Logger.getLogger(StartPage.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
 } catch (InstantiationException ex) {
 java.util.logging.Logger.getLogger(StartPage.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
 } catch (IllegalAccessException ex) {
 java.util.logging.Logger.getLogger(StartPage.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
 } catch (javax.swing.UnsupportedLookAndFeelException ex) {
 java.util.logging.Logger.getLogger(StartPage.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
 }
 //</editor-fold>
 /* Create and display the form */
 java.awt.EventQueue.invokeLater(new Runnable() {
 public void run() {
 new StartPage().setVisible(true);
 }
 });
 }
 // Variables declaration - do not modify 
 private javax.swing.JButton jButton1;
 private javax.swing.JLabel jLabel3;
 private javax.swing.JPanel jPanel1;
 // End of variables declaration 
7 Conclusão
Conforme os objetivos estabelecidos, conclui-se que o trabalho possibilitou o desenvolvimento com sucesso de um bom jogo, utilizando o material que nos fora apresentado dentro de sala de aula, além de proporcionar benefícios relevantes a todos os membros do grupo, acerca da importância da sustentabilidade que apesar de o mundo em que vivemos estar a cada dia mais digitalizado, sua importância vem sendo deixada de lado a cada dia mais e mais.
Neste processo de programação do jogo, foi encontrado alguns obstáculos. Entre eles, a grande dificuldade acerca de programar se utilizando de forma correta as diversas ramificações de respostas escolhidas, se embasando na maioria das vezes em sites estrangeiros.
Assim, mesmo com todos os obstáculos, foi conseguido ter um grande ganho de aprendizagem na área, tanto com um grande conhecimento teórico quantoum conhecimento prático, a tamanha dificuldade de pesquisa foi recompensada ao fim do trabalho, sites que apesar de serem estrangeiros, possuem grandes oportunidades de aprendizados e com absoluta certeza serão de extrema importância em trabalhos que ainda estão por vir.
8 Bibliografia
https://netbeans.org/welcome_pt_BR.html
https://www.java.com/pt_BR/download/faq/whatis_java.xml
https://www.tecmundo.com.br/programacao/2710-o-que-e-java-.htm
https://www.infoescola.com/informatica/historia-do-java/
https://www.devmedia.com.br/os-4-pilares-da-programacao-orientada-a-objetos/9264
https://becode.com.br/programacao-orientada-a-objetos-poo/
https://meuartigo.brasilescola.uol.com.br/informatica/programacao-orientada-objetos.htm
https://netbeans.org/features/index_pt_BR.html
9 Fichas da APS