Vous êtes sur la page 1sur 86

UNIVERSIDAD TCNICA DE MACHALA FACULTAD DE INGENIERA CIVIL ESCUELA DE INFORMTICA PRIMER QUIMESTRE PARALELO A

PROGRAMACIN 1 UTILITARIOS 1

Sinnimos y antnimos: Juego realizado en Javascript

Proyecto Final de Asignatura

Autores: Ayala Mendieta Joffre Manuel Redrovan Urea Jefferson Efrain

Docente: Ing. Fausto Redrovn Castillo, Mg.

MACHALA - ECUADOR SEPTIEMBRE, 2013

Utilitarios I Informe de proyecto final

JUSTIFICACIN

La poblacin de la ciudad de Machala presenta grandes falencias, errores y vacos en temas referentes a lengua y literatura. Estos problemas han acarreado severos problemas histricamente a la poblacin como falta de entendimiento en documentos legales causando que sean manipulados o estafados. En nuestra opinin estos problemas han sido causados por una evidente falta de inters de los ciudadanos en las asignaturas acadmicas de primaria y secundaria, especialmente en el rea de lenguaje y comunicacin. Este desinters puede ser provocado por falta de motivacin de los profesores durante el proceso de enseanza y la preferencia de las personas en entretenimientos banales y de los cuales no obtienen ningn beneficio. De cualquier manera esto, al menos tericamente, podra solucionarse con la adecuada estimulacin en los temas que sea necesario. El proceso de aprendizaje debe ser interactivo, de manera que el profesor incentive la investigacin y lectura, pero no de manera autoritaria. Es decir, el maestro debe fomentar estos mbitos haciendo que el alumno se interese por el tema, de manera que el, por cuenta propia, busque mas informacin sobre los temas. Crear inters en los alumnos por los diversos temas es extremadamente complicado, pero una de las maneras mas viables para poder lograrlo es proponer juegos. La tecnologa en la actualidad nos facilita el poder generar un entorno que cause mayor inters en las personas y al mismo tiempo sea ms amigable para el aprendizaje. Lamentablemente esta a sido subestimada en los campos educativos. Conociendo esto, consideramos conveniente crear un juego en Javascript que fomente el inters de la comunidad en uno de los aspectos mas complicados y de mayores problemas, la lengua y literatura. De esta manera buscamos ofrecerles un entorno didctico y divertido en el que puedan desarrollar sus capacidades de diferenciacin y conocimiento de sinnimos y antnimos. Este juego ofrece una interfaz extremadamente simple y de fcil entendimiento, es decir amigable con el usuario. Para optimizar los resultados obtenidos, el juego presentar una puntuacin basada en los resultados obtenidos sobre diez(10) puntos. El sistema de puntaje fue implementado buscando que los usuarios busquen lograr perfeccin en la puntuacin.

Autores: Ayala Mendieta Joffre Manuel, Redrovan Urea Jefferson EfrainPag. 2/86

Utilitarios I Informe de proyecto final

OBJETIVOS

2.1 Objetivo General


Incentivar a la poblacin de la ciudad de Machala en general a interesarse en el lenguaje y la literatura as como al aumento de su vocabulario para que puedan desenvolverse de mejor manera en sus actividades, tanto familiares como laborales.

2.2 Objetivos Especficos


Crear un programa basado en sinnimos y antnimos. Crear un entorno amigable al usuario. Fomentar el inters en el juego mediante un sistema de puntuacin. Crear una presentacin llamativa y placentera. Hacer publico el programa mediante un blog creado para ese propsito. Publicar el cdigo fuente para permitir al publico en general a modificarlo y mejorarlo.

Autores: Ayala Mendieta Joffre Manuel, Redrovan Urea Jefferson EfrainPag. 3/86

Utilitarios I Informe de proyecto final

3 ANTECEDENTES
Histricamente el aprendizaje a sido subestimado y se le a dado poca importancia, esto se explica ampliamente por su posicin en la pirmide de prioridades del ser humano (pirmide de Maslow1), ante asuntos de mayor importancia. Ecuador, en las primeras dcadas del s. XX, posea una sociedad basada en la economa agrcola, y en la que la poblacin sufra de grandes problemas sociales que llegaban incluso a la falta de alimento. Ante estos problemas la gran mayora de la poblacin buscaba desesperadamente un medio de sustento, descuidando asuntos que se consideraban de menor importancia, entre ellos la educacin, dada la situacin en la que vivan. En aquella poca la educacin era considerada un lujo solo asequible por las clases mas altas de la sociedad, lo cual, brindaba a la misma la oportunidad de mejorar aun ms su situacin econmica que ya era bastante buena. Ante esta situacin las diferencias sociales se marcaron mas profundamente generando en la mayor parte de la poblacin un marcado desinters que se a heredado hasta la actualidad. Apenas desde el ao 2007 la educacin paso a ser completamente gratuita permitiendo el acceso de todas las clases sociales a la misma. Esto represento un hitos educacional histrico. Pero lamentablemente una gran cantidad aun no brinda a la educacin la importancia que esta merece. Una vez claro esto, debemos centrarnos en los mtodos de enseanza. En la antigedad la enseanza estaba basada en clases tericas no interactivas que se centraban en impartir la informacin sin tomar en cuenta la actuacin y desenvolvimiento de los estudiantes dentro del saln de clases. Actualmente, principalmente en los pases de mayor desarrollo, los mtodos de enseanza estn basados en la tecnologa para poder facilitar la comprensin de los estudiantes sobre los temas, especialmente los relacionados a matemticas, fsica y lgica en general. Pero se a descuidado completamente la importancia de la lectura y el lenguaje dejando de lado los textos, novelas y dems piezas literarias de gran relevancia. En nuestro pas hasta hace poco la tecnologa era completamente desconocida y actualmente muchas personas estn consideradas dentro del analfabetismo digital 2. Esto no a permitido que la educacin se desarrolle como debera causado un ligero atraso en el sistema educativo , principalmente en la primaria y en la secundaria. La tecnologa, por su mal uso, a causado un gran desinters en los asuntos acadmicos, ya que, las personas prefieren el entretenimiento audiovisual a el aprendizaje y desarrollo de conocimientos.

1Abraham H. Maslow, en su obra Motivation and Personality (1954) plantea el concepto de jerarqua de las necesidades basado en el modelo de una pirmide, en la cual las necesidades se encuentran organizadas estructuralmente con distintos grados de poder, de acuerdo a una determinacin biolgica dada por nuestra constitucin gentica como organismo de la especie humana. 2El analfabetismo digital es el nivel de desconocimiento de las nuevas tecnologas que impiden que las personas puedan acceder a las posibilidades de interactuar con stas, es decir por una parte navegar en la web, disfrutar contenidos multimedia, sociabilizar mediante las redes comunicativas, crear documentacin etc.

Autores: Ayala Mendieta Joffre Manuel, Redrovan Urea Jefferson EfrainPag. 4/86

Utilitarios I Informe de proyecto final

MARCO TERICO

Que es juego educativo? De la interpolacin de varias fuentes podemos definir un juego educativo como: El juego educativo es el juego que tiene un objetivo educativo implcito o explcito para que las personas aprendan algo especfico planificado por la persona que crea o aplica el juego. En este sentido podemos decir que el juego educativo es el extremo del juego. Ya que jugar por definicin no tiene objetivos educativos explcitos, de ah que aparezca el trmino juego educativo, cuando se utiliza como material que ayuda a aprender, como un mtodo de enseanza. Un mtodo que busca situaciones ldicas para ensear los objetivos educativos. Pero para poder realizar un juego educativo, primeramente tenemos que conocer que motiva a los estudiantes, por esa razn citare un articulo en el que se explica de manera bastante amplia los puntos que motivan a los alumnos.

Formas motivar a los estudiantes 1.Satisfacer las necesidades y motivos de los estudiantes. Los estudiantes aprenden mejor cuando tienen incentivos para satisfacer sus propios motivos para para aprender. En este sentido puede ser til que el profesor intente identificar las necesidades de los estudiantes tanto aquellas de las que estos son conscientes como de las que no... Imaginemos que antes de impartir un curso de matemticas, fsica, msica, etc. el profesor dedicara algn tiempo a relacionar el valor de este aprendizaje conectndolo con necesidades y deseos de los estudiantes; el incentivo para aprender sera mucho mayor. 2.Hacer que los estudiantes sean participantes activos a la hora de aprender . Estudiantes pueden aprender haciendo, construyendo, escribiendo, diseando, creando, resolviendo... La pasivividad perjudica la motivacin y la curiosidad de los estudiantes. Haga preguntas... Anime a los estudiantes a sugerir aproximaciones a un problema o a adivinar los resultados de un experimento... 3.Pedir a los estudiantes que analicen lo que hace una clase sea ms o menos. motivadora. Sera algo as como aprovechar "los puntos fuertes y dbiles" de la materia y del profesor para que este pueda introducir cambios y apovechar todas sus potencialidades. Los estudiantes pueden responder cosas como: "el entusiasmo del profesor, la relevancia y nivel dificultad del material, la organizacin del curso, el grado de participacin activa de los estudiantes, la variedad, la relacin entre profesor y estudiantes, el uso apropiado, concreto y inteligible de lo ejemplos y decenas de cosas ms..." 4.Mantener expectativas altas, pero realistas, sobre sus estudiantes . Al parecer segn algunas investigaciones las expectativas del profesor tienen un poderoso efecto en el comportamiento de los estudiantes. Se trata de que el profesor mantega expectativas realistas a la hora dedesarrollar su trabajo, hacer presentaciones, dirigir los debates, y hacer exmenes; y al mismo tiempo d a los estudiantes oportunidades para tener xito. Esa combinacin puede funcionar siempre que, segn los estudiantes,

Autores: Ayala Mendieta Joffre Manuel, Redrovan Urea Jefferson EfrainPag. 5/86

Utilitarios I Informe de proyecto final


se d un equilibrio realista. 5.Ayudar a los estudiantes a establecer sus propios objetivos . Ayudar a los estudiantes a evaluar sus progresos, animando o criticando su trabajo, analizando sus esfuerzos, sus debilidades... Quizs en este tema lo ms importante es animar a los estudiantes a centrarse en un proceso para mejorar continuadamente, no slo en una calificacin o en un examen. 6.Comunicar a los estudiantes las exigencias de la asignatura para aprobarla . Es positivo establecer con claridad lo que se le exige a los alumnos para poder superar la asignatura. Incluso ser muy cuidadoso con el lenguaje. Por ejemplo, en vez de decir "vas muy atrasado" habra que decir a los estudiantes: "esta es la forma de ir al da.. puedo ayudarte?". 7.Fortalecer la automotivacin de los estudiantes . Se deben evitar mensajes que como"exijo", "debes", "deberas" y sustituirlos por "creo que encontrars.." "estara interesado en conocer tu respuesta". La necesidad de lograr la automotivacin y la autoestima de los alumnos debe estar siempre muy presente en la mente del profesor. 8.Evitar crear competencia entre los estudiantes . La competencia produce ansiedad, lo cual interfiere de forma negativa con el aprendizaje. Es positivo reducir la tendencia de los estudiantes a compararse con otros estudiantes. 9.Ser estusiasta con su asignatura. El entusiasmo del profesor con su asignatura es crucial para la motivacin de los estudiantes. Si un profesor se convierte en aburrido o aptico con su asignatura, los estudiantes tambin lo harn. El mejor estusiasmo del profesor es el que se deriva de su confianza, su identificacin con los contenidos y un autntico placer por ensear. 10.Trabajar las fortalezas e intereses de los estudiantes . Explicar cmo el contenido de la asignatura ayudar a los objetivos educacionales, profesionales o personales de los estudiantes. Partir del intereses reales de estos que sean vinculables con el aprendizaje. 11.Cuando sea posible, dar alguna posibilidad de eleccin a los estudiantes sobre lo que estn estudiando . En materia de trabajos, materiales... unidades alternativas.. no sobre los exmenes, pero s en todo aquello que refuerce su corresponsabilidad. 12.Incrementar progresivamente la dificultad del material de la asignatura . Es interesante dar oprtunidades a los estudiantes para que tengan xito al principio del primer trimestre del curso o semestre. Una vez que hayan triunfado, es ms fcil incrementar la dificultad o el nivel de forma progresiva. 13.Variar los mtodos de enseanza. La variedad ayuda a despertar la participacin y la motivacin de los estudiantes en la asignatura. Se puede romper la rutina de muchas formas: cambio de papeles, debates, tormentas de ideas, discusiones, demostraciones, casos de estudio, presentaciones audiovisuales, invitados externos, trabajo en grupos pequeos... 14.Poner nfasis en el dominio y aprendizaje, ms que en las notas . Los investigadores recomiendan dejar de poner nfasis en las calificaciones eliminando sistemas complejos de evaluacin; tambin desaconsejan el uso de las calificaciones

Autores: Ayala Mendieta Joffre Manuel, Redrovan Urea Jefferson EfrainPag. 6/86

Utilitarios I Informe de proyecto final


para comportamientos no acadmicos (ej. asistencia o no a clase). En vez de esto, valorar trabajos escritos, valorar la satisfacin personal de trabajos realizados, y ayudar a los estudiantes a medir sus progresos. 15.Disear exmenes que fomenten el tipo de aprendizaje que se desea que los alumnos asuman. Si, por ejemplo, los exmenes se basan en memorizar detalles los estudiantes se centrarn en memorizarlos; si en cambio sus exmenes ponen nfasis en sintetizar y evaluar la informacin, los estudiantes se motivarn para poner el practica estas habilidades cuando estudien la asignatura. 16.Evitar utilizar las calificaciones como amenazas . Aludir o amenzar con bajas notas, puede provocar algunos estudiantes a trabajar duro, pero en otros estudiantes pueden provocar desde el deseo de autoengaarse o darse excusas para retrasar el trabajo hasta otros comportamientos contraproducentes. 17.Dar feedback a los estudiantes tan pronto como sea posible . Devuelva los exmenes y los trabajos corregidos lo antes posible y reconozca y recompense pblica e inmediatamente los xitos logrados. D indicaciones sobre lo bien que lo han hecho o cmo pueden mejorar. 18.Recompensar el xito. Tanto los comentarios positivos o negativos influyen en la motivacin, pero los investigadores indican que los estudiantes reaccionan mejor a travs de un feedback positivo y el xito. Alabar ayuda a construir la confianza, capacidad y autoestima de los estudiantes. Es importante reconocer los esfuerzos, incluso si los resultados no son buenos, trasmitiendo la confianza del profesor de que sern buenos en el futuro. 19.Presentar a los estudiantes el buen trabajo hecho por sus compaeros . Compartir con la clase ideas, conocimientos y habilidades de estudiantes individuales con el resto de la clase. Por ejemplo, copias de los mejores trabajos o exmenes... Se trata de propiciar "habilmente" un reconocimiento social del trabajo bien hecho en su entorno de compaeros y relaciones. 20.Ser especfico, cuando se haga una crtica negativa, nunca a la persona . Las crticas tienen efectos poderosos y pueden conducir a una atmsfera negativa en la clase. Cada vez que se identifique una debilidad en los estudiantes, dje claro que se trata sobre una determinada funcin o tarea, nunca al estudiante como persona. Combinar un comentario negativo con otros aspectos en los cuales el estudiante haya tenido resultados positivos. 21.Evitar comentarios degradantes en la clase. Muchos estudiantes pueden estar ansiosos por su rendimiento o habilidades en la clase. Hay que ser sensible en la forma en la que se expresa o se comentan tales temas a efectos de evitar observaciones o comentarios en los que el profesor muestre falta de inters o que "pasen" de sus sentimientos relacionados con su fracaso. 22.Evitar ceder y dar las "soluciones" a los estudiantes para las tareas de trabajo o deberes para casa . Hay que lograr que piensen por s mismos y dirigir la ayuda por otros caminos (ayudarles a construir lo que ya saben, propiciarles aproximaciones al problema, posibles pasos...). Hay que lograr mtodos que ayuden a los estudiantes a que experimenten el sentimiento y confianza derivada de que lo

Autores: Ayala Mendieta Joffre Manuel, Redrovan Urea Jefferson EfrainPag. 7/86

Utilitarios I Informe de proyecto final


pueden lograr por s mismos, lo que incrementar su motivacin para aprender. 23.Asignar la lectura de los temas al menos dos sesiones antes de que sea analizada en clase. Dar a los estudiantes un tiempo sobrado para preparar y atraer su curiosidad hacia los materiales de lectura.. "Este ...es uno de mis favoritos... y estar muy interesado en conocer vuestra opinin". 24.Asignar preguntas de estudio. Al hacer preguntas se contribuir a incentivar a los alumnos a buscar respuestas en lo que leen o estudian. 25.Permitir breves chuletas que pueden ser utilizadas en los exmenes . Especialmente si estas chuletas incentivan la lectura, el trabajo y el estudio bien hecho. Un profesor en fsica daba la oportunidad de escribir en cada clase en una tarjeta 3x5: un resumen, definiciones, ideas claves u otros materiales derivados de la lectura, que los estudiantes entregaban finalmente al profesor con su nombre. Esa tarjeta se daba nuevamente al estudiante para complementarla pasados unos das para aadieran materiales que consideraran importantes y era nuevamente devuelta al profesor. Por ltimo, el profesor entregaba a los estudiantes dichas tarjetas el da del examen, durante la realizacin del mismo. El resultado no se hizo esperar. El profesor not que el porcentaje de alumnos que completaban sus lecturas pas del 10 al 90%. Y los estudiantes especialmente valoraban estas "tarjetas de superviviencia" como una gran ayuda. 26.Utilizar el tiempo de clase como tiempo de lectura . Si el profesor est tratando de provocar un debate y se percata de que pocos estudiantes han completado las lecturas asignadas, hay que considerar la posibilidad de que los alumnos completen su lectura en tiempo de clase, silenciosamente o en voz alta y discutiendo aquellos puntos importantes. 27.Asignar trabajos escritos a aquellos estudiantes que no completen sus lecturas. Los que no las han completado al principio de la clase se le asigna un trabajo escrito y no participan en la dicusin de clase. El trabajo escrito no es evaluado, sino simplemente reconocido. Con estos mtodos se puede ir logrando que los estudiantes finalmente cumplan con las lecturas programadas durante el curso.[A1]

INTERFAZ
Ahora, basado en estas recomendaciones podemos tener una idea ms clara sobre como debera ser la interfaz del programa y que clase de mensajes debera enviar al usuario para que este se sienta mas cmodo y motivado. Importancia de una buena interfaz Por qu es importante la interfaz? Cuando utilizas un programa informtico, suele haber algo entre t y l. Ese algo, que es a la vez un lmite y un espacio comn entre ambas partes, es la interfaz. En tecnologa se denomina interfaz a muchas cosas, pero es la interfaz grfica de usuario el concepto que aqu tratamos. La mejor interfaz es la que no se ve, sin embargo muchas de ellas, por ser nuevas,

Autores: Ayala Mendieta Joffre Manuel, Redrovan Urea Jefferson EfrainPag. 8/86

Utilitarios I Informe de proyecto final


desconocidas o estar mal diseadas, se hacen visibles. Cuntas veces no encuentras lo que buscas en una web o no sabes cmo usar un programa, un cajero automtico o un telfono mvil? Son situaciones muy comunes resultado de un mal diseo de interfaz, que a su vez genera un problema de usabilidad. El mejor sistema o las herramientas ms perfectas son intiles si no sabemos usarlas. Cuantificar el coste de una mala interfaz a veces no es posible, cunto vale un cliente insatisfecho? Actualmente, hasta el 45% del cdigo de una aplicacin est dedicado a la interfaz. Ms de un tercio de los anlisis, comparaciones y opiniones de la prensa se dedican a la facilidad de uso. Sin embargo se dedica algo menos del 10% del presupuesto global de un proyecto en su desarrollo.[A2]

Escritura del cdigo


Ya una vez claros estos conceptos podemos iniciar con la escritura del codigo. Empezaremos llamando una clase que ser la principal. Pero dado que el programa es demasido amplio y tiene una gran variedad de frames para desplegar a diferentes momentos las separaremos en clases distintas, siendo, cada clase, un frame a desplegar. Luego estas frames seran llamadas como objetos organizadamente acorde al desarrollo del programa. Para tener mas claro estos aspectos citare un articulo que trata sobre la creacion de objetos en Javascript. Crear un nuevo objeto implica dotarlo de propiedades y mtodos, es decir, crear una especie de clase de la que luego se puedan hacer instancias. Los objetos no se pueden destruir, perviven mientras est el documento cargado. Para crear un objeto, en realidad lo que hacemos es dar su funcin constructor. Por ejemplo, supongamos que queremos crear el objeto ordenador con las propiedades microprocesador, velocidad, y sistema operativo. Tendramos que crear una funcin de la siguiente forma: function ordenador( micro,veloc,sistem ) { this.microprocesador=micro; this.velocidad=veloc; this.sistema_operativo=sistem; } // function ordenador Posteriormente podremos crear instancias de este objeto llamando a la funcin con la partcula new delante, es decir: var orden1=new ordenador("pentium","166","Windows 95"); var orden2=new ordenador("486DX2","66","MS-DOS 6.22"); En cualquier momento podemos aadir nuevas propiedades a un objeto. Podemos hacerlo de dos formas. La primera es aadrsela a una sola instancia, por ejemplo: orden1.cdrom="16X"; O bien aadrselo al objeto en general (y por tanto a todas las instancias), para lo cual se ha de incluir la palabra reservada prototype: ordenador.prototype.cdrom=NUL

Autores: Ayala Mendieta Joffre Manuel, Redrovan Urea Jefferson EfrainPag. 9/86

Utilitarios I Informe de proyecto final


Adems, los objetos tienen mtodos. Para dotar de mtodos a un objeto tenemos las mismas dos opciones que con las propiedades: bien ponerlo en la declaracin del objeto, o bien aadirlo a una sola instancia o al objeto en general. Por ejemplo, veamos un mtodo para visualizar los componentes del objeto ordenador declarado anteriormente: function visualiza() { var cadena="Microprocesador: "+this.microprocesador+"\n"+ "Velocidad: "+this.velocidad+" Mhz.\n"+ "Sistema Operativo: "+this.sistema_operativo; alert(cadena); } // function visualiza Lo anterior sirve para declarar la funcin que visualiza, ahora la declaracin de la funcin que construye el objeto quedara de la siguiente forma: function ordenador( micro,veloc,sistem ) { this.microprocesador=micro; this.velocidad=veloc; this.sistema_operativo=sistem; this.visualiza=visualiza; } // function ordenador Ntese que no escribimos: this.visualiza=visualiza(); Ya que lo que queremos es que se asigne la funcin, no el resultado que devuelve la misma. Al final de la siguiente seccin se puede encontrar un ejemplo completo de la creacin y uso de objetos definidos por el usuario.[A3] Creados los objetos debemos realizar la de organizacin de los mismos. Para nuestro proyecto se la creacin de nuevos objetos y al mismo tiempo la destruccin de su objeto predecesor. Esta accin evita que se consuman recursos innecesariamente. Cada pregunta posee dos botones, uno con las lineas de programacin del botn correcto y otra con las lineas de cdigo de botn incorrecto. El codigo de boton correcto hace aumentar el acumulador del puntaje. El acumulador es un valor entero(int) pero debe ser mostrado como un valor string para poder ser desplegado en el cuadro de texto para permitir al usuario visualizar su calificacion. Me permitire citar nuevamente un articulo que explica de manera amplia y clara la manera derealizar este procedimiento. Para convertir un String (cadena) a int (entero) hay que emplear el mtodo esttico de la clase Integer, parseInt Ejemplo: String enteroString = "5"; int entero = Integer.parseInt(enteroString); Para convertir int(entero) a String slo debemos hacer una llamada al mtodo esttico de la clase Integer. toString o al metodo String.valueOf Ejemplo: int entero = 1; String enteroString = Integer.toString(entero); String enteroString =

Autores: Ayala Mendieta Joffre Manuel, Redrovan Urea Jefferson Efrain 10/86

Pag.

Utilitarios I Informe de proyecto final


String.valueOf(entero);[A4] Para poder pasar el valor del acumulador de una variable a otra utilizamos como plataforma los jTextArea convirtiendolos en public y static. Para de esta manera poder cambiarsu contenido al ser craeados desde el codigo anterior. De esta manera pudimos lograr que se conserve el valor del acumulador al eliminar el jFrame anterior. Finalmente se realizaron cambios de color y ajustes de imagenes para el prgrama para obtener un resultado final mas estetico. El programa usado para nuestro proyecto fue NetBeans debido a las facilidades que brinda dentro de su interfaz grafica.

Autores: Ayala Mendieta Joffre Manuel, Redrovan Urea Jefferson Efrain 11/86

Pag.

Utilitarios I Informe de proyecto final

5 MARCO METODOLGICO
5.1 Clases utilizadas en el programa Juego.java(clase princpal[main])
Esta clase tiene por propsito crear el primer objeto del programa, es decir, la ventana de presentacin. /* * To change this template, choose Tools | Templates * and open the template in the editor. */ /** * * @author Joffre Ayala y Jefferson Redrovan */ public class juego { public static void main(String args[]) { int nota=0; presentacion asda= new presentacion(); } }

Autores: Ayala Mendieta Joffre Manuel, Redrovan Urea Jefferson Efrain 12/86

Pag.

Utilitarios I Informe de proyecto final

Ayuda.java
Es un Jframe en el que desplegar una pequea explicacin de lo que son sinnimos y antnimos.
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ /** * * @author Gateway */ public class ayuda extends javax.swing.JFrame { /** * Creates new form ayuda */ public ayuda() { initComponents(); } /** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code"> private void initComponents() { jPanel1 = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); jButton1 = new javax.swing.JButton(); jLabel2 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); jLabel4 = new javax.swing.JLabel(); jLabel5 = new javax.swing.JLabel(); jLabel6 = new javax.swing.JLabel(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); jLabel1.setFont(new java.awt.Font("DomCasual BT", 3, 48)); // NOI18N jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jLabel1.setText("AYUDA!"); jButton1.setFont(new java.awt.Font("DomCasual BT", 0, 36)); // NOI18N jButton1.setText("Volver al menu");

Autores: Ayala Mendieta Joffre Manuel, Redrovan Urea Jefferson Efrain 13/86

Pag.

Utilitarios I Informe de proyecto final


jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } }); jLabel2.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N jLabel2.setText("Sinonimos:"); jLabel3.setText("Sinonimos son palabras que, siendo diferentes en su escritura, tienen"); jLabel4.setText("signigicados similares o iguales."); jLabel5.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N jLabel5.setText("Antonimos:"); jLabel6.setText("Antonimos son palabras que tiene significados opuestos."); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addGap(61, 61, 61) .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 275, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(jPanel1Layout.createSequentialGroup() .addGap(28, 28, 28) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel2) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jLabel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addComponent(jLabel5) .addComponent(jLabel6)))) .addGap(0, 0, Short.MAX_VALUE)) .addGroup(jPanel1Layout.createSequentialGroup() .addContainerGap() .addComponent(jButton1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))) .addContainerGap()) ); jPanel1Layout.setVerticalGroup(

Autores: Ayala Mendieta Joffre Manuel, Redrovan Urea Jefferson Efrain 14/86

Pag.

Utilitarios I Informe de proyecto final


jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addContainerGap() .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jLabel2) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jLabel3) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jLabel4) .addGap(14, 14, 14) .addComponent(jLabel5) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jLabel6) .addGap(18, 18, 18) .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(0, 1, Short.MAX_VALUE)) ); pack(); }// </editor-fold> private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) { presentacion presenta = new presentacion(); presenta.setVisible(true); this.dispose(); // TODO add your handling code here: } /** * @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.

Autores: Ayala Mendieta Joffre Manuel, Redrovan Urea Jefferson Efrain 15/86

Pag.

Utilitarios I Informe de proyecto final


* 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(ayuda.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (InstantiationException ex) { java.util.logging.Logger.getLogger(ayuda.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (IllegalAccessException ex) { java.util.logging.Logger.getLogger(ayuda.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (javax.swing.UnsupportedLookAndFeelException ex) { java.util.logging.Logger.getLogger(ayuda.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 ayuda().setVisible(true); } });

} // Variables declaration - do not modify private javax.swing.JButton jButton1; private javax.swing.JLabel jLabel1; private javax.swing.JLabel jLabel2; private javax.swing.JLabel jLabel3; private javax.swing.JLabel jLabel4; private javax.swing.JLabel jLabel5; private javax.swing.JLabel jLabel6; private javax.swing.JPanel jPanel1; // End of variables declaration }

Autores: Ayala Mendieta Joffre Manuel, Redrovan Urea Jefferson Efrain 16/86

Pag.

Utilitarios I Informe de proyecto final

Presentacion.java
Es un jFrame que puede ser llamado tanto desde la clase main(juego.java) o desde la clase resultado.java. El propsito es desplegar el men principal del juego, mismo que consta de los Botones: Jugar, Ayuda y Salir; cuenta tambin con un jTextpane que brinda informacin sobre el funcionamiento del juego y un jLabel que muestra el nombre del juego. /* * To change this template, choose Tools | Templates * and open the template in the editor. */ /** * * @author Joffre Ayala y Jefferson Redrovan */ public class presentacion extends javax.swing.JFrame { /** * Creates new form presentacion */ public presentacion() { initComponents(); } /** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code"> private void initComponents() { jPanel1 = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); jScrollPane2 = new javax.swing.JScrollPane(); jTextPane2 = new javax.swing.JTextPane(); jButton1 = new javax.swing.JButton(); jButton2 = new javax.swing.JButton(); jButton3 = new javax.swing.JButton(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); jLabel1.setFont(new java.awt.Font("DomCasual BT", 0, 48)); // NOI18N jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jLabel1.setText("Sinonimos Y Antonimos"); jTextPane2.setEditable(false); jTextPane2.setFont(new java.awt.Font("DomCasual BT", 0, 24)); // NOI18N jTextPane2.setText("El juego se trata de responder si una palabra es sinonima o

Autores: Ayala Mendieta Joffre Manuel, Redrovan Urea Jefferson Efrain 17/86

Pag.

Utilitarios I Informe de proyecto final


antonima de otra.\n\nPara este juego se presentaran un total de 10 preguntas con un puntaje de 1, es decir, se calificara con una nota maxima de 10.Por favor lea que pide el juego antes de responder.\n\nSuerte!"); jScrollPane2.setViewportView(jTextPane2); jButton1.setFont(new java.awt.Font("DomCasual BT", 0, 36)); // NOI18N jButton1.setText("Ayuda"); jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } }); jButton2.setFont(new java.awt.Font("DomCasual BT", 0, 36)); // NOI18N jButton2.setText("Salir"); jButton2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton2ActionPerformed(evt); } }); jButton3.setFont(new java.awt.Font("DomCasual BT", 0, 48)); // NOI18N jButton3.setText("Empezar!"); jButton3.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton3ActionPerformed(evt); } }); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(jPanel1Layout.createSequentialGroup() .addGap(23, 23, 23) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() .addComponent(jButton1, javax.swing.GroupLayout.DEFAULT_SIZE, 294, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 297, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent(jButton3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addContainerGap(23, Short.MAX_VALUE)) );

Autores: Ayala Mendieta Joffre Manuel, Redrovan Urea Jefferson Efrain 18/86

Pag.

Utilitarios I Informe de proyecto final


jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addContainerGap() .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 261, Short.MAX_VALUE) .addGap(18, 18, 18) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jButton1) .addComponent(jButton2)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 57, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap()) ); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) ); pack(); }// </editor-fold> private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) { ayuda ayu= new ayuda(); ayu.setVisible(true); this.dispose();// TODO add your handling code here: } private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) { this.dispose();// TODO add your handling code here: } private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) { preguntas1 cues= new preguntas1(); cues.setVisible(true); this.dispose();// TODO add your handling code here: } /** * @param args the command line arguments

Autores: Ayala Mendieta Joffre Manuel, Redrovan Urea Jefferson Efrain 19/86

Pag.

Utilitarios I Informe de proyecto final


*/ 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(presentacion.class.getName()).log(java.util.logging.Level.SE VERE, null, ex); } catch (InstantiationException ex) { java.util.logging.Logger.getLogger(presentacion.class.getName()).log(java.util.logging.Level.SE VERE, null, ex); } catch (IllegalAccessException ex) { java.util.logging.Logger.getLogger(presentacion.class.getName()).log(java.util.logging.Level.SE VERE, null, ex); } catch (javax.swing.UnsupportedLookAndFeelException ex) { java.util.logging.Logger.getLogger(presentacion.class.getName()).log(java.util.logging.Level.SE VERE, null, ex); } //</editor-fold> /* Create and display the form */ java.awt.EventQueue.invokeLater(new Runnable() { public void run() { new presentacion().setVisible(true); } });

} // Variables declaration - do not modify private javax.swing.JButton jButton1; private javax.swing.JButton jButton2; private javax.swing.JButton jButton3; private javax.swing.JLabel jLabel1; private javax.swing.JPanel jPanel1; private javax.swing.JScrollPane jScrollPane2; private javax.swing.JTextPane jTextPane2; // End of variables declaration

Autores: Ayala Mendieta Joffre Manuel, Redrovan Urea Jefferson Efrain 20/86

Pag.

Utilitarios I Informe de proyecto final

Autores: Ayala Mendieta Joffre Manuel, Redrovan Urea Jefferson Efrain 21/86

Pag.

Utilitarios I Informe de proyecto final

Preguntas1.java
Esta clase puede ser llamada unicamente por la clase presentacio.java. Esta clase tiene por propsito desplegar la primera pregunta del cuestionario a realizarse. Esta clase cuenta con 2 botones: Si y No cualquiera de los 2 botones al ser presionados generan un evento. El botn Si general el cdigo de respuesta incorrecta 3(vea el cdigo private void jButton1ActionPerformed(java.awt.event.ActionEvent evt)).El botn No por su parte, genera el cdigo de respuesta correcta 4(vea el cdigo private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) ) /* * To change this template, choose Tools | Templates * and open the template in the editor. */ /** * * @author Joffre Ayala y Jefferson Redrovan */ public class preguntas1 extends javax.swing.JFrame { int cont;//Valor entero usado como acumulador de puntaje /** * Creates new form preguntas1 */ public preguntas1() { initComponents(); } /** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code"> private void initComponents() { jPanel1 = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jButton1 = new javax.swing.JButton(); jButton2 = new javax.swing.JButton(); jLabel3 = new javax.swing.JLabel(); jScrollPane1 = new javax.swing.JScrollPane(); jTextPane1 = new javax.swing.JTextPane();

3 Codigo que genera el nuevo objeto pero no hace aumentar el acumulador. 4 Codigo que genera el nuevo objeto y hace aumentar el acumulador en 1.

Autores: Ayala Mendieta Joffre Manuel, Redrovan Urea Jefferson Efrain 22/86

Pag.

Utilitarios I Informe de proyecto final


setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); jLabel1.setFont(new java.awt.Font("DomCasual BT", 0, 70)); // NOI18N jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jLabel1.setText("Sinonimo"); jLabel2.setFont(new java.awt.Font("DomCasual BT", 0, 48)); // NOI18N jLabel2.setText("Blanco es sinonimo de negro?"); jButton1.setFont(new java.awt.Font("DomCasual BT", 0, 36)); // NOI18N jButton1.setText("Si"); jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } }); jButton2.setFont(new java.awt.Font("DomCasual BT", 0, 36)); // NOI18N jButton2.setText("No"); jButton2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton2ActionPerformed(evt); } }); jLabel3.setFont(new java.awt.Font("DomCasual BT", 0, 24)); // NOI18N jLabel3.setText("Su puntaje actual es:"); jScrollPane1.setFont(new java.awt.Font("DomCasual BT", 0, 36)); // NOI18N jTextPane1.setEditable(false); jTextPane1.setFont(new java.awt.Font("DomCasual BT", 0, 36)); // NOI18N jTextPane1.setText(String.valueOf(cont)); jScrollPane1.setViewportView(jTextPane1); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 489, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(75, 75, 75)) .addGroup(jPanel1Layout.createSequentialGroup() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 308, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 332,

Autores: Ayala Mendieta Joffre Manuel, Redrovan Urea Jefferson Efrain 23/86

Pag.

Utilitarios I Informe de proyecto final


javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(jPanel1Layout.createSequentialGroup() .addContainerGap() .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 169, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 56, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(0, 0, Short.MAX_VALUE))) .addContainerGap()) .addGroup(jPanel1Layout.createSequentialGroup() .addGap(216, 216, 216) .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 212, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 59, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jLabel2) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 69, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 69, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 47, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) ); pack();

Autores: Ayala Mendieta Joffre Manuel, Redrovan Urea Jefferson Efrain 24/86

Pag.

Utilitarios I Informe de proyecto final


}// </editor-fold> private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) { cont++;;// TODO add your handling code here:// TODO add your handling code here: preguntas2 cues2= new preguntas2(); cues2.jTextPane1.setText(String.valueOf(cont)); cues2.setVisible(true); this.dispose(); } private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) { preguntas2 cues2= new preguntas2(); cues2.jTextPane1.setText(String.valueOf(cont)); cues2.setVisible(true); this.dispose();// TODO add your handling code here: } /** * @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(preguntas1.class.getName()).log(java.util.logging.Level.SEV ERE, null, ex); } catch (InstantiationException ex) { java.util.logging.Logger.getLogger(preguntas1.class.getName()).log(java.util.logging.Level.SEV ERE, null, ex); } catch (IllegalAccessException ex) { java.util.logging.Logger.getLogger(preguntas1.class.getName()).log(java.util.logging.Level.SEV ERE, null, ex); } catch (javax.swing.UnsupportedLookAndFeelException ex) { java.util.logging.Logger.getLogger(preguntas1.class.getName()).log(java.util.logging.Level.SEV ERE, null, ex);

Autores: Ayala Mendieta Joffre Manuel, Redrovan Urea Jefferson Efrain 25/86

Pag.

Utilitarios I Informe de proyecto final


} //</editor-fold> /* Create and display the form */ java.awt.EventQueue.invokeLater(new Runnable() { public void run() { new preguntas1().setVisible(true); } });

} // Variables declaration - do not modify private javax.swing.JButton jButton1; private javax.swing.JButton jButton2; private javax.swing.JLabel jLabel1; private javax.swing.JLabel jLabel2; private javax.swing.JLabel jLabel3; private javax.swing.JPanel jPanel1; public static javax.swing.JScrollPane jScrollPane1; public static javax.swing.JTextPane jTextPane1; // End of variables declaration }

Autores: Ayala Mendieta Joffre Manuel, Redrovan Urea Jefferson Efrain 26/86

Pag.

Utilitarios I Informe de proyecto final

preguntas2.java
Esta clase puede ser llamada unicamente por la clase preguntas1.java. Esta clase tiene por propsito desplegar la segunda pregunta del cuestionario a realizarse. Esta clase, al igual que todas las clases que contiene preguntas en su nombre, cuenta con 2 botones: Si y No cualquiera de los 2 botones al ser presionados generan un evento. El botn Si general el cdigo de respuesta Correcta (vea el cdigo private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) { ).El botn No por su parte, genera el cdigo de respuesta incorrecta (vea el cdigo private void jButton2ActionPerformed(java.awt.event.ActionEvent evt)). Contiene tambin un jTextPane que tiene dos funciones: mostrar el puntaje actual (acumulador) y permitir importar el valor del acumulador de la clase preguntas1.java. /* * To change this template, choose Tools | Templates * and open the template in the editor. */ /** * * @author Joffre Ayala y Jefferson Redrovan */ import java.io.IOException; public class preguntas2 extends javax.swing.JFrame { int cont; /** * Creates new form preguntas2 */ public preguntas2() { initComponents();

} /** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code"> private void initComponents() { jPanel1 = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel();

Autores: Ayala Mendieta Joffre Manuel, Redrovan Urea Jefferson Efrain 27/86

Pag.

Utilitarios I Informe de proyecto final


jButton1 = new javax.swing.JButton(); jButton2 = new javax.swing.JButton(); jLabel3 = new javax.swing.JLabel(); jScrollPane1 = new javax.swing.JScrollPane(); jTextPane1 = new javax.swing.JTextPane(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); jLabel1.setFont(new java.awt.Font("DomCasual BT", 0, 70)); // NOI18N jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jLabel1.setText("Antonimo"); jLabel2.setFont(new java.awt.Font("DomCasual BT", 0, 48)); // NOI18N jLabel2.setText("Felicidad es antonimo de tristeza?"); jButton1.setFont(new java.awt.Font("DomCasual BT", 0, 36)); // NOI18N jButton1.setText("Si"); jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } }); jButton2.setFont(new java.awt.Font("DomCasual BT", 0, 36)); // NOI18N jButton2.setText("No"); jButton2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton2ActionPerformed(evt); } }); jLabel3.setFont(new java.awt.Font("DomCasual BT", 0, 24)); // NOI18N jLabel3.setText("Su puntaje actual es:"); jTextPane1.setEditable(false); jTextPane1.setFont(new java.awt.Font("DomCasual BT", 0, 36)); // NOI18N jScrollPane1.setViewportView(jTextPane1); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addComponent(jButton1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 326, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(jPanel1Layout.createSequentialGroup() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

Autores: Ayala Mendieta Joffre Manuel, Redrovan Urea Jefferson Efrain 28/86

Pag.

Utilitarios I Informe de proyecto final


.addGroup(jPanel1Layout.createSequentialGroup() .addGap(134, 134, 134) .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 360, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(jPanel1Layout.createSequentialGroup() .addGap(49, 49, 49) .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 546, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGap(0, 45, Short.MAX_VALUE))) .addContainerGap()) .addGroup(jPanel1Layout.createSequentialGroup() .addContainerGap() .addComponent(jLabel3) .addGap(8, 8, 8) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 62, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 59, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 76, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 76, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel3) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) );

Autores: Ayala Mendieta Joffre Manuel, Redrovan Urea Jefferson Efrain 29/86

Pag.

Utilitarios I Informe de proyecto final


pack(); }// </editor-fold> private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) { cont=Integer.parseInt(jTextPane1.getText()); cont++;;// TODO add your handling code here:// TODO add your handling code here: preguntas3 cues3= new preguntas3(); cues3.jTextPane1.setText(String.valueOf(cont)); cues3.setVisible(true); this.dispose();// TODO add your handling code here: } private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) { cont=Integer.parseInt(jTextPane1.getText()); preguntas3 cues3= new preguntas3(); cues3.jTextPane1.setText(String.valueOf(cont)); cues3.setVisible(true); this.dispose();// TODO add your handling code here: } /** * @param args the command line arguments */ public static void main(String args[]) throws IOException { /* 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(preguntas2.class.getName()).log(java.util.logging.Level.SEV ERE, null, ex); } catch (InstantiationException ex) { java.util.logging.Logger.getLogger(preguntas2.class.getName()).log(java.util.logging.Level.SEV ERE, null, ex); } catch (IllegalAccessException ex) { java.util.logging.Logger.getLogger(preguntas2.class.getName()).log(java.util.logging.Level.SEV ERE, null, ex); } catch (javax.swing.UnsupportedLookAndFeelException ex) {

Autores: Ayala Mendieta Joffre Manuel, Redrovan Urea Jefferson Efrain 30/86

Pag.

Utilitarios I Informe de proyecto final


java.util.logging.Logger.getLogger(preguntas2.class.getName()).log(java.util.logging.Level.SEV ERE, null, ex); } //</editor-fold> /* Create and display the form */ java.awt.EventQueue.invokeLater(new Runnable() { public void run() { new preguntas2().setVisible(true); } }); } // Variables declaration - do not modify private javax.swing.JButton jButton1; private javax.swing.JButton jButton2; private javax.swing.JLabel jLabel1; private javax.swing.JLabel jLabel2; private javax.swing.JLabel jLabel3; private javax.swing.JPanel jPanel1; private javax.swing.JScrollPane jScrollPane1; public static javax.swing.JTextPane jTextPane1; // End of variables declaration

Autores: Ayala Mendieta Joffre Manuel, Redrovan Urea Jefferson Efrain 31/86

Pag.

Utilitarios I Informe de proyecto final

preguntas3.java
Esta clase puede ser llamada unicamente por la clase preguntas2.java. Tiene por propsito desplegar la tercera pregunta del cuestionario a realizarse. Esta clase, al igual que todas las clases que contiene preguntas en su nombre, cuenta con 2 botones: Si y No cualquiera de los 2 botones al ser presionados generan un evento. El botn Si general el cdigo de respuesta incorrecta (vea el cdigo private void jButton1ActionPerformed(java.awt.event.ActionEvent evt)).El botn No por su parte, genera el cdigo de respuesta correcta (vea el cdigo private void jButton2ActionPerformed(java.awt.event.ActionEvent evt)). Contiene tambin un jTextPane que tiene dos funciones: mostrar el puntaje actual (acumulador) y permitir importar el valor del acumulador de la clase preguntas1.java. * * @author Joffre Ayala y Jefferson Redrovan */ public class preguntas3 extends javax.swing.JFrame { int cont; /** * Creates new form preguntas3 */ public preguntas3() { initComponents(); } /** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code"> private void initComponents() { jPanel1 = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jButton1 = new javax.swing.JButton(); jButton2 = new javax.swing.JButton(); jLabel3 = new javax.swing.JLabel(); jScrollPane1 = new javax.swing.JScrollPane(); jTextPane1 = new javax.swing.JTextPane(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); jLabel1.setFont(new java.awt.Font("DomCasual BT", 0, 70)); // NOI18N jLabel1.setText("Sinonimo");

Autores: Ayala Mendieta Joffre Manuel, Redrovan Urea Jefferson Efrain 32/86

Pag.

Utilitarios I Informe de proyecto final


jLabel2.setFont(new java.awt.Font("DomCasual BT", 0, 48)); // NOI18N jLabel2.setText("Amor es sinonimo de odio?"); jButton1.setFont(new java.awt.Font("DomCasual BT", 0, 36)); // NOI18N jButton1.setText("Si"); jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } }); jButton2.setFont(new java.awt.Font("DomCasual BT", 0, 36)); // NOI18N jButton2.setText("No"); jButton2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton2ActionPerformed(evt); } }); jLabel3.setFont(new java.awt.Font("DomCasual BT", 0, 24)); // NOI18N jLabel3.setText("Su puntaje actual es:"); jTextPane1.setEditable(false); jTextPane1.setFont(new java.awt.Font("DomCasual BT", 0, 36)); // NOI18N jScrollPane1.setViewportView(jTextPane1); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addContainerGap() .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 301, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jButton2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGroup(jPanel1Layout.createSequentialGroup() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addGap(103, 103, 103) .addComponent(jLabel2)) .addGroup(jPanel1Layout.createSequentialGroup() .addContainerGap() .addComponent(jLabel3) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 66, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(jPanel1Layout.createSequentialGroup()

Autores: Ayala Mendieta Joffre Manuel, Redrovan Urea Jefferson Efrain 33/86

Pag.

Utilitarios I Informe de proyecto final


.addGap(216, 216, 216) .addComponent(jLabel1))) .addGap(0, 115, Short.MAX_VALUE))) .addContainerGap())

); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jLabel2) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 75, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 75, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel3) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 42, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap(21, Short.MAX_VALUE)) ); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) ); pack(); }// </editor-fold> private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) { cont=Integer.parseInt(jTextPane1.getText()); cont++;;// TODO add your handling code here:// TODO add your handling code here: preguntas4 cues4= new preguntas4(); cues4.jTextPane1.setText(String.valueOf(cont)); cues4.setVisible(true); this.dispose();// TODO add your handling code here: // TODO add your handling code here: }

Autores: Ayala Mendieta Joffre Manuel, Redrovan Urea Jefferson Efrain 34/86

Pag.

Utilitarios I Informe de proyecto final


private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) { cont=Integer.parseInt(jTextPane1.getText()); preguntas4 cues4= new preguntas4(); cues4.jTextPane1.setText(String.valueOf(cont)); cues4.setVisible(true); this.dispose(); // TODO add your handling code here: } /** * @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(preguntas3.class.getName()).log(java.util.logging.Level.SEV ERE, null, ex); } catch (InstantiationException ex) { java.util.logging.Logger.getLogger(preguntas3.class.getName()).log(java.util.logging.Level.SEV ERE, null, ex); } catch (IllegalAccessException ex) { java.util.logging.Logger.getLogger(preguntas3.class.getName()).log(java.util.logging.Level.SEV ERE, null, ex); } catch (javax.swing.UnsupportedLookAndFeelException ex) { java.util.logging.Logger.getLogger(preguntas3.class.getName()).log(java.util.logging.Level.SEV ERE, null, ex); } //</editor-fold> /* Create and display the form */ java.awt.EventQueue.invokeLater(new Runnable() { public void run() { new preguntas3().setVisible(true); } });

} // Variables declaration - do not modify

Autores: Ayala Mendieta Joffre Manuel, Redrovan Urea Jefferson Efrain 35/86

Pag.

Utilitarios I Informe de proyecto final


private javax.swing.JButton jButton1; private javax.swing.JButton jButton2; private javax.swing.JLabel jLabel1; private javax.swing.JLabel jLabel2; private javax.swing.JLabel jLabel3; private javax.swing.JPanel jPanel1; private javax.swing.JScrollPane jScrollPane1; public static javax.swing.JTextPane jTextPane1; // End of variables declaration }

Autores: Ayala Mendieta Joffre Manuel, Redrovan Urea Jefferson Efrain 36/86

Pag.

Utilitarios I Informe de proyecto final

preguntas4.java
Esta clase puede ser llamada unicamente por la clase preguntas3.java. Tiene por propsito desplegar la cuarta pregunta del cuestionario a realizarse. Esta clase, al igual que todas las clases que contiene preguntas en su nombre, cuenta con 2 botones: Si y No cualquiera de los 2 botones al ser presionados generan un evento. El botn Si general el cdigo de respuesta correcta (vea el cdigo private void jButton1ActionPerformed(java.awt.event.ActionEvent evt)).El botn No por su parte, genera el cdigo de respuesta incorrecta (vea el cdigo private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) ). Contiene tambin un jTextPane que tiene dos funciones: mostrar el puntaje actual (acumulador) y permitir importar el valor del acumulador de la clase preguntas1.java.

/* * To change this template, choose Tools | Templates * and open the template in the editor. */ /** * * @author Joffre Ayala y Jefferson Redrovan */ public class preguntas4 extends javax.swing.JFrame { int cont; /** * Creates new form preguntas4 */ public preguntas4() { initComponents(); } /** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code"> private void initComponents() { jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jButton1 = new javax.swing.JButton(); jButton2 = new javax.swing.JButton(); jLabel3 = new javax.swing.JLabel(); jScrollPane1 = new javax.swing.JScrollPane(); jTextPane1 = new javax.swing.JTextPane(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

Autores: Ayala Mendieta Joffre Manuel, Redrovan Urea Jefferson Efrain 37/86

Pag.

Utilitarios I Informe de proyecto final


jLabel1.setFont(new java.awt.Font("DomCasual BT", 0, 70)); // NOI18N jLabel1.setText("Sinonimo"); jLabel2.setFont(new java.awt.Font("DomCasual BT", 0, 48)); // NOI18N jLabel2.setText("Abjurar es sinonimo de renunciar?"); jButton1.setFont(new java.awt.Font("DomCasual BT", 0, 36)); // NOI18N jButton1.setText("Si"); jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } }); jButton2.setFont(new java.awt.Font("DomCasual BT", 0, 36)); // NOI18N jButton2.setText("No"); jButton2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton2ActionPerformed(evt); } }); jLabel3.setFont(new java.awt.Font("DomCasual BT", 0, 24)); // NOI18N jLabel3.setText("Su puntaje actual es:"); jTextPane1.setEditable(false); jTextPane1.setFont(new java.awt.Font("DomCasual BT", 0, 36)); // NOI18N jScrollPane1.setViewportView(jTextPane1); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(layout.createSequentialGroup() .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 301, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 301, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(layout.createSequentialGroup() .addComponent(jLabel3) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 61, javax.swing.GroupLayout.PREFERRED_SIZE)

Autores: Ayala Mendieta Joffre Manuel, Redrovan Urea Jefferson Efrain 38/86

Pag.

Utilitarios I Informe de proyecto final


.addGap(381, 381, 381)))) .addGroup(layout.createSequentialGroup() .addGap(216, 216, 216) .addComponent(jLabel1)) .addGroup(layout.createSequentialGroup() .addGap(58, 58, 58) .addComponent(jLabel2))) .addContainerGap(28, Short.MAX_VALUE))

); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 53, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(1, 1, 1) .addComponent(jLabel2) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(jButton2, javax.swing.GroupLayout.DEFAULT_SIZE, 75, Short.MAX_VALUE) .addComponent(jButton1, javax.swing.GroupLayout.DEFAULT_SIZE, 75, Short.MAX_VALUE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel3) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap(22, Short.MAX_VALUE)) ); pack(); }// </editor-fold> private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) { cont=Integer.parseInt(jTextPane1.getText()); preguntas5 cues5= new preguntas5(); cues5.jTextPane1.setText(String.valueOf(cont)); cues5.setVisible(true); this.dispose();// TODO add your handling code here: } private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) { cont=Integer.parseInt(jTextPane1.getText()); cont++;;// TODO add your handling code here:// TODO add your handling code here: preguntas5 cues5= new preguntas5(); cues5.jTextPane1.setText(String.valueOf(cont)); cues5.setVisible(true); this.dispose();// TODO add your handling code here: } /** * @param args the command line arguments

Autores: Ayala Mendieta Joffre Manuel, Redrovan Urea Jefferson Efrain 39/86

Pag.

Utilitarios I Informe de proyecto final


*/ 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(preguntas4.class.getName()).log(java.util.logging.Level.SEV ERE, null, ex); } catch (InstantiationException ex) { java.util.logging.Logger.getLogger(preguntas4.class.getName()).log(java.util.logging.Level.SEV ERE, null, ex); } catch (IllegalAccessException ex) { java.util.logging.Logger.getLogger(preguntas4.class.getName()).log(java.util.logging.Level.SEV ERE, null, ex); } catch (javax.swing.UnsupportedLookAndFeelException ex) { java.util.logging.Logger.getLogger(preguntas4.class.getName()).log(java.util.logging.Level.SEV ERE, null, ex); } //</editor-fold> /* Create and display the form */ java.awt.EventQueue.invokeLater(new Runnable() { public void run() { new preguntas4().setVisible(true); } });

} // Variables declaration - do not modify private javax.swing.JButton jButton1; private javax.swing.JButton jButton2; private javax.swing.JLabel jLabel1; private javax.swing.JLabel jLabel2; private javax.swing.JLabel jLabel3; private javax.swing.JScrollPane jScrollPane1; public static javax.swing.JTextPane jTextPane1; // End of variables declaration

Autores: Ayala Mendieta Joffre Manuel, Redrovan Urea Jefferson Efrain 40/86

Pag.

Utilitarios I Informe de proyecto final

preguntas5.java
Esta clase puede ser llamada unicamente por la clase preguntas4.java. Tiene por propsito desplegar la quinta pregunta del cuestionario a realizarse. Esta clase, al igual que todas las clases que contiene preguntas en su nombre, cuenta con 2 botones: Si y No cualquiera de los 2 botones al ser presionados generan un evento. El botn Si general el cdigo de respuesta incorrecta (vea el cdigo private void jButton1ActionPerformed(java.awt.event.ActionEvent evt)).El botn No por su parte, genera el cdigo de respuesta correcta (vea el cdigo private void jButton2ActionPerformed(java.awt.event.ActionEvent evt)). Contiene tambin un jTextPane que tiene dos funciones: mostrar el puntaje actual (acumulador) y permitir importar el valor del acumulador de la clase preguntas1.java.

/** * * @author Joffre Ayala y Jefferson Redrovan */ public class preguntas5 extends javax.swing.JFrame { int cont; /** * Creates new form preguntas5 */ public preguntas5() { initComponents(); } /** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code"> private void initComponents() { jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jButton1 = new javax.swing.JButton(); jButton2 = new javax.swing.JButton(); jLabel3 = new javax.swing.JLabel(); jScrollPane1 = new javax.swing.JScrollPane(); jTextPane1 = new javax.swing.JTextPane(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); jLabel1.setFont(new java.awt.Font("DomCasual BT", 0, 70)); // NOI18N jLabel1.setText("Antonimo");

Autores: Ayala Mendieta Joffre Manuel, Redrovan Urea Jefferson Efrain 41/86

Pag.

Utilitarios I Informe de proyecto final


jLabel2.setFont(new java.awt.Font("DomCasual BT", 0, 48)); // NOI18N jLabel2.setText("Procaz es antonimo de adocenado?"); jButton1.setFont(new java.awt.Font("DomCasual BT", 0, 36)); // NOI18N jButton1.setText("Si"); jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } }); jButton2.setFont(new java.awt.Font("DomCasual BT", 0, 36)); // NOI18N jButton2.setText("No"); jButton2.setToolTipText(""); jButton2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton2ActionPerformed(evt); } }); jLabel3.setFont(new java.awt.Font("DomCasual BT", 0, 24)); // NOI18N jLabel3.setText("Su puntaje actual es:"); jTextPane1.setEditable(false); jTextPane1.setFont(new java.awt.Font("DomCasual BT", 0, 36)); // NOI18N jScrollPane1.setViewportView(jTextPane1); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 301, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 301, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(layout.createSequentialGroup() .addGap(180, 180, 180) .addComponent(jLabel1)) .addGroup(layout.createSequentialGroup() .addGap(18, 18, 18) .addComponent(jLabel3) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 58, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(layout.createSequentialGroup() .addGap(26, 26, 26) .addComponent(jLabel2))) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))

Autores: Ayala Mendieta Joffre Manuel, Redrovan Urea Jefferson Efrain 42/86

Pag.

Utilitarios I Informe de proyecto final


); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jLabel2) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 75, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 75, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel3) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 42, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap(21, Short.MAX_VALUE)) ); pack(); }// </editor-fold> private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) { cont=Integer.parseInt(jTextPane1.getText()); cont++;;// TODO add your handling code here:// TODO add your handling code here: preguntas6 cues6= new preguntas6(); cues6.jTextPane1.setText(String.valueOf(cont)); cues6.setVisible(true); this.dispose();// TODO add your handling code here: } private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) { cont=Integer.parseInt(jTextPane1.getText()); preguntas6 cues6= new preguntas6(); cues6.jTextPane1.setText(String.valueOf(cont)); cues6.setVisible(true); this.dispose();// TODO add your handling code here: } /** * @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

Autores: Ayala Mendieta Joffre Manuel, Redrovan Urea Jefferson Efrain 43/86

Pag.

Utilitarios I Informe de proyecto final


*/ 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(preguntas5.class.getName()).log(java.util.logging.Level.SEV ERE, null, ex); } catch (InstantiationException ex) { java.util.logging.Logger.getLogger(preguntas5.class.getName()).log(java.util.logging.Level.SEV ERE, null, ex); } catch (IllegalAccessException ex) { java.util.logging.Logger.getLogger(preguntas5.class.getName()).log(java.util.logging.Level.SEV ERE, null, ex); } catch (javax.swing.UnsupportedLookAndFeelException ex) { java.util.logging.Logger.getLogger(preguntas5.class.getName()).log(java.util.logging.Level.SEV ERE, null, ex); } //</editor-fold> /* Create and display the form */ java.awt.EventQueue.invokeLater(new Runnable() { public void run() { new preguntas5().setVisible(true); } });

} // Variables declaration - do not modify private javax.swing.JButton jButton1; private javax.swing.JButton jButton2; private javax.swing.JLabel jLabel1; private javax.swing.JLabel jLabel2; private javax.swing.JLabel jLabel3; private javax.swing.JScrollPane jScrollPane1; public static javax.swing.JTextPane jTextPane1; // End of variables declaration

Autores: Ayala Mendieta Joffre Manuel, Redrovan Urea Jefferson Efrain 44/86

Pag.

Utilitarios I Informe de proyecto final

preguntas6.java
Esta clase puede ser llamada unicamente por la clase preguntas5.java. Tiene por propsito desplegar la sexta pregunta del cuestionario a realizarse. Esta clase, al igual que todas las clases que contiene preguntas en su nombre, cuenta con 2 botones: Si y No cualquiera de los 2 botones al ser presionados generan un evento. El botn Si general el cdigo de respuesta correcta (vea el cdigo private void jButton1ActionPerformed(java.awt.event.ActionEvent evt)).El botn No por su parte, genera el cdigo de respuesta incorrecta (vea el cdigo private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) ). Contiene tambin un jTextPane que tiene dos funciones: mostrar el puntaje actual (acumulador) y permitir importar el valor del acumulador de la clase preguntas1.java.

/* * To change this template, choose Tools | Templates * and open the template in the editor. */ /** * * @author Joffre Ayala y Jefferson Redrovan */ public class preguntas6 extends javax.swing.JFrame { int cont; /** * Creates new form preguntas6 */ public preguntas6() { initComponents(); } /** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code"> private void initComponents() { jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jButton1 = new javax.swing.JButton(); jButton2 = new javax.swing.JButton(); jLabel3 = new javax.swing.JLabel(); jScrollPane1 = new javax.swing.JScrollPane(); jTextPane1 = new javax.swing.JTextPane(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

Autores: Ayala Mendieta Joffre Manuel, Redrovan Urea Jefferson Efrain 45/86

Pag.

Utilitarios I Informe de proyecto final


jLabel1.setFont(new java.awt.Font("DomCasual BT", 0, 70)); // NOI18N jLabel1.setText("Sinonimo"); jLabel2.setFont(new java.awt.Font("DomCasual BT", 0, 48)); // NOI18N jLabel2.setText("Balad es sinonimo de futil?"); jButton1.setFont(new java.awt.Font("DomCasual BT", 0, 36)); // NOI18N jButton1.setText("Si"); jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } }); jButton2.setFont(new java.awt.Font("DomCasual BT", 0, 36)); // NOI18N jButton2.setText("No"); jButton2.setToolTipText(""); jButton2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton2ActionPerformed(evt); } }); jLabel3.setFont(new java.awt.Font("DomCasual BT", 0, 24)); // NOI18N jLabel3.setText("Su puntaje actual es:"); jTextPane1.setEditable(false); jTextPane1.setFont(new java.awt.Font("DomCasual BT", 0, 36)); // NOI18N jScrollPane1.setViewportView(jTextPane1); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 301, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 301, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(layout.createSequentialGroup() .addGap(68, 68, 68) .addComponent(jLabel2)) .addGroup(layout.createSequentialGroup() .addContainerGap() .addComponent(jLabel3) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE))

Autores: Ayala Mendieta Joffre Manuel, Redrovan Urea Jefferson Efrain 46/86

Pag.

Utilitarios I Informe de proyecto final


.addGroup(layout.createSequentialGroup() .addGap(195, 195, 195) .addComponent(jLabel1))) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))

); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 56, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jLabel2) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 75, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 75, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addComponent(jLabel3) .addGap(0, 30, Short.MAX_VALUE)) .addGroup(layout.createSequentialGroup() .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE) .addContainerGap()))) ); pack(); }// </editor-fold> private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) { cont=Integer.parseInt(jTextPane1.getText()); cont++;;// TODO add your handling code here:// TODO add your handling code here: preguntas7 cues7= new preguntas7(); cues7.jTextPane1.setText(String.valueOf(cont)); cues7.setVisible(true); this.dispose(); } private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) { cont=Integer.parseInt(jTextPane1.getText()); preguntas7 cues7= new preguntas7(); cues7.jTextPane1.setText(String.valueOf(cont)); cues7.setVisible(true); this.dispose(); } /** * @param args the command line arguments */

Autores: Ayala Mendieta Joffre Manuel, Redrovan Urea Jefferson Efrain 47/86

Pag.

Utilitarios I Informe de proyecto final


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(preguntas6.class.getName()).log(java.util.logging.Level.SEV ERE, null, ex); } catch (InstantiationException ex) { java.util.logging.Logger.getLogger(preguntas6.class.getName()).log(java.util.logging.Level.SEV ERE, null, ex); } catch (IllegalAccessException ex) { java.util.logging.Logger.getLogger(preguntas6.class.getName()).log(java.util.logging.Level.SEV ERE, null, ex); } catch (javax.swing.UnsupportedLookAndFeelException ex) { java.util.logging.Logger.getLogger(preguntas6.class.getName()).log(java.util.logging.Level.SEV ERE, null, ex); } //</editor-fold> /* Create and display the form */ java.awt.EventQueue.invokeLater(new Runnable() { public void run() { new preguntas6().setVisible(true); } }); } // Variables declaration - do not modify private javax.swing.JButton jButton1; private javax.swing.JButton jButton2; private javax.swing.JLabel jLabel1; private javax.swing.JLabel jLabel2; private javax.swing.JLabel jLabel3; private javax.swing.JScrollPane jScrollPane1; static javax.swing.JTextPane jTextPane1; // End of variables declaration }

Autores: Ayala Mendieta Joffre Manuel, Redrovan Urea Jefferson Efrain 48/86

Pag.

Utilitarios I Informe de proyecto final

Autores: Ayala Mendieta Joffre Manuel, Redrovan Urea Jefferson Efrain 49/86

Pag.

Utilitarios I Informe de proyecto final

preguntas7.java
Esta clase puede ser llamada unicamente por la clase preguntas6.java. Tiene por propsito desplegar la sptima pregunta del cuestionario a realizarse. Esta clase, al igual que todas las clases que contiene preguntas en su nombre, cuenta con 2 botones: Si y No cualquiera de los 2 botones al ser presionados generan un evento. El botn Si general el cdigo de respuesta correcta (vea el cdigo private void jButton1ActionPerformed(java.awt.event.ActionEvent evt)).El botn No por su parte, genera el cdigo de respuesta incorrecta (vea el cdigo private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) ). Contiene tambin un jTextPane que tiene dos funciones: mostrar el puntaje actual (acumulador) y permitir importar el valor del acumulador de la clase preguntas1.java. /* * To change this template, choose Tools | Templates * and open the template in the editor. */ /** * * @author Joffre Ayala y Jefferson Redrovan */ public class preguntas7 extends javax.swing.JFrame { int cont; /** * Creates new form preguntas7 */ public preguntas7() { initComponents(); } /** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code"> private void initComponents() { jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jButton1 = new javax.swing.JButton(); jButton2 = new javax.swing.JButton(); jLabel3 = new javax.swing.JLabel(); jScrollPane1 = new javax.swing.JScrollPane(); jTextPane1 = new javax.swing.JTextPane(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

Autores: Ayala Mendieta Joffre Manuel, Redrovan Urea Jefferson Efrain 50/86

Pag.

Utilitarios I Informe de proyecto final


jLabel1.setFont(new java.awt.Font("DomCasual BT", 0, 70)); // NOI18N jLabel1.setText("Sinonimo"); jLabel2.setFont(new java.awt.Font("DomCasual BT", 0, 48)); // NOI18N jLabel2.setText("Cfila es sinonimo de montn?"); jButton1.setFont(new java.awt.Font("DomCasual BT", 0, 36)); // NOI18N jButton1.setText("Si"); jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } }); jButton2.setFont(new java.awt.Font("DomCasual BT", 0, 36)); // NOI18N jButton2.setText("no"); jButton2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton2ActionPerformed(evt); } }); jLabel3.setFont(new java.awt.Font("DomCasual BT", 0, 24)); // NOI18N jLabel3.setText("Su puntaje actual es:"); jTextPane1.setEditable(false); jTextPane1.setFont(new java.awt.Font("DomCasual BT", 0, 36)); // NOI18N jScrollPane1.setViewportView(jTextPane1); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addComponent(jLabel3) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 56, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(layout.createSequentialGroup() .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 301, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 301, javax.swing.GroupLayout.PREFERRED_SIZE)))) .addGroup(layout.createSequentialGroup()

Autores: Ayala Mendieta Joffre Manuel, Redrovan Urea Jefferson Efrain 51/86

Pag.

Utilitarios I Informe de proyecto final


.addGap(195, 195, 195) .addComponent(jLabel1))) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addGap(0, 0, Short.MAX_VALUE) .addComponent(jLabel2) .addGap(73, 73, 73)) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 61, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(1, 1, 1) .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 75, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 75, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addComponent(jLabel3) .addGap(0, 29, Short.MAX_VALUE)) .addGroup(layout.createSequentialGroup() .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE) .addContainerGap()))) ); pack(); }// </editor-fold> private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) { cont=Integer.parseInt(jTextPane1.getText()); cont++;;// TODO add your handling code here:// TODO add your handling code here: preguntas8 cues8= new preguntas8(); cues8.jTextPane1.setText(String.valueOf(cont)); cues8.setVisible(true); this.dispose();// TODO add your handling code here: } private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) { cont=Integer.parseInt(jTextPane1.getText()); preguntas8 cues8= new preguntas8(); cues8.jTextPane1.setText(String.valueOf(cont)); cues8.setVisible(true); this.dispose();// TODO add your handling code here:

Autores: Ayala Mendieta Joffre Manuel, Redrovan Urea Jefferson Efrain 52/86

Pag.

Utilitarios I Informe de proyecto final


} /** * @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(preguntas7.class.getName()).log(java.util.logging.Level.SEV ERE, null, ex); } catch (InstantiationException ex) { java.util.logging.Logger.getLogger(preguntas7.class.getName()).log(java.util.logging.Level.SEV ERE, null, ex); } catch (IllegalAccessException ex) { java.util.logging.Logger.getLogger(preguntas7.class.getName()).log(java.util.logging.Level.SEV ERE, null, ex); } catch (javax.swing.UnsupportedLookAndFeelException ex) { java.util.logging.Logger.getLogger(preguntas7.class.getName()).log(java.util.logging.Level.SEV ERE, null, ex); } //</editor-fold> /* Create and display the form */ java.awt.EventQueue.invokeLater(new Runnable() { public void run() { new preguntas7().setVisible(true); } });

} // Variables declaration - do not modify private javax.swing.JButton jButton1; private javax.swing.JButton jButton2; private javax.swing.JLabel jLabel1; private javax.swing.JLabel jLabel2; private javax.swing.JLabel jLabel3; public static javax.swing.JScrollPane jScrollPane1;

Autores: Ayala Mendieta Joffre Manuel, Redrovan Urea Jefferson Efrain 53/86

Pag.

Utilitarios I Informe de proyecto final


public static javax.swing.JTextPane jTextPane1; // End of variables declaration

Autores: Ayala Mendieta Joffre Manuel, Redrovan Urea Jefferson Efrain 54/86

Pag.

Utilitarios I Informe de proyecto final

preguntas8.java
Esta clase puede ser llamada unicamente por la clase preguntas7.java. Tiene por propsito desplegar la octava pregunta del cuestionario a realizarse. Esta clase, al igual que todas las clases que contiene preguntas en su nombre, cuenta con 2 botones: Si y No cualquiera de los 2 botones al ser presionados generan un evento. El botn Si general el cdigo de respuesta incorrecta (vea el cdigo private void jButton1ActionPerformed(java.awt.event.ActionEvent evt)).El botn No por su parte, genera el cdigo de respuesta correcta (vea el cdigo private void jButton2ActionPerformed(java.awt.event.ActionEvent evt)). Contiene tambin un jTextPane que tiene dos funciones: mostrar el puntaje actual (acumulador) y permitir importar el valor del acumulador de la clase preguntas1.java. /* * To change this template, choose Tools | Templates * and open the template in the editor. */ /** * * @author Joffre Ayala y Jefferson Redrovan */ public class preguntas8 extends javax.swing.JFrame { int cont; /** * Creates new form preguntas8 */ public preguntas8() { initComponents(); } /** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code"> private void initComponents() { jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jButton1 = new javax.swing.JButton(); jButton2 = new javax.swing.JButton(); jLabel3 = new javax.swing.JLabel(); jScrollPane1 = new javax.swing.JScrollPane(); jTextPane1 = new javax.swing.JTextPane(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

Autores: Ayala Mendieta Joffre Manuel, Redrovan Urea Jefferson Efrain 55/86

Pag.

Utilitarios I Informe de proyecto final


jLabel1.setFont(new java.awt.Font("DomCasual BT", 0, 70)); // NOI18N jLabel1.setText("Antonimo"); jLabel2.setFont(new java.awt.Font("DomCasual BT", 0, 48)); // NOI18N jLabel2.setText("Glorificacin es antonimo de apoteosis?"); jButton1.setFont(new java.awt.Font("DomCasual BT", 0, 36)); // NOI18N jButton1.setText("Si"); jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } }); jButton2.setFont(new java.awt.Font("DomCasual BT", 0, 36)); // NOI18N jButton2.setText("No"); jButton2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton2ActionPerformed(evt); } }); jLabel3.setFont(new java.awt.Font("DomCasual BT", 0, 24)); // NOI18N jLabel3.setText("Su puntaje actual es:"); jTextPane1.setFont(new java.awt.Font("DomCasual BT", 0, 36)); // NOI18N jScrollPane1.setViewportView(jTextPane1); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 301, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 301, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(layout.createSequentialGroup() .addGap(230, 230, 230) .addComponent(jLabel1)) .addComponent(jLabel2) .addGroup(layout.createSequentialGroup() .addComponent(jLabel3) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE))) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); layout.setVerticalGroup(

Autores: Ayala Mendieta Joffre Manuel, Redrovan Urea Jefferson Efrain 56/86

Pag.

Utilitarios I Informe de proyecto final


layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 74, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jLabel2) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 75, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 75, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel3) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 48, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); pack(); }// </editor-fold> private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) { cont=Integer.parseInt(jTextPane1.getText()); cont++;;// TODO add your handling code here:// TODO add your handling code here: preguntas9 cues9= new preguntas9(); cues9.jTextPane1.setText(String.valueOf(cont)); cues9.setVisible(true); this.dispose();// TODO add your handling code here: } private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) { cont=Integer.parseInt(jTextPane1.getText()); preguntas9 cues9= new preguntas9(); cues9.jTextPane1.setText(String.valueOf(cont)); cues9.setVisible(true); this.dispose();// TODO add your handling code here: } /** * @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 {

Autores: Ayala Mendieta Joffre Manuel, Redrovan Urea Jefferson Efrain 57/86

Pag.

Utilitarios I Informe de proyecto final


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(preguntas8.class.getName()).log(java.util.logging.Level.SEV ERE, null, ex); } catch (InstantiationException ex) { java.util.logging.Logger.getLogger(preguntas8.class.getName()).log(java.util.logging.Level.SEV ERE, null, ex); } catch (IllegalAccessException ex) { java.util.logging.Logger.getLogger(preguntas8.class.getName()).log(java.util.logging.Level.SEV ERE, null, ex); } catch (javax.swing.UnsupportedLookAndFeelException ex) { java.util.logging.Logger.getLogger(preguntas8.class.getName()).log(java.util.logging.Level.SEV ERE, null, ex); } //</editor-fold> /* Create and display the form */ java.awt.EventQueue.invokeLater(new Runnable() { public void run() { new preguntas8().setVisible(true); } });

} // Variables declaration - do not modify private javax.swing.JButton jButton1; private javax.swing.JButton jButton2; private javax.swing.JLabel jLabel1; private javax.swing.JLabel jLabel2; private javax.swing.JLabel jLabel3; private javax.swing.JScrollPane jScrollPane1; public static javax.swing.JTextPane jTextPane1; // End of variables declaration

Autores: Ayala Mendieta Joffre Manuel, Redrovan Urea Jefferson Efrain 58/86

Pag.

Utilitarios I Informe de proyecto final

preguntas9.java
Esta clase puede ser llamada unicamente por la clase preguntas8.java. Tiene por propsito desplegar la novena pregunta del cuestionario a realizarse. Esta clase, al igual que todas las clases que contiene preguntas en su nombre, cuenta con 2 botones: Si y No cualquiera de los 2 botones al ser presionados generan un evento. El botn Si general el cdigo de respuesta correcta (vea el cdigo private void jButton1ActionPerformed(java.awt.event.ActionEvent evt)).El botn No por su parte, genera el cdigo de respuesta incorrecta (vea el cdigo private void jButton2ActionPerformed(java.awt.event.ActionEvent evt)). Contiene tambin un jTextPane que tiene dos funciones: mostrar el puntaje actual (acumulador) y permitir importar el valor del acumulador de la clase preguntas1.java. /* * To change this template, choose Tools | Templates * and open the template in the editor. */ /** * * @author Joffre Ayala y Jefferson Redrovan */ public class preguntas9 extends javax.swing.JFrame { int cont; /** * Creates new form preguntas9 */ public preguntas9() { initComponents(); } /** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code"> private void initComponents() { jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jButton1 = new javax.swing.JButton(); jButton2 = new javax.swing.JButton(); jLabel3 = new javax.swing.JLabel(); jScrollPane1 = new javax.swing.JScrollPane(); jTextPane1 = new javax.swing.JTextPane(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

Autores: Ayala Mendieta Joffre Manuel, Redrovan Urea Jefferson Efrain 59/86

Pag.

Utilitarios I Informe de proyecto final


jLabel1.setFont(new java.awt.Font("DomCasual BT", 0, 70)); // NOI18N jLabel1.setText("Sinonimo"); jLabel2.setFont(new java.awt.Font("DomCasual BT", 0, 48)); // NOI18N jLabel2.setText("Abolengo es sinonimo de alcurnia?"); jButton1.setFont(new java.awt.Font("DomCasual BT", 0, 36)); // NOI18N jButton1.setText("Si"); jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } }); jButton2.setFont(new java.awt.Font("DomCasual BT", 0, 36)); // NOI18N jButton2.setText("No"); jButton2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton2ActionPerformed(evt); } }); jLabel3.setFont(new java.awt.Font("DomCasual BT", 0, 24)); // NOI18N jLabel3.setText("Su puntaje actual es:"); jTextPane1.setEditable(false); jTextPane1.setFont(new java.awt.Font("DomCasual BT", 0, 36)); // NOI18N jScrollPane1.setViewportView(jTextPane1); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 301, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 301, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(layout.createSequentialGroup() .addComponent(jLabel3) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE))))

Autores: Ayala Mendieta Joffre Manuel, Redrovan Urea Jefferson Efrain 60/86

Pag.

Utilitarios I Informe de proyecto final


.addGroup(layout.createSequentialGroup() .addGap(195, 195, 195) .addComponent(jLabel1)) .addGroup(layout.createSequentialGroup() .addGap(44, 44, 44) .addComponent(jLabel2))) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 58, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addComponent(jLabel2) .addGap(22, 22, 22) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 75, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 75, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel3) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 42, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(0, 15, Short.MAX_VALUE)) ); pack(); }// </editor-fold> private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) { cont=Integer.parseInt(jTextPane1.getText()); cont++;;// TODO add your handling code here:// TODO add your handling code here: preguntas10 cues10= new preguntas10(); cues10.jTextPane1.setText(String.valueOf(cont)); cues10.setVisible(true); this.dispose(); // TODO add your handling code here: } private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) { cont=Integer.parseInt(jTextPane1.getText()); preguntas10 cues10= new preguntas10(); cues10.jTextPane1.setText(String.valueOf(cont)); cues10.setVisible(true); this.dispose();// TODO add your handling code here: } /** * @param args the command line arguments */

Autores: Ayala Mendieta Joffre Manuel, Redrovan Urea Jefferson Efrain 61/86

Pag.

Utilitarios I Informe de proyecto final


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(preguntas9.class.getName()).log(java.util.logging.Level.SEV ERE, null, ex); } catch (InstantiationException ex) { java.util.logging.Logger.getLogger(preguntas9.class.getName()).log(java.util.logging.Level.SEV ERE, null, ex); } catch (IllegalAccessException ex) { java.util.logging.Logger.getLogger(preguntas9.class.getName()).log(java.util.logging.Level.SEV ERE, null, ex); } catch (javax.swing.UnsupportedLookAndFeelException ex) { java.util.logging.Logger.getLogger(preguntas9.class.getName()).log(java.util.logging.Level.SEV ERE, null, ex); } //</editor-fold> /* Create and display the form */ java.awt.EventQueue.invokeLater(new Runnable() { public void run() { new preguntas9().setVisible(true); } }); } // Variables declaration - do not modify private javax.swing.JButton jButton1; private javax.swing.JButton jButton2; private javax.swing.JLabel jLabel1; private javax.swing.JLabel jLabel2; private javax.swing.JLabel jLabel3; private javax.swing.JScrollPane jScrollPane1; public static javax.swing.JTextPane jTextPane1; // End of variables declaration }

Autores: Ayala Mendieta Joffre Manuel, Redrovan Urea Jefferson Efrain 62/86

Pag.

Utilitarios I Informe de proyecto final

Autores: Ayala Mendieta Joffre Manuel, Redrovan Urea Jefferson Efrain 63/86

Pag.

Utilitarios I Informe de proyecto final

preguntas10.java
Esta clase puede ser llamada unicamente por la clase preguntas9.java. Tiene por propsito desplegar la decima y ultima pregunta del cuestionario a realizarse. Esta clase, al igual que todas las clases que contiene preguntas en su nombre, cuenta con 2 botones: Si y No cualquiera de los 2 botones al ser presionados generan un evento. El botn Si general el cdigo de respuesta correcta (vea el cdigo private void jButton1ActionPerformed(java.awt.event.ActionEvent evt)).El botn No por su parte, genera el cdigo de respuesta incorrecta (vea el cdigo private void jButton2ActionPerformed(java.awt.event.ActionEvent evt)). Contiene tambin un jTextPane que tiene dos funciones: mostrar el puntaje actual (acumulador) y permitir importar el valor del acumulador de la clase preguntas1.java. /* * To change this template, choose Tools | Templates * and open the template in the editor. */ /** * * @author Joffre Ayala y Jefferson Redrovan */ public class preguntas10 extends javax.swing.JFrame { int cont; /** * Creates new form preguntas10 */ public preguntas10() { initComponents(); } /** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code"> private void initComponents() { jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jButton1 = new javax.swing.JButton(); jButton2 = new javax.swing.JButton(); jLabel3 = new javax.swing.JLabel(); jScrollPane1 = new javax.swing.JScrollPane(); jTextPane1 = new javax.swing.JTextPane(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

Autores: Ayala Mendieta Joffre Manuel, Redrovan Urea Jefferson Efrain 64/86

Pag.

Utilitarios I Informe de proyecto final


jLabel1.setFont(new java.awt.Font("DomCasual BT", 0, 70)); // NOI18N jLabel1.setText("Antonimo"); jLabel2.setFont(new java.awt.Font("DomCasual BT", 0, 48)); // NOI18N jLabel2.setText("Absorto es antonimo de impvido?"); jButton1.setFont(new java.awt.Font("DomCasual BT", 0, 36)); // NOI18N jButton1.setText("Si"); jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } }); jButton2.setFont(new java.awt.Font("DomCasual BT", 0, 36)); // NOI18N jButton2.setText("No"); jButton2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton2ActionPerformed(evt); } }); jLabel3.setFont(new java.awt.Font("DomCasual BT", 0, 24)); // NOI18N jLabel3.setText("Su puntaje actual es:"); jTextPane1.setEditable(false); jTextPane1.setFont(new java.awt.Font("DomCasual BT", 0, 36)); // NOI18N jScrollPane1.setViewportView(jTextPane1); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup() .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 301, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 301, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup() .addComponent(jLabel3) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jScrollPane1,

Autores: Ayala Mendieta Joffre Manuel, Redrovan Urea Jefferson Efrain 65/86

Pag.

Utilitarios I Informe de proyecto final


javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)))) .addGroup(layout.createSequentialGroup() .addGap(204, 204, 204) .addComponent(jLabel1))) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addGap(0, 0, Short.MAX_VALUE) .addComponent(jLabel2) .addGap(44, 44, 44)) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addComponent(jLabel1) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jLabel2) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 75, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 75, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel3) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(0, 8, Short.MAX_VALUE)) ); pack(); }// </editor-fold> private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) { cont=Integer.parseInt(jTextPane1.getText()); cont++;;// TODO add your handling code here:// TODO add your handling code here: resulatdo res= new resulatdo(); if(cont<7){ res.jLabel1.setText("Es una lastima"); } else{ res.jLabel1.setText("FELICIDADES!"); } res.jLabel3.setText(String.valueOf(cont)); res.setVisible(true); this.dispose();// TODO add your handling code here: } private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) { cont=Integer.parseInt(jTextPane1.getText());

Autores: Ayala Mendieta Joffre Manuel, Redrovan Urea Jefferson Efrain 66/86

Pag.

Utilitarios I Informe de proyecto final


resulatdo res= new resulatdo(); if(cont<7){ res.jLabel1.setText("Es una lastima"); } else{ res.jLabel1.setText("FELICIDADES!"); } res.jLabel3.setText(String.valueOf(cont)); res.setVisible(true); this.dispose();// TODO add your handling code here:

/** * @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(preguntas10.class.getName()).log(java.util.logging.Level.SE VERE, null, ex); } catch (InstantiationException ex) { java.util.logging.Logger.getLogger(preguntas10.class.getName()).log(java.util.logging.Level.SE VERE, null, ex); } catch (IllegalAccessException ex) { java.util.logging.Logger.getLogger(preguntas10.class.getName()).log(java.util.logging.Level.SE VERE, null, ex); } catch (javax.swing.UnsupportedLookAndFeelException ex) { java.util.logging.Logger.getLogger(preguntas10.class.getName()).log(java.util.logging.Level.SE VERE, null, ex); } //</editor-fold> /* Create and display the form */ java.awt.EventQueue.invokeLater(new Runnable() { public void run() { new preguntas10().setVisible(true);

Autores: Ayala Mendieta Joffre Manuel, Redrovan Urea Jefferson Efrain 67/86

Pag.

Utilitarios I Informe de proyecto final


} });

} // Variables declaration - do not modify private javax.swing.JButton jButton1; private javax.swing.JButton jButton2; private javax.swing.JLabel jLabel1; private javax.swing.JLabel jLabel2; private javax.swing.JLabel jLabel3; public static javax.swing.JScrollPane jScrollPane1; public static javax.swing.JTextPane jTextPane1; // End of variables declaration

Autores: Ayala Mendieta Joffre Manuel, Redrovan Urea Jefferson Efrain 68/86

Pag.

Utilitarios I Informe de proyecto final

resulatdo.java
Esta clase puede ser llamada unicamente por la clase preguntas10.java. Tiene por propsito desplegar el puntaje final obtenido por el usuario y desplegar los botones: volver a a intentar y salir. Posee tambin un jLabel que esta condicionada al puntaje, si este es mayor o igual a 7 desplegara FELICIDADES, si es menor a 7 desplegara es una lastima En caso de ser presionado el botn volver a intentar se creara un nuevo objeto con la clase presentacion.java. Y al presionar salir se realizara un dispose, terminando as con la ejecucin del programa. /* * To change this template, choose Tools | Templates * and open the template in the editor. */ /** * * @author Joffre Ayala y Jefferson Redrovan */ public class resulatdo extends javax.swing.JFrame { /** * Creates new form resulatdo */ public resulatdo() { initComponents(); } /** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code"> private void initComponents() { jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); jButton1 = new javax.swing.JButton(); jButton2 = new javax.swing.JButton(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); jLabel1.setFont(new java.awt.Font("DomCasual BT", 0, 100)); // NOI18N jLabel1.setForeground(new java.awt.Color(153, 0, 0)); jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jLabel1.setText("jLabel1"); jLabel1.setVerticalTextPosition(javax.swing.SwingConstants.TOP);

Autores: Ayala Mendieta Joffre Manuel, Redrovan Urea Jefferson Efrain 69/86

Pag.

Utilitarios I Informe de proyecto final


jLabel2.setFont(new java.awt.Font("DomCasual BT", 0, 48)); // NOI18N jLabel2.setText("Su puntaje final es:"); jLabel3.setFont(new java.awt.Font("DomCasual BT", 0, 48)); // NOI18N jLabel3.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jLabel3.setText("jLabel3"); jButton1.setFont(new java.awt.Font("DomCasual BT", 0, 48)); // NOI18N jButton1.setText("Volver a intentar"); jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } }); jButton2.setFont(new java.awt.Font("DomCasual BT", 0, 48)); // NOI18N jButton2.setText("Salir"); jButton2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton2ActionPerformed(evt); } }); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGroup(layout.createSequentialGroup() .addGap(39, 39, 39) .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 319, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 238, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(0, 52, Short.MAX_VALUE)) .addGroup(layout.createSequentialGroup() .addContainerGap() .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 340, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jButton2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))) .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

Autores: Ayala Mendieta Joffre Manuel, Redrovan Urea Jefferson Efrain 70/86

Pag.

Utilitarios I Informe de proyecto final


.addGroup(layout.createSequentialGroup() .addGap(4, 4, 4) .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 99, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)) .addGap(18, 18, 18) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jButton1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jButton2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addContainerGap()) ); pack(); }// </editor-fold> private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) { presentacion pres= new presentacion(); pres.setVisible(true); this.dispose();// TODO add your handling code here: } private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) { this.dispose();// TODO add your handling code here: } /** * @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) {

Autores: Ayala Mendieta Joffre Manuel, Redrovan Urea Jefferson Efrain 71/86

Pag.

Utilitarios I Informe de proyecto final


java.util.logging.Logger.getLogger(resulatdo.class.getName()).log(java.util.logging.Level.SEVE RE, null, ex); } catch (InstantiationException ex) { java.util.logging.Logger.getLogger(resulatdo.class.getName()).log(java.util.logging.Level.SEVE RE, null, ex); } catch (IllegalAccessException ex) { java.util.logging.Logger.getLogger(resulatdo.class.getName()).log(java.util.logging.Level.SEVE RE, null, ex); } catch (javax.swing.UnsupportedLookAndFeelException ex) { java.util.logging.Logger.getLogger(resulatdo.class.getName()).log(java.util.logging.Level.SEVE RE, null, ex); } //</editor-fold> /* Create and display the form */ java.awt.EventQueue.invokeLater(new Runnable() { public void run() { new resulatdo().setVisible(true); } });

} // Variables declaration - do not modify private javax.swing.JButton jButton1; private javax.swing.JButton jButton2; public static javax.swing.JLabel jLabel1; private javax.swing.JLabel jLabel2; public static javax.swing.JLabel jLabel3; // End of variables declaration

Autores: Ayala Mendieta Joffre Manuel, Redrovan Urea Jefferson Efrain 72/86

Pag.

Utilitarios I Informe de proyecto final

5.2 Anlisis de resultados


Dada la forma y simpleza del programa existe una probabilidad casi nula para la aparicin de bugs. Y como se dijo anteriormente el jLabel de la clase presentacion.java esta condicionado desplegando dependiendo del resultado los siguientes mensajes: Cuadro de resultados del condicional desplegado en resulatdo.java Nota Mensaje desplegado 1 2 3 4 5 6 7 8 9 10 Es una lastima FELICIDADES!

Tabla 1: Resultados del condicional


Ante la falta de inters de la poblacin en el lengua y literatura diseamos una aplicacin en Javascript que incentive a la poblacin al aprendizaje y ampliacin de su vocabulario mediante el uso de sinnimos y antnimos. La interfaz fue diseada en Netbeans y cuenta con 14 clases: 1. juego(main) Es la clase en la que se crea el primer objeto. 2. Ayuda clase en la que se despliega una pequea explicacion de lo que son sinonimos y antonimos.

Fig 1: Ayuda
3. Prestentacion clase en la que se despliega el menu principal de la aplicacin

Autores: Ayala Mendieta Joffre Manuel, Redrovan Urea Jefferson Efrain 73/86

Pag.

Utilitarios I Informe de proyecto final

Autores: Ayala Mendieta Joffre Manuel, Redrovan Urea Jefferson Efrain 74/86

Pag.

Utilitarios I Informe de proyecto final

Autores: Ayala Mendieta Joffre Manuel, Redrovan Urea Jefferson Efrain 75/86

Pag.

Utilitarios I Informe de proyecto final

Autores: Ayala Mendieta Joffre Manuel, Redrovan Urea Jefferson Efrain 76/86

Pag.

Utilitarios I Informe de proyecto final

Fig 2: Presentacin
4. preguntas1 clase en la que se despliega la primera pregunta del cuestionario

Fig 3: Preguntas1
5. preguntas2 clase en la que se despliega la segunda pregunta del cuestionario

Fig 4: Preguntas2
6. preguntas3 clase en la que se despliega la tercera pregunta del cuestionario

Autores: Ayala Mendieta Joffre Manuel, Redrovan Urea Jefferson Efrain 77/86

Pag.

Utilitarios I Informe de proyecto final

Fig 5: Preguntas3
7. preguntas4 clase en la que se despliega la cuarta pregunta del cuestionario

Fig 6: preguntas4
8. preguntas5 clase en la que se despliega la quinta pregunta del cuestionario

Fig 7: Preguntas5
9. preguntas6 clase en la que se despliega la sexta pregunta del cuestionario

Fig 8: Preguntas6
10.preguntas7 clase en la que se despliega la sptima pregunta del cuestionario

Autores: Ayala Mendieta Joffre Manuel, Redrovan Urea Jefferson Efrain 78/86

Pag.

Utilitarios I Informe de proyecto final

Fig 9: Preguntas7
11.preguntas8 clase en la que se despliega la octava pregunta del cuestionario

Fig 10: Preguntas8


12.preguntas9 clase en la que se despliega la novena pregunta del cuestionario

Fig 11: Preguntas9


13.preguntas10 clase en la que se despliega la dcima pregunta del cuestionario

Autores: Ayala Mendieta Joffre Manuel, Redrovan Urea Jefferson Efrain 79/86

Pag.

Utilitarios I Informe de proyecto final

Fig 12: Preguntas10


14.resulatdo clase en la que se despliega el puntaje final obtenido por el usuario

Fig 13: Resultado mayor o igual a 7

Fig 14: Resultado menor a 7

Autores: Ayala Mendieta Joffre Manuel, Redrovan Urea Jefferson Efrain 80/86

Pag.

Utilitarios I Informe de proyecto final

6 CONCLUSIONES
Con un correcto uso de la tecnologa se puede incentivar apropiadamente a la poblacin en general a mejorar y aumentar su vocabulario para que de esta manera puedan desenvolverse mejor en sus actividades. El programa debe contener clases que realicen preguntas, una clase por pregunta. La interfaz debe ser lo mas simple y sencilla posible, de esta manera logramos un entorno minimalista que no sature a los usuarios al ser utilizado. Para lograr exportar e importar la variable de acumulacin, esta variable y el lugar donde va a ir deben ser de tipo Public Static. La mejor presentacin posible es la minimalista por que genera en los usuarios una sensacin de sencillez y le brinda seguridad. El blog debe contener una explicacin del juego y promover sus puntos mas fuertes para hacer que los usuarios se interesen. Al publicar el cdigo fuente en Internet se abre la posibilidad de mejoras lo que garantiza la supervivencia del programa con el pasar del tiempo.

Autores: Ayala Mendieta Joffre Manuel, Redrovan Urea Jefferson Efrain 81/86

Pag.

Utilitarios I Informe de proyecto final

7 RECOMENDACIONES
Para poder encontrar la manera correcta de como usar la tecnologa a nuestro favor en la enseanza se debe realizar una consulta sobre que puntos interesan a los estudiantes para usarlos a nuestro favor en el diseo y lograr llamar la atencin de los usuarios. Se debe realizar una clase por pregunta para facilitar la creacin y eliminacin de objetos para lograr una interfaz simple debemos eliminar todo lo que no sea completamente necesario para el juego, es decir, dejar solamente lo bsico para evitar confusiones la variable de acumulacin debe ser exportada por la clase predecesora tras crearse el nuevo objeto y luego el objeto predecesor debe ser eliminado para no malgastar recursos. La presentacin es importante para evitar confusiones en el usuario, as que se debe eliminar todo lo que pueda causar confusin al realizar el blog se debe realizar una presentacin bsica del programa que exalte sus puntos fuertes y beneficios. Para esto podemos usar capturas de pantalla del juego. Al colocar el cdigo fuente en Internet lo dejas abierto a la disposicin total de los usuarios, la mejor manera de publicar el cdigo es un archivo comprimido almacenado en la nube.

Autores: Ayala Mendieta Joffre Manuel, Redrovan Urea Jefferson Efrain 82/86

Pag.

Utilitarios I Informe de proyecto final

8 REFERENCIAS BIBLIOGRFICAS
Bibliografa
A1: Euroresidentes Ityis Siglo XXI, (2008).Cmo motivar a un alumno: COMO ESTUDIAR(http://como-estudiar.estudiantes.info/2008/03/cmo-motivar-unalumno.html). A2: Alberto Calle, (2001).Importancia de una buena interfaz: albertolacalle(http://albertolacalle.com/hci/interfaz.htm). A3: Autor Desconocido, (Ao Desconocido).Creacin de Nuevos Objetos y Matrices: geneura.ugr.es(http://geneura.ugr.es/~victor/cursillos/curso_javascript_basico /js_objetos.html). A4: Desconocido, (Ao desconocido).Convertir String a int en Java y viceversa: novanebula(http://www.novanebula.net/blog/archives/142-Convertir-String-aint-en-Java-y-viceversa.html).

Autores: Ayala Mendieta Joffre Manuel, Redrovan Urea Jefferson Efrain 83/86

Pag.

Utilitarios I Informe de proyecto final

INDICES
ndice de contenido
1 JUSTIFICACIN ..................................................................................2 2 OBJETIVOS ........................................................................................3 2.1Objetivo General ............................................................................3 2.2Objetivos Especficos ......................................................................3 3ANTECEDENTES ...................................................................................4 4 MARCO TERICO ................................................................................5 INTERFAZ..........................................................................................8 Por qu es importante la interfaz?........................................................8 Escritura del cdigo.............................................................................9 5MARCO METODOLGICO .....................................................................12 5.1Clases utilizadas en el programa.....................................................12 Juego.java(clase princpal[main])......................................................12 Ayuda.java....................................................................................13 Presentacion.java...........................................................................17 Preguntas1.java.............................................................................21 preguntas2.java.............................................................................26 preguntas3.java.............................................................................31 preguntas4.java.............................................................................36 preguntas5.java.............................................................................40 preguntas6.java.............................................................................44 preguntas7.java.............................................................................48 preguntas8.java.............................................................................52 preguntas9.java.............................................................................56 preguntas10.java...........................................................................60 resulatdo.java................................................................................65 5.2Anlisis de resultados ...................................................................69 6CONCLUSIONES .................................................................................73 7RECOMENDACIONES ..........................................................................74 8REFERENCIAS BIBLIOGRFICAS ...........................................................75 INDICES..............................................................................................76 AUTORA: ...........................................................................................78

ndice de ilustraciones
Fig Fig Fig Fig Fig Fig 1: 2: 3: 4: 5: 6:

Ayuda........................................................................................70 Presentacin...............................................................................70 Preguntas1.................................................................................71 Preguntas2.................................................................................71 Preguntas3.................................................................................71 preguntas4.................................................................................71 Pag.

Autores: Ayala Mendieta Joffre Manuel, Redrovan Urea Jefferson Efrain 84/86

Utilitarios I Informe de proyecto final Fig Fig Fig Fig Fig Fig Fig Fig 7: Preguntas5.................................................................................72 8: Preguntas6.................................................................................72 9: Preguntas7.................................................................................72 10: Preguntas8...............................................................................72 11: Preguntas9...............................................................................73 12: Preguntas10..............................................................................73 13: Resultado mayor o igual a 7........................................................73 14: Resultado menor a 7..................................................................73

ndice de tablas

Tabla 1: Resultados del condicional..........................................................70

Autores: Ayala Mendieta Joffre Manuel, Redrovan Urea Jefferson Efrain 85/86

Pag.

Utilitarios I Informe de proyecto final

AUTORA:

Nosotros, Ayala Mendieta Joffre Manuel y Redrovan Urea Jefferson Efrain, como autores del presente trabajo de investigacin, somos responsables de las ideas, conceptos, procedimientos y resultados vertidos en la misma.

f. Ayala Mendieta Joffre Manuel C.I.: 0704877638

f. Redrovan Urea Jefferson Efrain C.I.: 0706585205

Autores: Ayala Mendieta Joffre Manuel, Redrovan Urea Jefferson Efrain 86/86

Pag.

Vous aimerez peut-être aussi