SlideShare a Scribd company logo
1 of 40
PONTIFICIA UNIVERSIDAD CATÓLICA DEL
ECUADOR SEDE IBARRA
Nombre: Liliana Chisaguano
Nivel: 5to semestre
Carrera: Ingeniería en Sistemas
Fecha: 21/04/2017
Investigación Ensambladores y Decompiladores
 INSTALACIÓN VISUAL BASIC DECOMPILER LITE
DECOMPILACIÓN DE CALCULADORA EN VISUAL BASIC DECOMPILER LITE
CODIGO:
Begin VB.Form Form1
Caption = "Calculadora by marco"
ScaleMode = 1
AutoRedraw = False
FontTransparent = True
BorderStyle = 4 'Fixed ToolWindow
'Icon = n/a
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ClientLeft = 45
ClientTop = 285
ClientWidth = 3975
ClientHeight = 3195
ShowInTaskbar = 0 'False
StartUpPosition = 3 'Windows Default
Begin CommandButton salir
Caption = "Salir"
Left = 2160
Top = 2520
Width = 1695
Height = 495
TabIndex = 11
End
Begin CommandButton new
Caption = "Nuevo calculo"
Left = 120
Top = 2520
Width = 1695
Height = 495
TabIndex = 10
End
Begin CommandButton dividir
Caption = "/"
Left = 3240
Top = 1800
Width = 615
Height = 495
TabIndex = 9
BeginProperty Font
Name = "MS Sans Serif"
Size = 13,5
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin CommandButton por
Caption = "x"
Left = 2160
Top = 1800
Width = 615
Height = 495
TabIndex = 8
BeginProperty Font
Name = "MS Sans Serif"
Size = 13,5
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin CommandButton restar
Caption = "-"
Left = 1200
Top = 1800
Width = 615
Height = 495
TabIndex = 7
BeginProperty Font
Name = "MS Sans Serif"
Size = 13,5
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin CommandButton sumar
Caption = "+"
Left = 120
Top = 1800
Width = 615
Height = 495
TabIndex = 6
BeginProperty Font
Name = "MS Sans Serif"
Size = 13,5
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin TextBox res
Left = 1680
Top = 1080
Width = 1215
Height = 405
TabIndex = 5
BeginProperty Font
Name = "MS Sans Serif"
Size = 9,75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin TextBox can2
Left = 1680
Top = 600
Width = 1215
Height = 405
TabIndex = 4
BeginProperty Font
Name = "MS Sans Serif"
Size = 9,75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin TextBox can1
Left = 1680
Top = 120
Width = 1215
Height = 405
TabIndex = 3
BeginProperty Font
Name = "MS Sans Serif"
Size = 9,75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin Label Label3
Caption = "Resultado"
Left = 240
Top = 1200
Width = 1095
Height = 255
TabIndex = 2
BeginProperty Font
Name = "MS Sans Serif"
Size = 9,75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin Label Label2
Caption = "Cantidad2"
Left = 240
Top = 720
Width = 1095
Height = 615
TabIndex = 1
BeginProperty Font
Name = "MS Sans Serif"
Size = 9,75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin Label Label1
Caption = "Cantidad1"
Left = 240
Top = 240
Width = 1215
Height = 495
TabIndex = 0
BeginProperty Font
Name = "MS Sans Serif"
Size = 9,75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
End
Attribute VB_Name = "Form1"
DECOMPILACION DIRTEL EN VISUAL BASIC DECOMPILER LITE
CODIGO:
Begin VB.Form Form1
Caption = "Directorio Telefónico - Autor: Edison Morales"
BackColor = &H808000&
ScaleMode = 1
AutoRedraw = False
FontTransparent = True
BorderStyle = 0 'None
Icon = "Form1.frx":0
LinkTopic = "Form1"
MaxButton = 0 'False
ClientLeft = 150
ClientTop = 435
ClientWidth = 7425
ClientHeight = 5700
StartUpPosition = 2 'CenterScreen
Begin ProgressBar Progreso
Left = 1200
Top = 5280
Width = 4815
Height = 255
Visible = 0 'False
TabIndex = 27
End
Begin CommonDialog Dialogo
End
Begin CommandButton cmdUltimo
Left = 2160
Top = 4680
Width = 615
Height = 495
TabIndex = 24
Picture = "Form1.frx":44A
ToolTipText = "Ultimo"
MaskColor = &H808080&
Style = 1
End
Begin CommandButton cmdSiguiente
Left = 1560
Top = 4680
Width = 615
Height = 495
TabIndex = 23
Picture = "Form1.frx":5BC
ToolTipText = "Siguiente"
MaskColor = &H808080&
Style = 1
End
Begin CommandButton cmdAnterior
Left = 960
Top = 4680
Width = 615
Height = 495
TabIndex = 22
Picture = "Form1.frx":72E
ToolTipText = "Anterior"
MaskColor = &H808080&
Style = 1
End
Begin CommandButton cmdInicio
Left = 360
Top = 4680
Width = 615
Height = 495
TabIndex = 21
Picture = "Form1.frx":8A0
ToolTipText = "Primero"
MaskColor = &H808080&
Style = 1
End
Begin CommandButton cmdGuardar
Left = 4320
Top = 4680
Width = 615
Height = 495
TabIndex = 9
Picture = "Form1.frx":A12
ToolTipText = "Guardar"
MaskColor = &H808080&
Style = 1
End
Begin CommandButton cmdEditar
Left = 3720
Top = 4680
Width = 615
Height = 495
TabIndex = 8
Picture = "Form1.frx":B84
ToolTipText = "Editar"
MaskColor = &H808080&
Style = 1
End
Begin CommandButton cmdSalir
Left = 6480
Top = 4680
Width = 615
Height = 495
TabIndex = 13
Picture = "Form1.frx":CF6
ToolTipText = "Salir"
MaskColor = &H808080&
Style = 1
End
Begin CommandButton cmdBuscar
Left = 5520
Top = 4680
Width = 615
Height = 495
TabIndex = 11
Picture = "Form1.frx":E68
ToolTipText = "Buscar"
MaskColor = &H808080&
Style = 1
End
Begin CommandButton cmdEliminar
Left = 4920
Top = 4680
Width = 615
Height = 495
TabIndex = 10
Picture = "Form1.frx":FDA
ToolTipText = "Eliminar"
MaskColor = &H808080&
Style = 1
End
Begin CommandButton cmdNuevo
Left = 3120
Top = 4680
Width = 615
Height = 495
TabIndex = 7
Picture = "Form1.frx":114C
ToolTipText = "Nuevo"
MaskColor = &H808080&
Style = 1
End
Begin Frame Frame1
Caption = "Datos Personales"
BackColor = &HC0C000&
Left = 120
Top = 240
Width = 7095
Height = 4215
TabIndex = 12
Begin TextBox txtNombre
ForeColor = &H0&
Left = 1800
Top = 720
Width = 4335
Height = 375
TabIndex = 0
BeginProperty Font
Name = "Courier New"
Size = 9,75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin TextBox txtApellido
ForeColor = &H0&
Left = 1800
Top = 1200
Width = 4335
Height = 375
TabIndex = 1
BeginProperty Font
Name = "Courier New"
Size = 9,75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin TextBox txtDireccion
ForeColor = &H0&
Left = 1800
Top = 1680
Width = 5055
Height = 405
TabIndex = 2
BeginProperty Font
Name = "Courier New"
Size = 9,75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin TextBox txtTelCasa
ForeColor = &H0&
Left = 1800
Top = 2160
Width = 2175
Height = 405
TabIndex = 3
BeginProperty Font
Name = "Courier New"
Size = 9,75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin TextBox txtTelOfic
ForeColor = &H0&
Left = 1800
Top = 2640
Width = 2175
Height = 405
TabIndex = 4
BeginProperty Font
Name = "Courier New"
Size = 9,75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin TextBox txtCelular
ForeColor = &H0&
Left = 1800
Top = 3120
Width = 2175
Height = 405
TabIndex = 5
BeginProperty Font
Name = "Courier New"
Size = 9,75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin TextBox txtEmail
ForeColor = &H0&
Left = 1800
Top = 3600
Width = 4335
Height = 405
TabIndex = 6
BeginProperty Font
Name = "Courier New"
Size = 9,75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin Label lblReg
ForeColor = &H0&
Left = 1800
Top = 240
Width = 1695
Height = 375
TabIndex = 26
BorderStyle = 1 'Fixed Single
Alignment = 2 'Center
BeginProperty Font
Name = "Courier New"
Size = 9,75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin Label Label1
Caption = "REGISTRO"
BackColor = &HC0C000&
Left = 120
Top = 360
Width = 1095
Height = 255
TabIndex = 25
End
Begin Label Label2
Caption = "NOMBRE"
BackColor = &HC0C000&
Left = 120
Top = 840
Width = 1455
Height = 255
TabIndex = 20
End
Begin Label Label3
Caption = "APELLIDO"
BackColor = &HC0C000&
Left = 120
Top = 1320
Width = 1455
Height = 255
TabIndex = 19
End
Begin Label Label4
Caption = "DIRECCION"
BackColor = &HC0C000&
Left = 120
Top = 1800
Width = 1455
Height = 255
TabIndex = 18
End
Begin Label Label5
Caption = "TELEFONO CASA"
BackColor = &HC0C000&
Left = 120
Top = 2280
Width = 1575
Height = 255
TabIndex = 17
End
Begin Label Label6
Caption = "TELEFONO OFICINA"
BackColor = &HC0C000&
Left = 120
Top = 2760
Width = 1815
Height = 255
TabIndex = 16
End
Begin Label Label7
Caption = "CELULAR"
BackColor = &HC0C000&
Left = 120
Top = 3240
Width = 1455
Height = 255
TabIndex = 15
End
Begin Label Label8
Caption = "EMAIL"
BackColor = &HC0C000&
Left = 120
Top = 3720
Width = 1455
Height = 255
TabIndex = 14
End
End
Begin Menu mnuArchivo
Caption = "&Archivo"
Begin Menu mnuOrdenar
Caption = "&Ordenar"
Shortcut = 15
End
Begin Menu mnuImprimir
Caption = "&Imprimir"
Shortcut = 16
End
Begin Menu mnuSalir
Caption = "&Salir"
Shortcut = 17
End
End
Begin Menu mnuRegistro
Caption = "&Registro"
Begin Menu mnuNuevo
Caption = "&Nuevo"
End
Begin Menu mnuEditar
Caption = "E&ditar"
End
Begin Menu mnuGuardar
Caption = "&Guardar"
End
Begin Menu mnuEliminar
Caption = "&Eliminar"
End
Begin Menu mnuBuscar
Caption = "&Buscar"
End
End
Begin Menu mnuMover
Caption = "&Mover"
Begin Menu mnuPrimero
Caption = "&Primero"
End
Begin Menu mnuAnterior
Caption = "&Anterior"
End
Begin Menu mnuSiguiente
Caption = "&Siguiente"
End
Begin Menu mnuUltimo
Caption = "&Ultimo"
End
End
Begin Menu mnuAyuda
Caption = "?"
Begin Menu mnuAcercaDe
Caption = "Acerca de"
End
End
End
Attribute VB_Name = "Form1"
Begin VB.Form Form2
Caption = "Buscar"
BackColor = &HFF8080&
ScaleMode = 1
AutoRedraw = False
FontTransparent = True
'Icon = n/a
LinkTopic = "Form2"
MaxButton = 0 'False
MinButton = 0 'False
ClientLeft = 60
ClientTop = 345
ClientWidth = 5640
ClientHeight = 2130
ShowInTaskbar = 0 'False
StartUpPosition = 1 'CenterOwner
Begin CommandButton cmdCancelar
Caption = "Cancelar"
Left = 3000
Top = 1440
Width = 1455
Height = 375
TabIndex = 5
BeginProperty Font
Name = "MS Sans Serif"
Size = 9,75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin CommandButton cmdAceptar
Caption = "Aceptar"
Left = 1200
Top = 1440
Width = 1455
Height = 375
TabIndex = 4
BeginProperty Font
Name = "MS Sans Serif"
Size = 9,75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin TextBox Text1
Left = 2400
Top = 720
Width = 3015
Height = 375
TabIndex = 3
End
Begin ComboBox Combo1
Style = 2
Left = 240
Top = 720
Width = 1815
Height = 315
TabIndex = 2
End
Begin Label Label2
Caption = "Valor"
BackColor = &HFF8080&
ForeColor = &H800000&
Left = 2520
Top = 360
Width = 1095
Height = 255
TabIndex = 1
BeginProperty Font
Name = "MS Sans Serif"
Size = 8,25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin Label Label1
Caption = "Campo"
BackColor = &HFF8080&
ForeColor = &H800000&
Left = 240
Top = 360
Width = 1095
Height = 255
TabIndex = 0
BeginProperty Font
Name = "MS Sans Serif"
Size = 8,25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
End
Attribute VB_Name = "Form2"
Begin VB.Form Form3
Caption = "Acerca del Autor"
ScaleMode = 1
AutoRedraw = False
FontTransparent = True
'Icon = n/a
LinkTopic = "Form3"
MaxButton = 0 'False
MinButton = 0 'False
ClientLeft = 60
ClientTop = 345
ClientWidth = 5130
ClientHeight = 2865
ShowInTaskbar = 0 'False
StartUpPosition = 1 'CenterOwner
Begin CommandButton cmdCerrar
Caption = "Cerrar"
Left = 1800
Top = 2400
Width = 1455
Height = 375
TabIndex = 5
End
Begin Label Label4
Caption = "Ingeniero de Sistemas"
ForeColor = &H80&
Left = 2040
Top = 1080
Width = 1575
Height = 255
TabIndex = 7
End
Begin Image Image1
Picture = "Form3.frx":0
Left = 240
Top = 120
Width = 480
Height = 480
End
Begin Label Label3
Caption = "Directorio Telefónico"
ForeColor = &H40C0&
Left = 1080
Top = 120
Width = 3735
Height = 375
TabIndex = 6
BeginProperty Font
Name = "Verdana"
Size = 14,25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin Label Label5
Caption = "URL:"
Left = 600
Top = 1560
Width = 495
Height = 255
TabIndex = 4
BeginProperty Font
Name = "MS Sans Serif"
Size = 8,25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin Label lblBaul
Caption = "http://es.geocities.com/baul_informatico"
ForeColor = &HFF0000&
Left = 1440
Top = 1920
Width = 2895
Height = 255
MousePointer = 99 'Custom
TabIndex = 3
MouseIcon = "Form3.frx":44A
BeginProperty Font
Name = "MS Sans Serif"
Size = 8,25
Charset = 0
Weight = 400
Underline = -1 'True
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin Label lblPersonal
Caption = "http://es.geocities.com/edisonml72"
ForeColor = &HFF0000&
Left = 1440
Top = 1560
Width = 2535
Height = 255
MousePointer = 99 'Custom
TabIndex = 2
MouseIcon = "Form3.frx":59C
BeginProperty Font
Name = "MS Sans Serif"
Size = 8,25
Charset = 0
Weight = 400
Underline = -1 'True
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin Label Label2
Caption = "Edison Morales Lizarazo"
ForeColor = &H800000&
Left = 1440
Top = 840
Width = 2895
Height = 255
TabIndex = 1
BeginProperty Font
Name = "Arial"
Size = 12
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin Label Label1
Caption = "Autor:"
Left = 600
Top = 840
Width = 495
Height = 255
TabIndex = 0
BeginProperty Font
Name = "MS Sans Serif"
Size = 8,25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
End
Attribute VB_Name = "Form3"
 INSTALACIÓN DECOMPILER
1° PROGRAMA CALCULADORA JAVA EN JAVA DECOMPILER
package Calc.src.Calculadora;
import java.awt.Container;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.Rectangle;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;
import org.netbeans.lib.awtextra.AbsoluteConstraints;
import org.netbeans.lib.awtextra.AbsoluteLayout;
public class Calculadora
extends JFrame
{
private JButton jButton0;
private JButton jButton1;
private JButton jButton10;
private JButton jButton11;
private JButton jButton2;
private JButton jButton3;
private JButton jButton4;
private JButton jButton5;
private JButton jButton6;
private JButton jButton7;
private JButton jButton8;
private JButton jButton9;
private JButton jButtonClear;
private JButton jButtonDividir;
private JButton jButtonIgual;
private JButton jButtonSoma;
private JButton jButtonSub;
private JButton jButtonVezes;
private JScrollPane jScrollPane1;
private JTextArea jVisor;
void clear(String textt) {
String texto = this.jVisor.getText();
int tamanho = texto.length();
if (texto.equals("")) {
this.jVisor.setText("");
} else {
this.jVisor.setText(texto.substring(0, tamanho - 1));
}
}
public static long validaLong(String nu) {
long a = Long.parseLong(nu);
return a;
}
public double validaDouble(String num) {
double a = Double.parseDouble(num);
return a;
}
public Calculadora() {
initComponents();
}
private void initComponents()
{
this.jButtonSub = new JButton();
this.jButtonClear = new JButton();
this.jButton0 = new JButton();
this.jButtonIgual = new JButton();
this.jButtonSoma = new JButton();
this.jButton8 = new JButton();
this.jButton9 = new JButton();
this.jButton6 = new JButton();
this.jButton7 = new JButton();
this.jButton4 = new JButton();
this.jButton5 = new JButton();
this.jButtonVezes = new JButton();
this.jButtonDividir = new JButton();
this.jButton3 = new JButton();
this.jButton2 = new JButton();
this.jButton1 = new JButton();
this.jButton10 = new JButton();
this.jButton11 = new JButton();
this.jScrollPane1 = new JScrollPane();
this.jVisor = new JTextArea();
setDefaultCloseOperation(3);
setTitle("Calculadora");
setBounds(new Rectangle(0, 0, 240, 300));
setMinimumSize(new Dimension(12, 24));
getContentPane().setLayout(
new AbsoluteLayout());
this.jButtonSub.setText("-");
this.jButtonSub.setMaximumSize(new Dimension(39, 23));
this.jButtonSub.setMinimumSize(new Dimension(39, 23));
this.jButtonSub.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt)
{
Calculadora.this.jButtonSubActionPerformed(evt);
}
});
getContentPane().add(
this.jButtonSub,
new AbsoluteConstraints(130, 120, 41,
32));
this.jButtonClear.setText("C");
this.jButtonClear.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
Calculadora.this.jButtonClearActionPerformed(evt);
}
});
getContentPane().add(
this.jButtonClear,
new AbsoluteConstraints(90, 240, -1,
30));
this.jButton0.setText("0");
this.jButton0.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
Calculadora.this.jButton0ActionPerformed(evt);
}
});
getContentPane().add(
this.jButton0,
new AbsoluteConstraints(50, 240, -1,
-1));
this.jButtonIgual.setText("=");
this.jButtonIgual.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
Calculadora.this.jButtonIgualActionPerformed(evt);
}
});
this.jButtonIgual.addKeyListener(new KeyAdapter() {
public void keyPressed(KeyEvent evt) {
jButtonIgualKeyPressed(evt);
}
private void jButtonIgualKeyPressed(KeyEvent evt) {}
});
getContentPane().add(
this.jButtonIgual,
new AbsoluteConstraints(130, 200, 42,
70));
this.jButtonSoma.setFont(new Font("Tahoma", 0, 8));
this.jButtonSoma.setText("+");
this.jButtonSoma.setPreferredSize(new Dimension(39, 22));
this.jButtonSoma.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
Calculadora.this.jButtonSomaActionPerformed(evt);
}
});
getContentPane().add(
this.jButtonSoma,
new AbsoluteConstraints(90, 120, 40,
30));
this.jButton8.setText("8");
this.jButton8.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
Calculadora.this.jButton8ActionPerformed(evt);
}
});
getContentPane().add(
this.jButton8,
new AbsoluteConstraints(50, 180, -1,
-1));
this.jButton9.setText("9");
this.jButton9.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt)
{
Calculadora.this.jButton9ActionPerformed(evt);
}
});
getContentPane().add(
this.jButton9,
new AbsoluteConstraints(50, 210, -1,
-1));
this.jButton6.setText("6");
this.jButton6.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
Calculadora.this.jButton6ActionPerformed(evt);
}
});
getContentPane().add(
this.jButton6,
new AbsoluteConstraints(50, 120, -1,
-1));
this.jButton7.setText("7");
this.jButton7.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
Calculadora.this.jButton7ActionPerformed(evt);
}
});
getContentPane().add(
this.jButton7,
new AbsoluteConstraints(50, 150, -1,
-1));
this.jButton4.setText("4");
this.jButton4.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
Calculadora.this.jButton4ActionPerformed(evt);
}
});
getContentPane().add(
this.jButton4,
new AbsoluteConstraints(10, 210, -1,
-1));
this.jButton5.setText("5");
this.jButton5.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
Calculadora.this.jButton5ActionPerformed(evt);
}
});
getContentPane().add(
this.jButton5,
new AbsoluteConstraints(10, 240, -1,
-1));
this.jButtonVezes.setText("*");
this.jButtonVezes.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
Calculadora.this.jButtonVezesActionPerformed(evt);
}
});
getContentPane().add(
this.jButtonVezes,
new AbsoluteConstraints(90, 150, 40,
30));
this.jButtonDividir.setText("/");
this.jButtonDividir.setMaximumSize(new Dimension(39, 23));
this.jButtonDividir.setMinimumSize(new Dimension(39, 23));
this.jButtonDividir.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
Calculadora.this.jButtonDividirActionPerformed(evt);
}
});
getContentPane().add(
this.jButtonDividir,
new AbsoluteConstraints(90, 180, 39,
30));
this.jButton3.setText("3");
this.jButton3.setToolTipText("");
this.jButton3.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
Calculadora.this.jButton3ActionPerformed(evt);
}
});
getContentPane().add(
this.jButton3,
new AbsoluteConstraints(10, 180, -1,
-1));
this.jButton2.setText("2");
this.jButton2.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
Calculadora.this.jButton2ActionPerformed(evt);
}
});
getContentPane().add(
this.jButton2,
new AbsoluteConstraints(10, 150, -1,
-1));
this.jButton1.setText("1");
this.jButton1.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
Calculadora.this.jButton1ActionPerformed(evt);
}
});
getContentPane().add(
this.jButton1,
new AbsoluteConstraints(10, 120, -1,
-1));
this.jButton10.setFont(new Font("Tahoma", 0, 8));
this.jButton10.setText("CE");
this.jButton10.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
Calculadora.this.jButton10ActionPerformed(evt);
}
});
getContentPane().add(
this.jButton10,
new AbsoluteConstraints(130, 150, 42,
43));
this.jButton11.setText(".");
this.jButton11.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
Calculadora.this.jButton11ActionPerformed(evt);
}
});
getContentPane().add(
this.jButton11,
new AbsoluteConstraints(90, 210, 39,
30));
this.jScrollPane1.setAutoscrolls(true);
this.jScrollPane1.setMaximumSize(new Dimension(100, 100));
this.jVisor.setEditable(false);
this.jVisor.setColumns(20);
this.jVisor.setLineWrap(true);
this.jVisor.setRows(5);
this.jVisor.setTabSize(5);
this.jVisor.setAutoscrolls(false);
this.jVisor.addKeyListener(new KeyAdapter() {
public void keyPressed(KeyEvent evt) {
Calculadora.this.jVisorKeyPressed(evt);
}
});
this.jScrollPane1.setViewportView(this.jVisor);
getContentPane().add(
this.jScrollPane1,
new AbsoluteConstraints(10, 11, 160,
100));
pack();
}
private void jButton9ActionPerformed(ActionEvent evt) {
String texto = this.jVisor.getText();
this.jVisor.setText(texto + "9");
}
private void jButton7ActionPerformed(ActionEvent evt) {
String texto = this.jVisor.getText();
this.jVisor.setText(texto + "7");
}
private void jButton1ActionPerformed(ActionEvent evt) {
String texto = this.jVisor.getText();
this.jVisor.setText(texto + "1");
}
private void jButton2ActionPerformed(ActionEvent evt) {
String texto = this.jVisor.getText();
this.jVisor.setText(texto + "2");
}
private void jButton3ActionPerformed(ActionEvent evt) {
String texto = this.jVisor.getText();
this.jVisor.setText(texto + "3");
}
private void jButton4ActionPerformed(ActionEvent evt) {
String texto = this.jVisor.getText();
this.jVisor.setText(texto + "4");
}
private void jButton5ActionPerformed(ActionEvent evt) {
String texto = this.jVisor.getText();
this.jVisor.setText(texto + "5");
}
private void jButton6ActionPerformed(ActionEvent evt) {
String texto = this.jVisor.getText();
this.jVisor.setText(texto + "6");
}
private void jButton8ActionPerformed(ActionEvent evt) {
String texto = this.jVisor.getText();
this.jVisor.setText(texto + "8");
}
private void jButton0ActionPerformed(ActionEvent evt) {
String texto = this.jVisor.getText();
this.jVisor.setText(texto + "0");
}
private void jButtonSomaActionPerformed(ActionEvent evt) {
String texto = this.jVisor.getText();
this.jVisor.setText(texto + " + ");
}
private void jButtonIgualActionPerformed(ActionEvent evt) {
String tex = this.jVisor.getText();
String textt = String.valueOf(tex.length());
String[] linhas = tex.split(" ");
String[] arrayOfString1;
int j = (arrayOfString1 = linhas).length;
for (int i = 0; i < j; i++) {
String str1 = arrayOfString1[i];
}
String num1 = linhas[0];
String num2 = linhas[2];
for (int i = 0; i < linhas.length; i++) {
if (linhas[i].equals("+")) {
if ((num1.contains(".") | num2.contains("."))) {
double numd = validaDouble(num1);
double numd2 = validaDouble(num2);
double result = numd + numd2;
String res = String.valueOf(result);
this.jVisor.setText(res);
}
else
{
long a = validaLong(num1);
long b = validaLong(num2);
long result = a + b;
String res = String.valueOf(result);
this.jVisor.setText(res);
}
}
if (linhas[i].equals("*")) {
if ((num1.contains(".") | num2.contains("."))) {
double numd = validaDouble(num1);
double numd2 = validaDouble(num2);
double result = numd * numd2;
String res = String.valueOf(result);
this.jVisor.setText(res);
}
else
{
long a = validaLong(num1);
long b = validaLong(num2);
long result = a * b;
String res = String.valueOf(result);
this.jVisor.setText(res);
}
}
if (linhas[i].equals("-")) {
if ((num1.contains(".") | num2.contains("."))) {
double numd = validaDouble(num1);
double numd2 = validaDouble(num2);
double result = numd - numd2;
String res = String.valueOf(result);
this.jVisor.setText(res);
}
else {
long a = validaLong(num1);
long b = validaLong(num2);
long result = a - b;
String res = String.valueOf(result);
this.jVisor.setText(res);
}
}
if (linhas[i].equals("/")) {
String num = String.valueOf(num1);
String nume = String.valueOf(num2);
double a = Double.parseDouble(num);
double b = Double.parseDouble(nume);
try {
if (((a == 0.0D ? 1 : 0) | (b == 0.0D ? 1 : 0)) != 0) {
this.jVisor.setText("Divisor nao pode ser 0");
}
else {
double result = a / b;
String res = String.valueOf(result);
this.jVisor.setText(res);
} }
catch (Exception e)
{
e.printStackTrace();
}
} } }
private void jButton10ActionPerformed(ActionEvent evt) {
this.jVisor.setText("");
}
private void jButtonClearActionPerformed(ActionEvent evt) {
String texto = this.jVisor.getText();
int tamanho = texto.length();
if (texto.equals("")) {
this.jVisor.setText("");
} else {
this.jVisor.setText(texto.substring(0, tamanho - 1));
}
}
private void jButtonDividirActionPerformed(ActionEvent evt) {
String texto = this.jVisor.getText();
this.jVisor.setText(texto + " / ");
}
private void jButtonVezesActionPerformed(ActionEvent evt) {
String texto = this.jVisor.getText();
this.jVisor.setText(texto + " * ");
}
private void jButton11ActionPerformed(ActionEvent evt) {
String texto = this.jVisor.getText();
this.jVisor.setText(texto + ".");
}
private void jButtonSubActionPerformed(ActionEvent evt) {
String texto = this.jVisor.getText();
this.jVisor.setText(texto + " - ");
}
private void jVisorKeyPressed(KeyEvent evt) {
if (evt.getKeyCode() == 107) {
String texto = this.jVisor.getText();
this.jVisor.setText(texto + " + ");
}
if (evt.getKeyCode() == 109) {
String texto = this.jVisor.getText();
this.jVisor.setText(texto + " - ");
}
if (evt.getKeyCode() == 111) {
String texto = this.jVisor.getText();
this.jVisor.setText(texto + " / ");
}
if (evt.getKeyCode() == 106) {
String texto = this.jVisor.getText();
this.jVisor.setText(texto + " * ");
}
if (evt.getKeyCode() == 97) {
String texto = this.jVisor.getText();
this.jVisor.setText(texto + "1");
}
if (evt.getKeyCode() == 96) {
String texto = this.jVisor.getText();
this.jVisor.setText(texto + "0");
}
if (evt.getKeyCode() == 98) {
String texto = this.jVisor.getText();
this.jVisor.setText(texto + "2");
}
if (evt.getKeyCode() == 99) {
String texto = this.jVisor.getText();
this.jVisor.setText(texto + "3");
}
if (evt.getKeyCode() == 100) {
String texto = this.jVisor.getText();
this.jVisor.setText(texto + "4");
}
if (evt.getKeyCode() == 101) {
String texto = this.jVisor.getText();
this.jVisor.setText(texto + "5");
}
if (evt.getKeyCode() == 102) {
String texto = this.jVisor.getText();
this.jVisor.setText(texto + "6");
}
if (evt.getKeyCode() == 103) {
String texto = this.jVisor.getText();
this.jVisor.setText(texto + "7");
}
if (evt.getKeyCode() == 104) {
String texto = this.jVisor.getText();
this.jVisor.setText(texto + "8");
}
if (evt.getKeyCode() == 105) {
String texto = this.jVisor.getText();
this.jVisor.setText(texto + "9");
}
if (evt.getKeyCode() == 8) {
String texto = this.jVisor.getText();
clear(texto);
}
if (evt.getKeyCode() == 127) {
this.jVisor.setText("");
}
if (evt.getKeyCode() == 110) {
String texto = this.jVisor.getText();
this.jVisor.setText(texto + ".");
}
if (evt.getKeyCode() == 10) {
String tex = this.jVisor.getText();
String textt = String.valueOf(tex.length());
String[] linhas = tex.split(" ");
String[] arrayOfString1;
int j = (arrayOfString1 = linhas).length;
for (int i = 0; i < j; i++) {
String str1 = arrayOfString1[i];
}
String num1 = linhas[0];
String num2 = linhas[2];
for (int i = 0; i < linhas.length; i++) {
if (linhas[i].equals("+")) {
if ((num1.contains(".") | num2.contains("."))) {
double numd = validaDouble(num1);
double numd2 = validaDouble(num2);
double result = numd + numd2;
String res = String.valueOf(result);
this.jVisor.setText(res);
}
else {
long a = validaLong(num1);
long b = validaLong(num2);
long result = a + b;
String res = String.valueOf(result);
this.jVisor.setText(res);
}
}
if (linhas[i].equals("*")) {
if ((num1.contains(".") | num2.contains("."))) {
double numd = validaDouble(num1);
double numd2 = validaDouble(num2);
double result = numd * numd2;
String res = String.valueOf(result);
this.jVisor.setText(res);
}
else {
long a = validaLong(num1);
long b = validaLong(num2);
long result = a * b;
String res = String.valueOf(result);
this.jVisor.setText(res);
}
}
if (linhas[i].equals("-")) {
if ((num1.contains(".") | num2.contains("."))) {
double numd = validaDouble(num1);
double numd2 = validaDouble(num2);
double result = numd - numd2;
String res = String.valueOf(result);
this.jVisor.setText(res);
}
else {
long a = validaLong(num1);
long b = validaLong(num2);
long result = a - b;
String res = String.valueOf(result);
this.jVisor.setText(res);
}
}
if (linhas[i].equals("/")) {
String num = String.valueOf(num1);
String nume = String.valueOf(num2);
double a = Double.parseDouble(num);
double b = Double.parseDouble(nume);
try {
if (((a == 0.0D ? 1 : 0) | (b == 0.0D ? 1 : 0)) != 0)
{
this.jVisor.setText("Divisor nao pode ser 0");
}
else {
double result = a / b;
String res = String.valueOf(result);
this.jVisor.setText(res);
}
}
catch (Exception e) {
e.printStackTrace();
}
} } } }}
package Calc.src.Calculadora;
import java.awt.EventQueue;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.UIManager;
import javax.swing.UIManager.LookAndFeelInfo;
import javax.swing.UnsupportedLookAndFeelException;
public class CalculadoraT{
public static void main(String[] args) {
try
{
UIManager.LookAndFeelInfo[] arrayOfLookAndFeelInfo;
int j = (arrayOfLookAndFeelInfo = UIManager.getInstalledLookAndFeels()).length;
for (int i = 0; i < j; i++) {
UIManager.LookAndFeelInfo info = arrayOfLookAndFeelInfo[i];
if ("Nimbus".equals(info.getName())) {
UIManager.setLookAndFeel(info.getClassName());
break;
}
} }
catch (ClassNotFoundException ex) {
Logger.getLogger(Calculadora.class.getName()).log(Level.SEVERE, null, ex);
}
catch (InstantiationException ex) {
Logger.getLogger(Calculadora.class.getName()).log(Level.SEVERE, null, ex);
}
catch (IllegalAccessException ex) {
Logger.getLogger(Calculadora.class.getName()).log(Level.SEVERE, null, ex);
}
catch (UnsupportedLookAndFeelException ex) {
Logger.getLogger(Calculadora.class.getName()).log(Level.SEVERE, null, ex);
}
EventQueue.invokeLater(new Runnable() {
public void run() {
new Calculadora().setVisible(true);
}
});
}}
package Calc.src.Calculadora;
import javax.swing.JTextArea;
public class ValidaIgual{
public static long validaLong(String nu) {
long a = Long.parseLong(nu);
return a; }
public String valida(String texto) {
JTextArea texo = new JTextArea();
String text = String.valueOf(texto.length());
String[] linhas = texto.split(" ");
String num1 = linhas[0];
String num2 = linhas[2];
for (int i = 0; i < linhas.length; i++) {
if (linhas[i].equals("+")) {
long a = validaLong(num1);
long b = validaLong(num2);
long result = a + b;
String res = String.valueOf(result);
texo.setText(res);
}
if (linhas[i].equals("*")) {
long a = validaLong(num1);
long b = validaLong(num2);
long result = a * b;
String res = String.valueOf(result);
texo.setText(res);
}
if (linhas[i].equals("-")) {
long a = validaLong(num1);
long b = validaLong(num2);
long result = a - b;
String res = String.valueOf(result);
texo.setText(res);
}
if (linhas[i].equals("/")) {
String num = String.valueOf(num1);
String nume = String.valueOf(num2);
double a = Double.parseDouble(num);
double b = Double.parseDouble(nume);
double result = a / b;
String res = String.valueOf(result);
texo.setText(res);
}
} return texto;
} }
2° PROGRAMA AHORCADO EN JAVA DESCOMPILER
package ahorcado.algoritmo;
import java.io.PrintStream;
public class AlgoritmoAhorcado
{
private boolean gana;
private int ganar = 0;
private Character[] posiciones = new Character[this.palabra.length()];
private String palabra = palabraAleatoria();
private String[] programacion = { "CATCH", "WHILE", "FOR", "ELSE", "VISUAL", "COMPUTADORES",
"COMPILACION", "EJECUCION", "FUENTE", "MEMORIA", "DISCO", "WEB", "ALGORITMO",
"PROGRAMA", "ORIENTADA", "ESTRUCTURA", "SENTENCIA", "PROCESADOR", "CODIGO",
"MAQUINA", "OBJETO", "NIVEL", "MICROSOFT", "WINDOWS", "UNIX", "EJECUTABLE", "SOFTWARE",
"HARDWARE", "EVENTO", "ESCUCHADOR", "ERROR", "EXCEPCION", "BUFFERED", "UBUNTU",
"MOZILLA" };
private String[] tecnologia = { "ORDENADOR", "PC", "MEMORIA", "CD", "DVD", "MOVIL", "WIFI",
"SATELITE", "INTERNET", "REDES", "TELEMATICA", "TELEFONIA", "VIDEOJUEGOS", "CONSOLAS",
"IPHONE", "INDUSTRIALES", "TELECOMUNICACIONES", "SISTEMAS", "INFORMATICA",
"ORDENADOR", "COMPUTADORAS", "ARTEFACTO", "OPERACION", "INGENIERIA", "PROTOTIPO",
"MECANICA", "ELECTRONICA", "ELECTRICIDAD", "AERONAUTICA", "TERMICO", "INFORMACION",
"CALCULO", "AUTOMATICO", "MAQUINA", "EMPRESA", "INNOVACION", "COMPETIDORES",
"MONOPOLIO", "MEDIOS", "SATELITE", "TELEFONO", "CELULARES", "CIRCUITOS", "ENERGIA",
"INFRAESTRUCTURA", "COMUNICACIONES" };
private String[] personajes = { "PICASSO", "DAVINCI", "ALBERTI", "VELAZQUEZ", "CONGORA",
"LORCA", "DALY", "GOYA", "GAUDI", "GAUSS", "MICKEYMOUSE", "DONALD", "DAREK", "CLINTON",
"COUSTEAU", "OBAMA", "AZNAR", "ZAPATERO", "RAJOY", "CHIKILICUATRE", "PIOLIN",
"BUENAFUENTE", "SILVESTRE", "CORRECAMINOS", "PLUTO", "GOOFY", "GALLARDON", "ZAPLANA",
"NARUTO", "RUBALCABA", "BLANCO", "TRINI", "CERVANTES", "GARCILASO", "MARCOPOLO",
"NARVAEZ", "CHAVEZ", "WASHINGTON", "JEFFERSON", "LINCON", "ROOSEVELT", "BUSH",
"KENNEDY", "FORD", "FRANKLIN", "NIXON", "CARTER", "REAGAN", "JACKSON", "SAMANIEGO",
"MACHADO", "CURIE", "SHAKESPEARE", "QUEVEDO", "GONGORA", "BECQUER", "LORCA",
"ALBERTI", "CERNUDA", "ALEIXANDRE", "NERUDA", "CELA", "OTERO", "GALILEO", "NEWTON",
"LAPLACE", "POISSON", "KELVIN", "MAXWELL", "COULOMB", "FARADAY", "HERTZ", "GIBBS",
"HAMILTON", "CASILLAS", "HIERRO", "REDONDO", "TORRES", "RAUL", "MARUJITA", "ALONSO",
"BELENESTEBAN", "NADAL", "GASOL", "BISBAL", "BUSTAMANTE", "RIHANA", "IRONMAN",
"SUPERMAN", "BATMAN", "MARADONA", "ACOSTA", "BATISTA", "IGARTIBURU", "MINIE", "HULK",
"SHAKIRA", "CIVERA" };
private String[] musica = { "MUSICAL", "CANCION", "TROMBON", "FLAUTA", "VIOLIN", "CLASICA",
"MODERNA", "CORCEA", "SEMIFUSA", "REDONDA", "NEGRA", "BLANCA", "SILENCIO", "SONIDO",
"PENTAGRAMA", "NOTAS", "PARTITURA", "ARMONIA", "MELODIA", "DURACION", "ALTURA",
"LATINA", "DURACION", "GRAVES", "AGUDOS", "INTENSIDAD", "TIMBRE", "RITMO",
"CONTRAPUNTO", "ACORDE", "JAZZ", "HEAVY", "ROCK", "POP", "DANCE", "SOUL", "TECLADO",
"INSTRUMENTO", "TIEMPO", "REGGAETON", "BALADA", "BOLERO" };
private String[] deportes = { "FUTBOL", "NATACION", "PESCA", "JABALINA", "SALTO", "LUCHA",
"POLO", "PATINAJE", "TAICHI", "GIMNASIA", "YOGA", "CULTURISMO", "TOROS", "HOCKEY",
"BEISBOL", "BALON", "PENTATLON", "LANZAMIENTO", "DANZA", "KARATE", "JUDO", "RELEVOS",
"ATLETISMO", "BOXEO", "AUTOMOVILISMO", "TENIS", "BALONCESTO", "BALONMANO",
"MOTOCICLISMO", "CICLISMO", "CAZA", "EQUITACION", "CANOA", "AJEDREZ", "BADMINTON",
"BILLAR", "WINDSURF", "SURF", "SKATE", "RAFTING", "PARAPENTE", "ESCALADA",
"PARACAIDISMO" };
private String[] ciencia = { "CONOCIMIENTO", "FILOSOFIA", "TECNOLOGICO", "MATEMATICAS",
"LOGICA", "EMPIRICO", "FACTICO", "ASTRONOMIA", "BIOLOGIA", "FISICA", "QUIMICA",
"GEOLOGIA", "GEOGRAFIA", "ANTROPOLOGIA", "POLITICA", "DEMOGRAFIA", "ECONOMIA",
"HISTORIA", "PSICOLOGIA", "SOCIOLOGIA", "EXPERIMENTACION", "HIPOTESIS", "TEORIA",
"METODO", "CRITERIO", "TEOREMA", "OBSERVACION", "DESCRIPCION", "INDUCCION",
"DEMOSTRACION", "REFUTACION", "COMPARACION" };
private String[] arte = { "OLEO", "SOL", "ACUARELA", "BARROCO", "LIENZO", "GOTICO",
"LITERATURA", "TEATRO", "ESCULTURA", "FOTOGRAFIA", "ROMANTICO", "HISTORIA", "GOYA",
"PINCEL", "BROCHA", "FRESCO", "DIBUJO", "MODERNISMO", "REALISMO", "GALERIA", "ARTISTA",
"ARQUITECTURA", "MUDEJAR", "ROMANICA", "RUPESTRE", "BIZANTINA", "PALEOCRISTIANA",
"PRERROMANICA", "RENACIMIENTO", "NEOCLASICISMO", "MITOLOGIA", "MUSEO" };
public void nuevaPalabra() {
this.palabra = palabraAleatoria();
this.posiciones = new Character[this.palabra.length()];
}
public void nuevaPalabra(String buscaEnArray) {
int aleatorio = 0;
if (buscaEnArray.equalsIgnoreCase("Arte")) {
aleatorio = aleatorio(this.arte);
this.palabra = this.arte[aleatorio];
}
else if (buscaEnArray.equalsIgnoreCase("Ciencia")) {
aleatorio = aleatorio(this.ciencia);
this.palabra = this.ciencia[aleatorio];
}
else if (buscaEnArray.equalsIgnoreCase("Deportes")) {
aleatorio = aleatorio(this.deportes);
this.palabra = this.deportes[aleatorio];
}
else if (buscaEnArray.equalsIgnoreCase("Música")) {
aleatorio = aleatorio(this.musica);
this.palabra = this.musica[aleatorio]; }
else if (buscaEnArray.equalsIgnoreCase("Personajes")) {
aleatorio = aleatorio(this.personajes);
this.palabra = this.personajes[aleatorio];
}
else if (buscaEnArray.equalsIgnoreCase("Tecnología")) {
aleatorio = aleatorio(this.tecnologia);
this.palabra = this.tecnologia[aleatorio];
}
else if (buscaEnArray.equalsIgnoreCase("Programación")) {
aleatorio = aleatorio(this.programacion);
this.palabra = this.programacion[aleatorio];
}
else {
aleatorio = aleatorio(this.arte);
this.palabra = this.arte[aleatorio];
}
this.posiciones = new Character[this.palabra.length()]; }
public void dificultad(String dificultad, String buscaEnArray) {
nuevaPalabra(buscaEnArray);
if (dificultad.equalsIgnoreCase("Fácil")) {
if (this.palabra.length() >= 5) {
do {
System.out.println(this.palabra.length());
nuevaPalabra(buscaEnArray);
System.out.println(this.palabra.length());
} while (
this.palabra.length() >= 5);
} }
if (dificultad.equalsIgnoreCase("Normal")) {
if ((this.palabra.length() <= 5) || (this.palabra.length() >= 7)) {
do {
System.out.println(this.palabra.length());
nuevaPalabra(buscaEnArray);
} while ((this.palabra.length() <= 5) || (this.palabra.length() >= 7));
} }
if (dificultad.equalsIgnoreCase("Difícil")) {
if ((this.palabra.length() <= 7) || (this.palabra.length() >= 10)) {
do {
System.out.println(this.palabra.length());
nuevaPalabra(buscaEnArray);
} while ((this.palabra.length() <= 7) || (this.palabra.length() >= 10));
} }
if (dificultad.equalsIgnoreCase("Muy Difícil")) {
if (this.palabra.length() <= 10) {
do {
System.out.println(this.palabra.length());
nuevaPalabra(buscaEnArray);
} while (
this.palabra.length() <= 10);
} } }
public void resetGana() {
this.ganar = 0;
this.gana = false;
for (int i = 0; i < this.palabra.length(); i++) {
this.posiciones[i] = null;
} }
public boolean ganarPartida() {
if (this.ganar == 1) {
this.gana = true;
} else {
this.gana = false;
}
return this.gana; }
public String getPalabra() {
return this.palabra; }
public Character[] getPosiciones() {
return this.posiciones; }
public String rellena() {
String modifica = "";
for (int i = 0; i < this.palabra.length(); i++) {
modifica = modifica + String.valueOf('*');
}
return modifica; }
public boolean iguales(char letra) {
boolean afir = false;
for (int i = 0; i < this.palabra.length(); i++) {
if (this.palabra.charAt(i) == letra) {
afir = true;
break;
}
afir = false;
}
return afir; }
public Character[] busca(char caracter) {
Character[] coincide = new Character[this.palabra.length()];
for (int i = 0; i < this.palabra.length(); i++) {
if (caracter == this.palabra.charAt(i)) {
coincide[i] = Character.valueOf('*');
} else {
coincide[i] = null;
} }
return coincide;
}
public String oculta(Character[] coincide) {
String temp = "";
char[] pos = new char[coincide.length];
if (coincide.length == this.palabra.length()) {
for (int i = 0; i < this.palabra.length(); i++) {
if ((coincide[i] != null) && (this.posiciones[i] == null)) {
this.posiciones[i] = coincide[i];
} }
for (int i = 0; i < this.palabra.length(); i++) {
if (this.posiciones[i] == null) {
pos[i] = '*';
} else {
pos[i] = this.palabra.charAt(i);
} }
temp = String.valueOf(pos);
if (temp.compareTo(this.palabra) == 0) {
this.ganar = 1;
} }
else {
temp = "Error en la comparacion";
}
return temp; }
public String palabraAleatoria() {
return this.arte[numAleatorio()]; }
public int numAleatorio() {
int ref = (int)(Math.random() * 100.0D);
if (ref > this.arte.length) {
ref = numAleatorio();
}
return ref; }
public int aleatorio(String[] palabras) {
return (int)(Math.random() * palabras.length);
}}

More Related Content

Similar to Investigación Ensambladores y Decompiladores

Ensambladores y decompiladores (27 de abril 2016)
Ensambladores y decompiladores (27 de abril 2016)Ensambladores y decompiladores (27 de abril 2016)
Ensambladores y decompiladores (27 de abril 2016)pilar menacho
 
Text Editor By Harsh Mathur.
Text Editor By Harsh Mathur.Text Editor By Harsh Mathur.
Text Editor By Harsh Mathur.Harsh Mathur
 
Programas decompiladores
Programas decompiladoresProgramas decompiladores
Programas decompiladoresZulay Limaico
 

Similar to Investigación Ensambladores y Decompiladores (6)

Decompiladores
DecompiladoresDecompiladores
Decompiladores
 
Decompilador
DecompiladorDecompilador
Decompilador
 
Ensambladores y decompiladores (27 de abril 2016)
Ensambladores y decompiladores (27 de abril 2016)Ensambladores y decompiladores (27 de abril 2016)
Ensambladores y decompiladores (27 de abril 2016)
 
Text Editor By Harsh Mathur.
Text Editor By Harsh Mathur.Text Editor By Harsh Mathur.
Text Editor By Harsh Mathur.
 
Programas decompiladores
Programas decompiladoresProgramas decompiladores
Programas decompiladores
 
Vb decompilador
Vb decompiladorVb decompilador
Vb decompilador
 

More from Alexa Chisaguano

Calculo de la entropia de la información
Calculo de la entropia de la informaciónCalculo de la entropia de la información
Calculo de la entropia de la informaciónAlexa Chisaguano
 
La entropía y los sistemas abiertos
La entropía y los sistemas abiertosLa entropía y los sistemas abiertos
La entropía y los sistemas abiertosAlexa Chisaguano
 
Segmentación de las imágenes
Segmentación de las imágenesSegmentación de las imágenes
Segmentación de las imágenesAlexa Chisaguano
 
Entropía Vs Neguentropía
Entropía Vs NeguentropíaEntropía Vs Neguentropía
Entropía Vs NeguentropíaAlexa Chisaguano
 
Aplicaciones de la ingerieria de sistemas
Aplicaciones  de la ingerieria de sistemasAplicaciones  de la ingerieria de sistemas
Aplicaciones de la ingerieria de sistemasAlexa Chisaguano
 
Filtrado de imágenes en matlab
Filtrado de imágenes en matlabFiltrado de imágenes en matlab
Filtrado de imágenes en matlabAlexa Chisaguano
 
Procesamiento de imagenes con matlab
Procesamiento de imagenes con matlabProcesamiento de imagenes con matlab
Procesamiento de imagenes con matlabAlexa Chisaguano
 
Topología matemática preguntas.docx
Topología matemática preguntas.docxTopología matemática preguntas.docx
Topología matemática preguntas.docxAlexa Chisaguano
 

More from Alexa Chisaguano (20)

Los sistemas complejos
Los sistemas complejosLos sistemas complejos
Los sistemas complejos
 
Algoritmo de huffman
Algoritmo de huffmanAlgoritmo de huffman
Algoritmo de huffman
 
Calculo de la entropia de la información
Calculo de la entropia de la informaciónCalculo de la entropia de la información
Calculo de la entropia de la información
 
La entropía y los sistemas abiertos
La entropía y los sistemas abiertosLa entropía y los sistemas abiertos
La entropía y los sistemas abiertos
 
La ley de la entropía
La ley de la entropíaLa ley de la entropía
La ley de la entropía
 
Instalación de vegas
Instalación de vegasInstalación de vegas
Instalación de vegas
 
Segmentación de las imágenes
Segmentación de las imágenesSegmentación de las imágenes
Segmentación de las imágenes
 
Entropía Vs Neguentropía
Entropía Vs NeguentropíaEntropía Vs Neguentropía
Entropía Vs Neguentropía
 
Aplicaciones de la ingerieria de sistemas
Aplicaciones  de la ingerieria de sistemasAplicaciones  de la ingerieria de sistemas
Aplicaciones de la ingerieria de sistemas
 
Operadores morfológicos
Operadores morfológicosOperadores morfológicos
Operadores morfológicos
 
Teoria de la decisión
Teoria de la decisiónTeoria de la decisión
Teoria de la decisión
 
Ingeniería en sistemas
Ingeniería en sistemasIngeniería en sistemas
Ingeniería en sistemas
 
Filtrado de imágenes en matlab
Filtrado de imágenes en matlabFiltrado de imágenes en matlab
Filtrado de imágenes en matlab
 
Procesamiento de imagenes con matlab
Procesamiento de imagenes con matlabProcesamiento de imagenes con matlab
Procesamiento de imagenes con matlab
 
Teoria de la decisión
Teoria de la decisiónTeoria de la decisión
Teoria de la decisión
 
Topología matemática preguntas.docx
Topología matemática preguntas.docxTopología matemática preguntas.docx
Topología matemática preguntas.docx
 
Manipulacion de matrices
Manipulacion de matricesManipulacion de matrices
Manipulacion de matrices
 
Matrices
MatricesMatrices
Matrices
 
Teoria de la información
Teoria de la informaciónTeoria de la información
Teoria de la información
 
Trabajo autonomo
Trabajo autonomoTrabajo autonomo
Trabajo autonomo
 

Recently uploaded

CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordAsst.prof M.Gokilavani
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...ranjana rawat
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).pptssuser5c9d4b1
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...ranjana rawat
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINESIVASHANKAR N
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduitsrknatarajan
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...roncy bisnoi
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...Call Girls in Nagpur High Profile
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college projectTonystark477637
 

Recently uploaded (20)

Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduits
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
 

Investigación Ensambladores y Decompiladores

  • 1. PONTIFICIA UNIVERSIDAD CATÓLICA DEL ECUADOR SEDE IBARRA Nombre: Liliana Chisaguano Nivel: 5to semestre Carrera: Ingeniería en Sistemas Fecha: 21/04/2017 Investigación Ensambladores y Decompiladores  INSTALACIÓN VISUAL BASIC DECOMPILER LITE
  • 2. DECOMPILACIÓN DE CALCULADORA EN VISUAL BASIC DECOMPILER LITE
  • 3.
  • 4. CODIGO: Begin VB.Form Form1 Caption = "Calculadora by marco" ScaleMode = 1 AutoRedraw = False FontTransparent = True BorderStyle = 4 'Fixed ToolWindow 'Icon = n/a LinkTopic = "Form1" MaxButton = 0 'False MinButton = 0 'False ClientLeft = 45 ClientTop = 285 ClientWidth = 3975
  • 5. ClientHeight = 3195 ShowInTaskbar = 0 'False StartUpPosition = 3 'Windows Default Begin CommandButton salir Caption = "Salir" Left = 2160 Top = 2520 Width = 1695 Height = 495 TabIndex = 11 End Begin CommandButton new Caption = "Nuevo calculo" Left = 120 Top = 2520 Width = 1695 Height = 495 TabIndex = 10 End Begin CommandButton dividir Caption = "/" Left = 3240 Top = 1800 Width = 615 Height = 495 TabIndex = 9 BeginProperty Font Name = "MS Sans Serif" Size = 13,5 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty End Begin CommandButton por Caption = "x" Left = 2160 Top = 1800 Width = 615 Height = 495 TabIndex = 8 BeginProperty Font Name = "MS Sans Serif" Size = 13,5 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty End Begin CommandButton restar Caption = "-" Left = 1200 Top = 1800 Width = 615 Height = 495 TabIndex = 7 BeginProperty Font Name = "MS Sans Serif"
  • 6. Size = 13,5 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty End Begin CommandButton sumar Caption = "+" Left = 120 Top = 1800 Width = 615 Height = 495 TabIndex = 6 BeginProperty Font Name = "MS Sans Serif" Size = 13,5 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty End Begin TextBox res Left = 1680 Top = 1080 Width = 1215 Height = 405 TabIndex = 5 BeginProperty Font Name = "MS Sans Serif" Size = 9,75 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty End Begin TextBox can2 Left = 1680 Top = 600 Width = 1215 Height = 405 TabIndex = 4 BeginProperty Font Name = "MS Sans Serif" Size = 9,75 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty End Begin TextBox can1 Left = 1680 Top = 120 Width = 1215 Height = 405 TabIndex = 3
  • 7. BeginProperty Font Name = "MS Sans Serif" Size = 9,75 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty End Begin Label Label3 Caption = "Resultado" Left = 240 Top = 1200 Width = 1095 Height = 255 TabIndex = 2 BeginProperty Font Name = "MS Sans Serif" Size = 9,75 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty End Begin Label Label2 Caption = "Cantidad2" Left = 240 Top = 720 Width = 1095 Height = 615 TabIndex = 1 BeginProperty Font Name = "MS Sans Serif" Size = 9,75 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty End Begin Label Label1 Caption = "Cantidad1" Left = 240 Top = 240 Width = 1215 Height = 495 TabIndex = 0 BeginProperty Font Name = "MS Sans Serif" Size = 9,75 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty End End Attribute VB_Name = "Form1"
  • 8. DECOMPILACION DIRTEL EN VISUAL BASIC DECOMPILER LITE
  • 9.
  • 10.
  • 11.
  • 12.
  • 13. CODIGO: Begin VB.Form Form1 Caption = "Directorio Telefónico - Autor: Edison Morales" BackColor = &H808000& ScaleMode = 1 AutoRedraw = False FontTransparent = True BorderStyle = 0 'None Icon = "Form1.frx":0 LinkTopic = "Form1" MaxButton = 0 'False ClientLeft = 150 ClientTop = 435 ClientWidth = 7425 ClientHeight = 5700 StartUpPosition = 2 'CenterScreen Begin ProgressBar Progreso Left = 1200 Top = 5280 Width = 4815 Height = 255 Visible = 0 'False TabIndex = 27 End Begin CommonDialog Dialogo End Begin CommandButton cmdUltimo Left = 2160 Top = 4680 Width = 615 Height = 495 TabIndex = 24 Picture = "Form1.frx":44A ToolTipText = "Ultimo" MaskColor = &H808080& Style = 1 End Begin CommandButton cmdSiguiente Left = 1560 Top = 4680 Width = 615 Height = 495 TabIndex = 23 Picture = "Form1.frx":5BC ToolTipText = "Siguiente" MaskColor = &H808080& Style = 1 End Begin CommandButton cmdAnterior Left = 960 Top = 4680 Width = 615 Height = 495 TabIndex = 22 Picture = "Form1.frx":72E ToolTipText = "Anterior" MaskColor = &H808080& Style = 1 End Begin CommandButton cmdInicio Left = 360
  • 14. Top = 4680 Width = 615 Height = 495 TabIndex = 21 Picture = "Form1.frx":8A0 ToolTipText = "Primero" MaskColor = &H808080& Style = 1 End Begin CommandButton cmdGuardar Left = 4320 Top = 4680 Width = 615 Height = 495 TabIndex = 9 Picture = "Form1.frx":A12 ToolTipText = "Guardar" MaskColor = &H808080& Style = 1 End Begin CommandButton cmdEditar Left = 3720 Top = 4680 Width = 615 Height = 495 TabIndex = 8 Picture = "Form1.frx":B84 ToolTipText = "Editar" MaskColor = &H808080& Style = 1 End Begin CommandButton cmdSalir Left = 6480 Top = 4680 Width = 615 Height = 495 TabIndex = 13 Picture = "Form1.frx":CF6 ToolTipText = "Salir" MaskColor = &H808080& Style = 1 End Begin CommandButton cmdBuscar Left = 5520 Top = 4680 Width = 615 Height = 495 TabIndex = 11 Picture = "Form1.frx":E68 ToolTipText = "Buscar" MaskColor = &H808080& Style = 1 End Begin CommandButton cmdEliminar Left = 4920 Top = 4680 Width = 615 Height = 495 TabIndex = 10 Picture = "Form1.frx":FDA ToolTipText = "Eliminar" MaskColor = &H808080&
  • 15. Style = 1 End Begin CommandButton cmdNuevo Left = 3120 Top = 4680 Width = 615 Height = 495 TabIndex = 7 Picture = "Form1.frx":114C ToolTipText = "Nuevo" MaskColor = &H808080& Style = 1 End Begin Frame Frame1 Caption = "Datos Personales" BackColor = &HC0C000& Left = 120 Top = 240 Width = 7095 Height = 4215 TabIndex = 12 Begin TextBox txtNombre ForeColor = &H0& Left = 1800 Top = 720 Width = 4335 Height = 375 TabIndex = 0 BeginProperty Font Name = "Courier New" Size = 9,75 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty End Begin TextBox txtApellido ForeColor = &H0& Left = 1800 Top = 1200 Width = 4335 Height = 375 TabIndex = 1 BeginProperty Font Name = "Courier New" Size = 9,75 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty End Begin TextBox txtDireccion ForeColor = &H0& Left = 1800 Top = 1680 Width = 5055 Height = 405 TabIndex = 2 BeginProperty Font
  • 16. Name = "Courier New" Size = 9,75 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty End Begin TextBox txtTelCasa ForeColor = &H0& Left = 1800 Top = 2160 Width = 2175 Height = 405 TabIndex = 3 BeginProperty Font Name = "Courier New" Size = 9,75 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty End Begin TextBox txtTelOfic ForeColor = &H0& Left = 1800 Top = 2640 Width = 2175 Height = 405 TabIndex = 4 BeginProperty Font Name = "Courier New" Size = 9,75 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty End Begin TextBox txtCelular ForeColor = &H0& Left = 1800 Top = 3120 Width = 2175 Height = 405 TabIndex = 5 BeginProperty Font Name = "Courier New" Size = 9,75 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty End Begin TextBox txtEmail ForeColor = &H0& Left = 1800
  • 17. Top = 3600 Width = 4335 Height = 405 TabIndex = 6 BeginProperty Font Name = "Courier New" Size = 9,75 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty End Begin Label lblReg ForeColor = &H0& Left = 1800 Top = 240 Width = 1695 Height = 375 TabIndex = 26 BorderStyle = 1 'Fixed Single Alignment = 2 'Center BeginProperty Font Name = "Courier New" Size = 9,75 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty End Begin Label Label1 Caption = "REGISTRO" BackColor = &HC0C000& Left = 120 Top = 360 Width = 1095 Height = 255 TabIndex = 25 End Begin Label Label2 Caption = "NOMBRE" BackColor = &HC0C000& Left = 120 Top = 840 Width = 1455 Height = 255 TabIndex = 20 End Begin Label Label3 Caption = "APELLIDO" BackColor = &HC0C000& Left = 120 Top = 1320 Width = 1455 Height = 255 TabIndex = 19 End Begin Label Label4 Caption = "DIRECCION"
  • 18. BackColor = &HC0C000& Left = 120 Top = 1800 Width = 1455 Height = 255 TabIndex = 18 End Begin Label Label5 Caption = "TELEFONO CASA" BackColor = &HC0C000& Left = 120 Top = 2280 Width = 1575 Height = 255 TabIndex = 17 End Begin Label Label6 Caption = "TELEFONO OFICINA" BackColor = &HC0C000& Left = 120 Top = 2760 Width = 1815 Height = 255 TabIndex = 16 End Begin Label Label7 Caption = "CELULAR" BackColor = &HC0C000& Left = 120 Top = 3240 Width = 1455 Height = 255 TabIndex = 15 End Begin Label Label8 Caption = "EMAIL" BackColor = &HC0C000& Left = 120 Top = 3720 Width = 1455 Height = 255 TabIndex = 14 End End Begin Menu mnuArchivo Caption = "&Archivo" Begin Menu mnuOrdenar Caption = "&Ordenar" Shortcut = 15 End Begin Menu mnuImprimir Caption = "&Imprimir" Shortcut = 16 End Begin Menu mnuSalir Caption = "&Salir" Shortcut = 17 End End Begin Menu mnuRegistro Caption = "&Registro"
  • 19. Begin Menu mnuNuevo Caption = "&Nuevo" End Begin Menu mnuEditar Caption = "E&ditar" End Begin Menu mnuGuardar Caption = "&Guardar" End Begin Menu mnuEliminar Caption = "&Eliminar" End Begin Menu mnuBuscar Caption = "&Buscar" End End Begin Menu mnuMover Caption = "&Mover" Begin Menu mnuPrimero Caption = "&Primero" End Begin Menu mnuAnterior Caption = "&Anterior" End Begin Menu mnuSiguiente Caption = "&Siguiente" End Begin Menu mnuUltimo Caption = "&Ultimo" End End Begin Menu mnuAyuda Caption = "?" Begin Menu mnuAcercaDe Caption = "Acerca de" End End End Attribute VB_Name = "Form1" Begin VB.Form Form2 Caption = "Buscar" BackColor = &HFF8080& ScaleMode = 1 AutoRedraw = False FontTransparent = True 'Icon = n/a LinkTopic = "Form2" MaxButton = 0 'False MinButton = 0 'False ClientLeft = 60 ClientTop = 345 ClientWidth = 5640 ClientHeight = 2130 ShowInTaskbar = 0 'False StartUpPosition = 1 'CenterOwner Begin CommandButton cmdCancelar Caption = "Cancelar" Left = 3000 Top = 1440 Width = 1455 Height = 375 TabIndex = 5
  • 20. BeginProperty Font Name = "MS Sans Serif" Size = 9,75 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty End Begin CommandButton cmdAceptar Caption = "Aceptar" Left = 1200 Top = 1440 Width = 1455 Height = 375 TabIndex = 4 BeginProperty Font Name = "MS Sans Serif" Size = 9,75 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty End Begin TextBox Text1 Left = 2400 Top = 720 Width = 3015 Height = 375 TabIndex = 3 End Begin ComboBox Combo1 Style = 2 Left = 240 Top = 720 Width = 1815 Height = 315 TabIndex = 2 End Begin Label Label2 Caption = "Valor" BackColor = &HFF8080& ForeColor = &H800000& Left = 2520 Top = 360 Width = 1095 Height = 255 TabIndex = 1 BeginProperty Font Name = "MS Sans Serif" Size = 8,25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty End
  • 21. Begin Label Label1 Caption = "Campo" BackColor = &HFF8080& ForeColor = &H800000& Left = 240 Top = 360 Width = 1095 Height = 255 TabIndex = 0 BeginProperty Font Name = "MS Sans Serif" Size = 8,25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty End End Attribute VB_Name = "Form2" Begin VB.Form Form3 Caption = "Acerca del Autor" ScaleMode = 1 AutoRedraw = False FontTransparent = True 'Icon = n/a LinkTopic = "Form3" MaxButton = 0 'False MinButton = 0 'False ClientLeft = 60 ClientTop = 345 ClientWidth = 5130 ClientHeight = 2865 ShowInTaskbar = 0 'False StartUpPosition = 1 'CenterOwner Begin CommandButton cmdCerrar Caption = "Cerrar" Left = 1800 Top = 2400 Width = 1455 Height = 375 TabIndex = 5 End Begin Label Label4 Caption = "Ingeniero de Sistemas" ForeColor = &H80& Left = 2040 Top = 1080 Width = 1575 Height = 255 TabIndex = 7 End Begin Image Image1 Picture = "Form3.frx":0 Left = 240 Top = 120 Width = 480 Height = 480 End
  • 22. Begin Label Label3 Caption = "Directorio Telefónico" ForeColor = &H40C0& Left = 1080 Top = 120 Width = 3735 Height = 375 TabIndex = 6 BeginProperty Font Name = "Verdana" Size = 14,25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty End Begin Label Label5 Caption = "URL:" Left = 600 Top = 1560 Width = 495 Height = 255 TabIndex = 4 BeginProperty Font Name = "MS Sans Serif" Size = 8,25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty End Begin Label lblBaul Caption = "http://es.geocities.com/baul_informatico" ForeColor = &HFF0000& Left = 1440 Top = 1920 Width = 2895 Height = 255 MousePointer = 99 'Custom TabIndex = 3 MouseIcon = "Form3.frx":44A BeginProperty Font Name = "MS Sans Serif" Size = 8,25 Charset = 0 Weight = 400 Underline = -1 'True Italic = 0 'False Strikethrough = 0 'False EndProperty End Begin Label lblPersonal Caption = "http://es.geocities.com/edisonml72" ForeColor = &HFF0000& Left = 1440 Top = 1560 Width = 2535 Height = 255 MousePointer = 99 'Custom TabIndex = 2
  • 23. MouseIcon = "Form3.frx":59C BeginProperty Font Name = "MS Sans Serif" Size = 8,25 Charset = 0 Weight = 400 Underline = -1 'True Italic = 0 'False Strikethrough = 0 'False EndProperty End Begin Label Label2 Caption = "Edison Morales Lizarazo" ForeColor = &H800000& Left = 1440 Top = 840 Width = 2895 Height = 255 TabIndex = 1 BeginProperty Font Name = "Arial" Size = 12 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty End Begin Label Label1 Caption = "Autor:" Left = 600 Top = 840 Width = 495 Height = 255 TabIndex = 0 BeginProperty Font Name = "MS Sans Serif" Size = 8,25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty End End Attribute VB_Name = "Form3"
  • 25. 1° PROGRAMA CALCULADORA JAVA EN JAVA DECOMPILER package Calc.src.Calculadora; import java.awt.Container; import java.awt.Dimension; import java.awt.Font; import java.awt.Rectangle; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.KeyAdapter; import java.awt.event.KeyEvent; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JScrollPane; import javax.swing.JTextArea; import org.netbeans.lib.awtextra.AbsoluteConstraints; import org.netbeans.lib.awtextra.AbsoluteLayout; public class Calculadora extends JFrame { private JButton jButton0; private JButton jButton1; private JButton jButton10; private JButton jButton11; private JButton jButton2; private JButton jButton3; private JButton jButton4; private JButton jButton5; private JButton jButton6; private JButton jButton7; private JButton jButton8; private JButton jButton9; private JButton jButtonClear; private JButton jButtonDividir; private JButton jButtonIgual; private JButton jButtonSoma; private JButton jButtonSub; private JButton jButtonVezes; private JScrollPane jScrollPane1; private JTextArea jVisor; void clear(String textt) { String texto = this.jVisor.getText();
  • 26. int tamanho = texto.length(); if (texto.equals("")) { this.jVisor.setText(""); } else { this.jVisor.setText(texto.substring(0, tamanho - 1)); } } public static long validaLong(String nu) { long a = Long.parseLong(nu); return a; } public double validaDouble(String num) { double a = Double.parseDouble(num); return a; } public Calculadora() { initComponents(); } private void initComponents() { this.jButtonSub = new JButton(); this.jButtonClear = new JButton(); this.jButton0 = new JButton(); this.jButtonIgual = new JButton(); this.jButtonSoma = new JButton(); this.jButton8 = new JButton(); this.jButton9 = new JButton(); this.jButton6 = new JButton(); this.jButton7 = new JButton(); this.jButton4 = new JButton(); this.jButton5 = new JButton(); this.jButtonVezes = new JButton(); this.jButtonDividir = new JButton(); this.jButton3 = new JButton(); this.jButton2 = new JButton(); this.jButton1 = new JButton(); this.jButton10 = new JButton(); this.jButton11 = new JButton(); this.jScrollPane1 = new JScrollPane(); this.jVisor = new JTextArea(); setDefaultCloseOperation(3); setTitle("Calculadora"); setBounds(new Rectangle(0, 0, 240, 300)); setMinimumSize(new Dimension(12, 24)); getContentPane().setLayout( new AbsoluteLayout()); this.jButtonSub.setText("-"); this.jButtonSub.setMaximumSize(new Dimension(39, 23)); this.jButtonSub.setMinimumSize(new Dimension(39, 23)); this.jButtonSub.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { Calculadora.this.jButtonSubActionPerformed(evt); } }); getContentPane().add( this.jButtonSub, new AbsoluteConstraints(130, 120, 41, 32)); this.jButtonClear.setText("C");
  • 27. this.jButtonClear.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { Calculadora.this.jButtonClearActionPerformed(evt); } }); getContentPane().add( this.jButtonClear, new AbsoluteConstraints(90, 240, -1, 30)); this.jButton0.setText("0"); this.jButton0.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { Calculadora.this.jButton0ActionPerformed(evt); } }); getContentPane().add( this.jButton0, new AbsoluteConstraints(50, 240, -1, -1)); this.jButtonIgual.setText("="); this.jButtonIgual.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { Calculadora.this.jButtonIgualActionPerformed(evt); } }); this.jButtonIgual.addKeyListener(new KeyAdapter() { public void keyPressed(KeyEvent evt) { jButtonIgualKeyPressed(evt); } private void jButtonIgualKeyPressed(KeyEvent evt) {} }); getContentPane().add( this.jButtonIgual, new AbsoluteConstraints(130, 200, 42, 70)); this.jButtonSoma.setFont(new Font("Tahoma", 0, 8)); this.jButtonSoma.setText("+"); this.jButtonSoma.setPreferredSize(new Dimension(39, 22)); this.jButtonSoma.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { Calculadora.this.jButtonSomaActionPerformed(evt); } }); getContentPane().add( this.jButtonSoma, new AbsoluteConstraints(90, 120, 40, 30)); this.jButton8.setText("8"); this.jButton8.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { Calculadora.this.jButton8ActionPerformed(evt); } }); getContentPane().add( this.jButton8, new AbsoluteConstraints(50, 180, -1, -1)); this.jButton9.setText("9"); this.jButton9.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) {
  • 28. Calculadora.this.jButton9ActionPerformed(evt); } }); getContentPane().add( this.jButton9, new AbsoluteConstraints(50, 210, -1, -1)); this.jButton6.setText("6"); this.jButton6.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { Calculadora.this.jButton6ActionPerformed(evt); } }); getContentPane().add( this.jButton6, new AbsoluteConstraints(50, 120, -1, -1)); this.jButton7.setText("7"); this.jButton7.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { Calculadora.this.jButton7ActionPerformed(evt); } }); getContentPane().add( this.jButton7, new AbsoluteConstraints(50, 150, -1, -1)); this.jButton4.setText("4"); this.jButton4.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { Calculadora.this.jButton4ActionPerformed(evt); } }); getContentPane().add( this.jButton4, new AbsoluteConstraints(10, 210, -1, -1)); this.jButton5.setText("5"); this.jButton5.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { Calculadora.this.jButton5ActionPerformed(evt); } }); getContentPane().add( this.jButton5, new AbsoluteConstraints(10, 240, -1, -1)); this.jButtonVezes.setText("*"); this.jButtonVezes.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { Calculadora.this.jButtonVezesActionPerformed(evt); } }); getContentPane().add( this.jButtonVezes, new AbsoluteConstraints(90, 150, 40, 30)); this.jButtonDividir.setText("/"); this.jButtonDividir.setMaximumSize(new Dimension(39, 23)); this.jButtonDividir.setMinimumSize(new Dimension(39, 23)); this.jButtonDividir.addActionListener(new ActionListener() {
  • 29. public void actionPerformed(ActionEvent evt) { Calculadora.this.jButtonDividirActionPerformed(evt); } }); getContentPane().add( this.jButtonDividir, new AbsoluteConstraints(90, 180, 39, 30)); this.jButton3.setText("3"); this.jButton3.setToolTipText(""); this.jButton3.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { Calculadora.this.jButton3ActionPerformed(evt); } }); getContentPane().add( this.jButton3, new AbsoluteConstraints(10, 180, -1, -1)); this.jButton2.setText("2"); this.jButton2.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { Calculadora.this.jButton2ActionPerformed(evt); } }); getContentPane().add( this.jButton2, new AbsoluteConstraints(10, 150, -1, -1)); this.jButton1.setText("1"); this.jButton1.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { Calculadora.this.jButton1ActionPerformed(evt); } }); getContentPane().add( this.jButton1, new AbsoluteConstraints(10, 120, -1, -1)); this.jButton10.setFont(new Font("Tahoma", 0, 8)); this.jButton10.setText("CE"); this.jButton10.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { Calculadora.this.jButton10ActionPerformed(evt); } }); getContentPane().add( this.jButton10, new AbsoluteConstraints(130, 150, 42, 43)); this.jButton11.setText("."); this.jButton11.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { Calculadora.this.jButton11ActionPerformed(evt); } }); getContentPane().add( this.jButton11, new AbsoluteConstraints(90, 210, 39, 30)); this.jScrollPane1.setAutoscrolls(true);
  • 30. this.jScrollPane1.setMaximumSize(new Dimension(100, 100)); this.jVisor.setEditable(false); this.jVisor.setColumns(20); this.jVisor.setLineWrap(true); this.jVisor.setRows(5); this.jVisor.setTabSize(5); this.jVisor.setAutoscrolls(false); this.jVisor.addKeyListener(new KeyAdapter() { public void keyPressed(KeyEvent evt) { Calculadora.this.jVisorKeyPressed(evt); } }); this.jScrollPane1.setViewportView(this.jVisor); getContentPane().add( this.jScrollPane1, new AbsoluteConstraints(10, 11, 160, 100)); pack(); } private void jButton9ActionPerformed(ActionEvent evt) { String texto = this.jVisor.getText(); this.jVisor.setText(texto + "9"); } private void jButton7ActionPerformed(ActionEvent evt) { String texto = this.jVisor.getText(); this.jVisor.setText(texto + "7"); } private void jButton1ActionPerformed(ActionEvent evt) { String texto = this.jVisor.getText(); this.jVisor.setText(texto + "1"); } private void jButton2ActionPerformed(ActionEvent evt) { String texto = this.jVisor.getText(); this.jVisor.setText(texto + "2"); } private void jButton3ActionPerformed(ActionEvent evt) { String texto = this.jVisor.getText(); this.jVisor.setText(texto + "3"); } private void jButton4ActionPerformed(ActionEvent evt) { String texto = this.jVisor.getText(); this.jVisor.setText(texto + "4"); } private void jButton5ActionPerformed(ActionEvent evt) { String texto = this.jVisor.getText(); this.jVisor.setText(texto + "5"); } private void jButton6ActionPerformed(ActionEvent evt) { String texto = this.jVisor.getText(); this.jVisor.setText(texto + "6"); } private void jButton8ActionPerformed(ActionEvent evt) { String texto = this.jVisor.getText(); this.jVisor.setText(texto + "8"); }
  • 31. private void jButton0ActionPerformed(ActionEvent evt) { String texto = this.jVisor.getText(); this.jVisor.setText(texto + "0"); } private void jButtonSomaActionPerformed(ActionEvent evt) { String texto = this.jVisor.getText(); this.jVisor.setText(texto + " + "); } private void jButtonIgualActionPerformed(ActionEvent evt) { String tex = this.jVisor.getText(); String textt = String.valueOf(tex.length()); String[] linhas = tex.split(" "); String[] arrayOfString1; int j = (arrayOfString1 = linhas).length; for (int i = 0; i < j; i++) { String str1 = arrayOfString1[i]; } String num1 = linhas[0]; String num2 = linhas[2]; for (int i = 0; i < linhas.length; i++) { if (linhas[i].equals("+")) { if ((num1.contains(".") | num2.contains("."))) { double numd = validaDouble(num1); double numd2 = validaDouble(num2); double result = numd + numd2; String res = String.valueOf(result); this.jVisor.setText(res); } else { long a = validaLong(num1); long b = validaLong(num2); long result = a + b; String res = String.valueOf(result); this.jVisor.setText(res); } } if (linhas[i].equals("*")) { if ((num1.contains(".") | num2.contains("."))) { double numd = validaDouble(num1); double numd2 = validaDouble(num2); double result = numd * numd2; String res = String.valueOf(result); this.jVisor.setText(res); } else { long a = validaLong(num1); long b = validaLong(num2); long result = a * b; String res = String.valueOf(result); this.jVisor.setText(res); } } if (linhas[i].equals("-")) { if ((num1.contains(".") | num2.contains("."))) { double numd = validaDouble(num1); double numd2 = validaDouble(num2); double result = numd - numd2; String res = String.valueOf(result); this.jVisor.setText(res); } else {
  • 32. long a = validaLong(num1); long b = validaLong(num2); long result = a - b; String res = String.valueOf(result); this.jVisor.setText(res); } } if (linhas[i].equals("/")) { String num = String.valueOf(num1); String nume = String.valueOf(num2); double a = Double.parseDouble(num); double b = Double.parseDouble(nume); try { if (((a == 0.0D ? 1 : 0) | (b == 0.0D ? 1 : 0)) != 0) { this.jVisor.setText("Divisor nao pode ser 0"); } else { double result = a / b; String res = String.valueOf(result); this.jVisor.setText(res); } } catch (Exception e) { e.printStackTrace(); } } } } private void jButton10ActionPerformed(ActionEvent evt) { this.jVisor.setText(""); } private void jButtonClearActionPerformed(ActionEvent evt) { String texto = this.jVisor.getText(); int tamanho = texto.length(); if (texto.equals("")) { this.jVisor.setText(""); } else { this.jVisor.setText(texto.substring(0, tamanho - 1)); } } private void jButtonDividirActionPerformed(ActionEvent evt) { String texto = this.jVisor.getText(); this.jVisor.setText(texto + " / "); } private void jButtonVezesActionPerformed(ActionEvent evt) { String texto = this.jVisor.getText(); this.jVisor.setText(texto + " * "); } private void jButton11ActionPerformed(ActionEvent evt) { String texto = this.jVisor.getText(); this.jVisor.setText(texto + "."); } private void jButtonSubActionPerformed(ActionEvent evt) { String texto = this.jVisor.getText(); this.jVisor.setText(texto + " - "); } private void jVisorKeyPressed(KeyEvent evt) { if (evt.getKeyCode() == 107) { String texto = this.jVisor.getText(); this.jVisor.setText(texto + " + "); }
  • 33. if (evt.getKeyCode() == 109) { String texto = this.jVisor.getText(); this.jVisor.setText(texto + " - "); } if (evt.getKeyCode() == 111) { String texto = this.jVisor.getText(); this.jVisor.setText(texto + " / "); } if (evt.getKeyCode() == 106) { String texto = this.jVisor.getText(); this.jVisor.setText(texto + " * "); } if (evt.getKeyCode() == 97) { String texto = this.jVisor.getText(); this.jVisor.setText(texto + "1"); } if (evt.getKeyCode() == 96) { String texto = this.jVisor.getText(); this.jVisor.setText(texto + "0"); } if (evt.getKeyCode() == 98) { String texto = this.jVisor.getText(); this.jVisor.setText(texto + "2"); } if (evt.getKeyCode() == 99) { String texto = this.jVisor.getText(); this.jVisor.setText(texto + "3"); } if (evt.getKeyCode() == 100) { String texto = this.jVisor.getText(); this.jVisor.setText(texto + "4"); } if (evt.getKeyCode() == 101) { String texto = this.jVisor.getText(); this.jVisor.setText(texto + "5"); } if (evt.getKeyCode() == 102) { String texto = this.jVisor.getText(); this.jVisor.setText(texto + "6"); } if (evt.getKeyCode() == 103) { String texto = this.jVisor.getText(); this.jVisor.setText(texto + "7"); } if (evt.getKeyCode() == 104) { String texto = this.jVisor.getText(); this.jVisor.setText(texto + "8"); } if (evt.getKeyCode() == 105) { String texto = this.jVisor.getText(); this.jVisor.setText(texto + "9"); } if (evt.getKeyCode() == 8) { String texto = this.jVisor.getText(); clear(texto); } if (evt.getKeyCode() == 127) { this.jVisor.setText(""); } if (evt.getKeyCode() == 110) { String texto = this.jVisor.getText(); this.jVisor.setText(texto + "."); } if (evt.getKeyCode() == 10) { String tex = this.jVisor.getText(); String textt = String.valueOf(tex.length()); String[] linhas = tex.split(" ");
  • 34. String[] arrayOfString1; int j = (arrayOfString1 = linhas).length; for (int i = 0; i < j; i++) { String str1 = arrayOfString1[i]; } String num1 = linhas[0]; String num2 = linhas[2]; for (int i = 0; i < linhas.length; i++) { if (linhas[i].equals("+")) { if ((num1.contains(".") | num2.contains("."))) { double numd = validaDouble(num1); double numd2 = validaDouble(num2); double result = numd + numd2; String res = String.valueOf(result); this.jVisor.setText(res); } else { long a = validaLong(num1); long b = validaLong(num2); long result = a + b; String res = String.valueOf(result); this.jVisor.setText(res); } } if (linhas[i].equals("*")) { if ((num1.contains(".") | num2.contains("."))) { double numd = validaDouble(num1); double numd2 = validaDouble(num2); double result = numd * numd2; String res = String.valueOf(result); this.jVisor.setText(res); } else { long a = validaLong(num1); long b = validaLong(num2); long result = a * b; String res = String.valueOf(result); this.jVisor.setText(res); } } if (linhas[i].equals("-")) { if ((num1.contains(".") | num2.contains("."))) { double numd = validaDouble(num1); double numd2 = validaDouble(num2); double result = numd - numd2; String res = String.valueOf(result); this.jVisor.setText(res); } else { long a = validaLong(num1); long b = validaLong(num2); long result = a - b; String res = String.valueOf(result); this.jVisor.setText(res); } } if (linhas[i].equals("/")) { String num = String.valueOf(num1); String nume = String.valueOf(num2); double a = Double.parseDouble(num); double b = Double.parseDouble(nume); try { if (((a == 0.0D ? 1 : 0) | (b == 0.0D ? 1 : 0)) != 0) { this.jVisor.setText("Divisor nao pode ser 0"); } else {
  • 35. double result = a / b; String res = String.valueOf(result); this.jVisor.setText(res); } } catch (Exception e) { e.printStackTrace(); } } } } }} package Calc.src.Calculadora; import java.awt.EventQueue; import java.util.logging.Level; import java.util.logging.Logger; import javax.swing.UIManager; import javax.swing.UIManager.LookAndFeelInfo; import javax.swing.UnsupportedLookAndFeelException; public class CalculadoraT{ public static void main(String[] args) { try { UIManager.LookAndFeelInfo[] arrayOfLookAndFeelInfo; int j = (arrayOfLookAndFeelInfo = UIManager.getInstalledLookAndFeels()).length; for (int i = 0; i < j; i++) { UIManager.LookAndFeelInfo info = arrayOfLookAndFeelInfo[i]; if ("Nimbus".equals(info.getName())) { UIManager.setLookAndFeel(info.getClassName()); break; } } } catch (ClassNotFoundException ex) { Logger.getLogger(Calculadora.class.getName()).log(Level.SEVERE, null, ex); } catch (InstantiationException ex) { Logger.getLogger(Calculadora.class.getName()).log(Level.SEVERE, null, ex); } catch (IllegalAccessException ex) { Logger.getLogger(Calculadora.class.getName()).log(Level.SEVERE, null, ex); } catch (UnsupportedLookAndFeelException ex) { Logger.getLogger(Calculadora.class.getName()).log(Level.SEVERE, null, ex); } EventQueue.invokeLater(new Runnable() { public void run() { new Calculadora().setVisible(true); } }); }} package Calc.src.Calculadora; import javax.swing.JTextArea; public class ValidaIgual{ public static long validaLong(String nu) { long a = Long.parseLong(nu); return a; } public String valida(String texto) { JTextArea texo = new JTextArea(); String text = String.valueOf(texto.length()); String[] linhas = texto.split(" ");
  • 36. String num1 = linhas[0]; String num2 = linhas[2]; for (int i = 0; i < linhas.length; i++) { if (linhas[i].equals("+")) { long a = validaLong(num1); long b = validaLong(num2); long result = a + b; String res = String.valueOf(result); texo.setText(res); } if (linhas[i].equals("*")) { long a = validaLong(num1); long b = validaLong(num2); long result = a * b; String res = String.valueOf(result); texo.setText(res); } if (linhas[i].equals("-")) { long a = validaLong(num1); long b = validaLong(num2); long result = a - b; String res = String.valueOf(result); texo.setText(res); } if (linhas[i].equals("/")) { String num = String.valueOf(num1); String nume = String.valueOf(num2); double a = Double.parseDouble(num); double b = Double.parseDouble(nume); double result = a / b; String res = String.valueOf(result); texo.setText(res); } } return texto; } } 2° PROGRAMA AHORCADO EN JAVA DESCOMPILER package ahorcado.algoritmo; import java.io.PrintStream; public class AlgoritmoAhorcado { private boolean gana; private int ganar = 0; private Character[] posiciones = new Character[this.palabra.length()]; private String palabra = palabraAleatoria(); private String[] programacion = { "CATCH", "WHILE", "FOR", "ELSE", "VISUAL", "COMPUTADORES", "COMPILACION", "EJECUCION", "FUENTE", "MEMORIA", "DISCO", "WEB", "ALGORITMO", "PROGRAMA", "ORIENTADA", "ESTRUCTURA", "SENTENCIA", "PROCESADOR", "CODIGO", "MAQUINA", "OBJETO", "NIVEL", "MICROSOFT", "WINDOWS", "UNIX", "EJECUTABLE", "SOFTWARE", "HARDWARE", "EVENTO", "ESCUCHADOR", "ERROR", "EXCEPCION", "BUFFERED", "UBUNTU", "MOZILLA" }; private String[] tecnologia = { "ORDENADOR", "PC", "MEMORIA", "CD", "DVD", "MOVIL", "WIFI", "SATELITE", "INTERNET", "REDES", "TELEMATICA", "TELEFONIA", "VIDEOJUEGOS", "CONSOLAS", "IPHONE", "INDUSTRIALES", "TELECOMUNICACIONES", "SISTEMAS", "INFORMATICA", "ORDENADOR", "COMPUTADORAS", "ARTEFACTO", "OPERACION", "INGENIERIA", "PROTOTIPO", "MECANICA", "ELECTRONICA", "ELECTRICIDAD", "AERONAUTICA", "TERMICO", "INFORMACION", "CALCULO", "AUTOMATICO", "MAQUINA", "EMPRESA", "INNOVACION", "COMPETIDORES",
  • 37. "MONOPOLIO", "MEDIOS", "SATELITE", "TELEFONO", "CELULARES", "CIRCUITOS", "ENERGIA", "INFRAESTRUCTURA", "COMUNICACIONES" }; private String[] personajes = { "PICASSO", "DAVINCI", "ALBERTI", "VELAZQUEZ", "CONGORA", "LORCA", "DALY", "GOYA", "GAUDI", "GAUSS", "MICKEYMOUSE", "DONALD", "DAREK", "CLINTON", "COUSTEAU", "OBAMA", "AZNAR", "ZAPATERO", "RAJOY", "CHIKILICUATRE", "PIOLIN", "BUENAFUENTE", "SILVESTRE", "CORRECAMINOS", "PLUTO", "GOOFY", "GALLARDON", "ZAPLANA", "NARUTO", "RUBALCABA", "BLANCO", "TRINI", "CERVANTES", "GARCILASO", "MARCOPOLO", "NARVAEZ", "CHAVEZ", "WASHINGTON", "JEFFERSON", "LINCON", "ROOSEVELT", "BUSH", "KENNEDY", "FORD", "FRANKLIN", "NIXON", "CARTER", "REAGAN", "JACKSON", "SAMANIEGO", "MACHADO", "CURIE", "SHAKESPEARE", "QUEVEDO", "GONGORA", "BECQUER", "LORCA", "ALBERTI", "CERNUDA", "ALEIXANDRE", "NERUDA", "CELA", "OTERO", "GALILEO", "NEWTON", "LAPLACE", "POISSON", "KELVIN", "MAXWELL", "COULOMB", "FARADAY", "HERTZ", "GIBBS", "HAMILTON", "CASILLAS", "HIERRO", "REDONDO", "TORRES", "RAUL", "MARUJITA", "ALONSO", "BELENESTEBAN", "NADAL", "GASOL", "BISBAL", "BUSTAMANTE", "RIHANA", "IRONMAN", "SUPERMAN", "BATMAN", "MARADONA", "ACOSTA", "BATISTA", "IGARTIBURU", "MINIE", "HULK", "SHAKIRA", "CIVERA" }; private String[] musica = { "MUSICAL", "CANCION", "TROMBON", "FLAUTA", "VIOLIN", "CLASICA", "MODERNA", "CORCEA", "SEMIFUSA", "REDONDA", "NEGRA", "BLANCA", "SILENCIO", "SONIDO", "PENTAGRAMA", "NOTAS", "PARTITURA", "ARMONIA", "MELODIA", "DURACION", "ALTURA", "LATINA", "DURACION", "GRAVES", "AGUDOS", "INTENSIDAD", "TIMBRE", "RITMO", "CONTRAPUNTO", "ACORDE", "JAZZ", "HEAVY", "ROCK", "POP", "DANCE", "SOUL", "TECLADO", "INSTRUMENTO", "TIEMPO", "REGGAETON", "BALADA", "BOLERO" }; private String[] deportes = { "FUTBOL", "NATACION", "PESCA", "JABALINA", "SALTO", "LUCHA", "POLO", "PATINAJE", "TAICHI", "GIMNASIA", "YOGA", "CULTURISMO", "TOROS", "HOCKEY", "BEISBOL", "BALON", "PENTATLON", "LANZAMIENTO", "DANZA", "KARATE", "JUDO", "RELEVOS", "ATLETISMO", "BOXEO", "AUTOMOVILISMO", "TENIS", "BALONCESTO", "BALONMANO", "MOTOCICLISMO", "CICLISMO", "CAZA", "EQUITACION", "CANOA", "AJEDREZ", "BADMINTON", "BILLAR", "WINDSURF", "SURF", "SKATE", "RAFTING", "PARAPENTE", "ESCALADA", "PARACAIDISMO" }; private String[] ciencia = { "CONOCIMIENTO", "FILOSOFIA", "TECNOLOGICO", "MATEMATICAS", "LOGICA", "EMPIRICO", "FACTICO", "ASTRONOMIA", "BIOLOGIA", "FISICA", "QUIMICA", "GEOLOGIA", "GEOGRAFIA", "ANTROPOLOGIA", "POLITICA", "DEMOGRAFIA", "ECONOMIA", "HISTORIA", "PSICOLOGIA", "SOCIOLOGIA", "EXPERIMENTACION", "HIPOTESIS", "TEORIA", "METODO", "CRITERIO", "TEOREMA", "OBSERVACION", "DESCRIPCION", "INDUCCION", "DEMOSTRACION", "REFUTACION", "COMPARACION" }; private String[] arte = { "OLEO", "SOL", "ACUARELA", "BARROCO", "LIENZO", "GOTICO", "LITERATURA", "TEATRO", "ESCULTURA", "FOTOGRAFIA", "ROMANTICO", "HISTORIA", "GOYA", "PINCEL", "BROCHA", "FRESCO", "DIBUJO", "MODERNISMO", "REALISMO", "GALERIA", "ARTISTA", "ARQUITECTURA", "MUDEJAR", "ROMANICA", "RUPESTRE", "BIZANTINA", "PALEOCRISTIANA", "PRERROMANICA", "RENACIMIENTO", "NEOCLASICISMO", "MITOLOGIA", "MUSEO" }; public void nuevaPalabra() { this.palabra = palabraAleatoria(); this.posiciones = new Character[this.palabra.length()]; } public void nuevaPalabra(String buscaEnArray) { int aleatorio = 0; if (buscaEnArray.equalsIgnoreCase("Arte")) { aleatorio = aleatorio(this.arte); this.palabra = this.arte[aleatorio]; } else if (buscaEnArray.equalsIgnoreCase("Ciencia")) { aleatorio = aleatorio(this.ciencia); this.palabra = this.ciencia[aleatorio]; } else if (buscaEnArray.equalsIgnoreCase("Deportes")) { aleatorio = aleatorio(this.deportes); this.palabra = this.deportes[aleatorio]; } else if (buscaEnArray.equalsIgnoreCase("Música")) { aleatorio = aleatorio(this.musica); this.palabra = this.musica[aleatorio]; }
  • 38. else if (buscaEnArray.equalsIgnoreCase("Personajes")) { aleatorio = aleatorio(this.personajes); this.palabra = this.personajes[aleatorio]; } else if (buscaEnArray.equalsIgnoreCase("Tecnología")) { aleatorio = aleatorio(this.tecnologia); this.palabra = this.tecnologia[aleatorio]; } else if (buscaEnArray.equalsIgnoreCase("Programación")) { aleatorio = aleatorio(this.programacion); this.palabra = this.programacion[aleatorio]; } else { aleatorio = aleatorio(this.arte); this.palabra = this.arte[aleatorio]; } this.posiciones = new Character[this.palabra.length()]; } public void dificultad(String dificultad, String buscaEnArray) { nuevaPalabra(buscaEnArray); if (dificultad.equalsIgnoreCase("Fácil")) { if (this.palabra.length() >= 5) { do { System.out.println(this.palabra.length()); nuevaPalabra(buscaEnArray); System.out.println(this.palabra.length()); } while ( this.palabra.length() >= 5); } } if (dificultad.equalsIgnoreCase("Normal")) { if ((this.palabra.length() <= 5) || (this.palabra.length() >= 7)) { do { System.out.println(this.palabra.length()); nuevaPalabra(buscaEnArray); } while ((this.palabra.length() <= 5) || (this.palabra.length() >= 7)); } } if (dificultad.equalsIgnoreCase("Difícil")) { if ((this.palabra.length() <= 7) || (this.palabra.length() >= 10)) { do { System.out.println(this.palabra.length()); nuevaPalabra(buscaEnArray); } while ((this.palabra.length() <= 7) || (this.palabra.length() >= 10)); } } if (dificultad.equalsIgnoreCase("Muy Difícil")) { if (this.palabra.length() <= 10) { do { System.out.println(this.palabra.length()); nuevaPalabra(buscaEnArray); } while ( this.palabra.length() <= 10); } } } public void resetGana() { this.ganar = 0; this.gana = false; for (int i = 0; i < this.palabra.length(); i++) { this.posiciones[i] = null; } } public boolean ganarPartida() { if (this.ganar == 1) {
  • 39. this.gana = true; } else { this.gana = false; } return this.gana; } public String getPalabra() { return this.palabra; } public Character[] getPosiciones() { return this.posiciones; } public String rellena() { String modifica = ""; for (int i = 0; i < this.palabra.length(); i++) { modifica = modifica + String.valueOf('*'); } return modifica; } public boolean iguales(char letra) { boolean afir = false; for (int i = 0; i < this.palabra.length(); i++) { if (this.palabra.charAt(i) == letra) { afir = true; break; } afir = false; } return afir; } public Character[] busca(char caracter) { Character[] coincide = new Character[this.palabra.length()]; for (int i = 0; i < this.palabra.length(); i++) { if (caracter == this.palabra.charAt(i)) { coincide[i] = Character.valueOf('*'); } else { coincide[i] = null; } } return coincide; } public String oculta(Character[] coincide) { String temp = ""; char[] pos = new char[coincide.length]; if (coincide.length == this.palabra.length()) { for (int i = 0; i < this.palabra.length(); i++) { if ((coincide[i] != null) && (this.posiciones[i] == null)) { this.posiciones[i] = coincide[i]; } } for (int i = 0; i < this.palabra.length(); i++) { if (this.posiciones[i] == null) { pos[i] = '*'; } else { pos[i] = this.palabra.charAt(i); } } temp = String.valueOf(pos); if (temp.compareTo(this.palabra) == 0) { this.ganar = 1; } } else { temp = "Error en la comparacion"; } return temp; } public String palabraAleatoria() { return this.arte[numAleatorio()]; }
  • 40. public int numAleatorio() { int ref = (int)(Math.random() * 100.0D); if (ref > this.arte.length) { ref = numAleatorio(); } return ref; } public int aleatorio(String[] palabras) { return (int)(Math.random() * palabras.length); }}