SlideShare una empresa de Scribd logo
1 de 15
Descargar para leer sin conexión
EXPRESIONES REGULARES
Sosa Mejía anel verónica
21 DE SEPTIEMBRE DE 2016
ISC. ENRIQUE PONCE RIVERA
ITSP
import java.applet.Applet;
import java.awt.Color;
import java.awt.Graphics;
import java.awt.*;
public class Programa extends Applet {
Button b1, b2, b3, b4, b5, b6;
Label l1, l2;
int x = 200, y;
int xf, yf;
int xi = 200, yi;
int p = -1;
int v, z, m, k;
String a [] = new String[20];
int f[] = new int[20];
String pantalla[]=new String [20];
int cont = 0;
int n, r, l, q;
public void init() {
b1 = new Button("0");
b2 = new Button("1");
b3 = new Button("0*");
b4 = new Button("1*");
b5 = new Button("+");
b6 = new Button("borrar");
add(b1);
add(b2);
add(b3);
add(b4);
add(b5);
add(b6);
}
public boolean action(Event evt, Object Obj) {
if (evt.target.equals(b1)) {
f[cont] = 1;
a [cont] = "O";
pantalla[cont]="0";
cont++;
p++;
}
if (evt.target.equals(b2)) {
f[cont] = 2;
a [cont] = "1";
pantalla[cont]="1";
cont++;
p++;
}
if (evt.target.equals(b3)) {
f[cont] = 3;
ar[cont] = "0";
pantalla[cont]="0*";
cont++;
p++;
}
if (evt.target.equals(b4)) {
f[cont] = 4;
a[cont] = "1";
pantalla[cont]="1*";
cont++;
p++;
}
repaint();
System.out.println(cont);
return true;
}
public void paint(Graphics g) {
g.setColor(Color.GREEN);
g.fillRect(0, 0, 1440, 800);
b1.setSize(70, 50);
b2.setSize(70, 50);
b3.setSize(70, 50);
b4.setSize(70, 50);
b5.setSize(70, 50);
b6.setSize(70, 50);
b1.setLocation(50, 50);
b2.setLocation(120, 50);
b3.setLocation(190, 50);
b4.setLocation(260, 50);
b5.setLocation(330, 50);
b6.setLocation(700, 50);
y = 300;
x = 220;
xi = 200;
l = y - 25;
r = 200 - 50;
m = 200;
int c=1000;
g.drawString("exprecion:", 930, 200);
for (int i = 0; i < cont; i++) {
if (f[i] == 1) {
g.setColor(Color.BLACK);
xf = xi + 50;
g.drawLine(xi, y, xf, y);
xi = xf + 150;
g.drawOval(r, l, 50, 50);
r = r + 100;
g.drawOval(r, l, 50, 50);
r = r + 100;
g.drawString("" + a[i], x, y - 10);
x = x + 200;
g.drawString(""+pantalla[i], c, 200);
c+=10; }
if (f[i] == 2) {
g.setColor(Color.BLUE);
xf = xi + 50;
g.drawLine(xi, y, xf, y);
xi = xf + 150;
g.drawOval(r, l, 50, 50);
r = r + 100;
g.drawOval(r, l, 50, 50);
r = r + 100;
g.drawString("" + a[i], x, y - 10);
x = x + 200;
g.drawString(""+pantalla[i], c, 200);
c+=10;
}
if (f[i] == 3) {
g.setColor(Color.BLUE);
g.drawArc(x + 50, y - 50, 100, 50, 0, 180);
g.drawArc(x - 50, y - 50, 300, 150, 180, 180);
g.setColor(Color.BLUE);
xf = xi + 50;
g.drawLine(xi, y, xf, y);
xi = xf + 50;
xf = xi + 50;
g.drawLine(xi, y, xf, y);
xi = xf + 50;
xf = xi + 50;
g.drawLine(xi, y, xf, y);
xi = xf + 150;
g.drawOval(r, l, 50, 50);
r = r + 100;
g.drawOval(r, l, 50, 50);
r = r + 100;
g.drawOval(r, l, 50, 50);
r = r + 100;
g.drawOval(r, l, 50, 50);
r = r + 100;
g.drawString("" + a[i], x = xi - 275, y - 10);
x = x + 300;
g.drawString(""+pantalla[i], c, 200);
c+=10;
}
if (f[i] == 4) {
g.setColor(Color.BLUE);
g.drawArc(x + 50, y - 50, 100, 50, 0, 180);
g.drawArc(x - 50, y - 50, 300, 150, 180, 180);
g.setColor(Color.BLACK);
xf = xi + 50;
g.drawLine(xi, y, xf, y);
xi = xf + 50;
xf = xi + 50;
g.drawLine(xi, y, xf, y);
xi = xf + 50;
xf = xi + 50;
g.drawLine(xi, y, xf, y);
xi = xf + 150;
g.drawOval(r, l, 50, 50);
r = r + 100;
g.drawOval(r, l, 50, 50);
r = r + 100;
g.drawOval(r, l, 50, 50);
r = r + 100;
g.drawOval(r, l, 50, 50);
r = r + 100;
g.drawString("" + a[i], x = xi - 275, y - 10);
x = x + 300;
g.drawString(""+pantalla[i], c, 200);
c+=10;
}
if (f[i] == 5) {
v=xi; g.drawOval(xi - 50, y + 50, 50, 50);
g.drawOval(m - 150, y + 50, 50, 50);
x = 220;
xi = 200;
r = 200 - 50;
m = 200;
y = y + 150;
l = y - 25;
g.drawString(""+pantalla[i], c, 200);
c+=10;
}
}
y = 300;
xi = 100;
for (int i = 0; i < cont; i++) {
switch (f[i]) {
case 1:
g.setColor(Color.BLACK);
xf = xi + 50;
g.drawLine(xi, y, xf, y);
xi = xf + 150;
g.setColor(Color.BLACK);
g.fillRect(100, y, 50, 5);
break;
case 2:
g.setColor(Color.BLACK);
xf = xi + 50;
g.drawLine(xi, y, xf, y);
xi = xf + 150;
g.setColor(Color.BLACK);
g.fillRect(100, y, 50, 5);
break;
case 3:
g.setColor(Color.BLACK);
xf = xi + 50;
g.drawLine(xi, y, xf, y);
xi = xf + 50;
xf = xi + 50;
g.drawLine(xi, y, xf, y);
xi = xf + 50;
xf = xi + 50;
g.drawLine(xi, y, xf, y);
xi = xf + 150;
g.setColor(Color.BLACK);
g.fillRect(100, y, 50, 5);
break;
case 4:
g.setColor(Color.BLACK);
xf = xi + 50;
g.drawLine(xi, y, xf, y);
xi = xf + 50;
xf = xi + 50;
g.drawLine(xi, y, xf, y);
xi = xf + 50;
xf = xi + 50;
g.drawLine(xi, y, xf, y);
xi = xf + 150;
g.setColor(Color.BLACK);
g.fillRect(100, y, 50, 5);
break;
case 5:
v=xi;
x = 220;
xi = 100;
r = 200 - 50;
m = 200;
l = y - 25;
g.drawLine(xi+50, y, xi, y+75);
y = y + 150;
break;
case 7:
}
}
}
}
Programa expresiones regulares
Programa expresiones regulares

Más contenido relacionado

La actualidad más candente

[3] 프로세싱과 아두이노
[3] 프로세싱과 아두이노[3] 프로세싱과 아두이노
[3] 프로세싱과 아두이노Chiwon Song
 
[程式設計]Blackfriday
[程式設計]Blackfriday[程式設計]Blackfriday
[程式設計]BlackfridayHui-Shih Leng
 
Eso3 tablasestadisticas blog
Eso3 tablasestadisticas blogEso3 tablasestadisticas blog
Eso3 tablasestadisticas blogMarta Martín
 
Basics of Computer graphics lab
Basics of Computer graphics labBasics of Computer graphics lab
Basics of Computer graphics labPriya Goyal
 
Gauss in java
Gauss in javaGauss in java
Gauss in javabaxter89
 
Ejercicios de programacion
Ejercicios de programacionEjercicios de programacion
Ejercicios de programacionJeff Tu Pechito
 
ARTDM 170, Week13: Processing
ARTDM 170, Week13: ProcessingARTDM 170, Week13: Processing
ARTDM 170, Week13: ProcessingGilbert Guerrero
 
Don’t care contion
Don’t care contionDon’t care contion
Don’t care contionVenkat Raman
 
Creative Coding 1 - 2 Variables
Creative Coding 1 - 2 VariablesCreative Coding 1 - 2 Variables
Creative Coding 1 - 2 VariablesTill Nagel
 

La actualidad más candente (17)

[3] 프로세싱과 아두이노
[3] 프로세싱과 아두이노[3] 프로세싱과 아두이노
[3] 프로세싱과 아두이노
 
Proga 0608
Proga 0608Proga 0608
Proga 0608
 
[程式設計]Blackfriday
[程式設計]Blackfriday[程式設計]Blackfriday
[程式設計]Blackfriday
 
Eso3 tablasestadisticas blog
Eso3 tablasestadisticas blogEso3 tablasestadisticas blog
Eso3 tablasestadisticas blog
 
PythonArtCode
PythonArtCodePythonArtCode
PythonArtCode
 
Clojure lang
Clojure langClojure lang
Clojure lang
 
Include
IncludeInclude
Include
 
cosc 281 hw2
cosc 281 hw2cosc 281 hw2
cosc 281 hw2
 
Basics of Computer graphics lab
Basics of Computer graphics labBasics of Computer graphics lab
Basics of Computer graphics lab
 
Matlab code for secant method
Matlab code for secant methodMatlab code for secant method
Matlab code for secant method
 
Casa
CasaCasa
Casa
 
Gauss in java
Gauss in javaGauss in java
Gauss in java
 
Ejercicios de programacion
Ejercicios de programacionEjercicios de programacion
Ejercicios de programacion
 
ARTDM 170, Week13: Processing
ARTDM 170, Week13: ProcessingARTDM 170, Week13: Processing
ARTDM 170, Week13: Processing
 
Quad fcn
Quad fcnQuad fcn
Quad fcn
 
Don’t care contion
Don’t care contionDon’t care contion
Don’t care contion
 
Creative Coding 1 - 2 Variables
Creative Coding 1 - 2 VariablesCreative Coding 1 - 2 Variables
Creative Coding 1 - 2 Variables
 

Destacado

DIBUJO EN JFRAME CASA
DIBUJO EN JFRAME CASADIBUJO EN JFRAME CASA
DIBUJO EN JFRAME CASAAnel Sosa
 
Programa en java circulos
Programa en java circulosPrograma en java circulos
Programa en java circulosAnel Sosa
 
investigacion topicos avanzados de programacion unidad dos interfaz grafica
investigacion topicos avanzados de programacion unidad dos interfaz graficainvestigacion topicos avanzados de programacion unidad dos interfaz grafica
investigacion topicos avanzados de programacion unidad dos interfaz graficaAnel Sosa
 
APLICACIONES DE LAS ECUACIONES DIFERENCIALES
APLICACIONES DE LAS ECUACIONES DIFERENCIALESAPLICACIONES DE LAS ECUACIONES DIFERENCIALES
APLICACIONES DE LAS ECUACIONES DIFERENCIALESAnel Sosa
 
EL CPU Y SUS PARTES
EL CPU Y SUS PARTES EL CPU Y SUS PARTES
EL CPU Y SUS PARTES ccoyori
 
INVESTIGACION “SOLUCION DE SISTEMAS DE ECUACIONES: METODO DE JACOBY”
INVESTIGACION “SOLUCION DE SISTEMAS DE ECUACIONES: METODO DE JACOBY”INVESTIGACION “SOLUCION DE SISTEMAS DE ECUACIONES: METODO DE JACOBY”
INVESTIGACION “SOLUCION DE SISTEMAS DE ECUACIONES: METODO DE JACOBY”Anel Sosa
 
que es un Curriculum
que es un Curriculumque es un Curriculum
que es un CurriculumAnel Sosa
 
Programacion concurrente
Programacion concurrenteProgramacion concurrente
Programacion concurrenteAnel Sosa
 
Lenguajes de simulacion
Lenguajes de simulacionLenguajes de simulacion
Lenguajes de simulacionAnel Sosa
 
Paradigmas de programacion
Paradigmas de programacion Paradigmas de programacion
Paradigmas de programacion Anel Sosa
 
INVESTIGACIÓN DE CHIPSET
INVESTIGACIÓN DE CHIPSET INVESTIGACIÓN DE CHIPSET
INVESTIGACIÓN DE CHIPSET Anel Sosa
 
dibujo jigglypuff en java
dibujo jigglypuff en java dibujo jigglypuff en java
dibujo jigglypuff en java Anel Sosa
 
maquinas de turing
maquinas de turingmaquinas de turing
maquinas de turingAnel Sosa
 
investigacion introduccion a los lenguajes y automatas
investigacion introduccion a los lenguajes y automatasinvestigacion introduccion a los lenguajes y automatas
investigacion introduccion a los lenguajes y automatasAnel Sosa
 
programa pelotas java
programa pelotas javaprograma pelotas java
programa pelotas javaAnel Sosa
 
SISTEMA OPERATIVOS
SISTEMA OPERATIVOSSISTEMA OPERATIVOS
SISTEMA OPERATIVOSAnel Sosa
 
Investigacion calculo derivadas e integrales
Investigacion calculo derivadas e integralesInvestigacion calculo derivadas e integrales
Investigacion calculo derivadas e integralesAnel Sosa
 
maquinas de turing jflap
maquinas de turing jflapmaquinas de turing jflap
maquinas de turing jflapAnel Sosa
 
ESPRESIONES REGULARES
ESPRESIONES REGULARESESPRESIONES REGULARES
ESPRESIONES REGULARESAnel Sosa
 
automatas finitos
 automatas finitos automatas finitos
automatas finitosAnel Sosa
 

Destacado (20)

DIBUJO EN JFRAME CASA
DIBUJO EN JFRAME CASADIBUJO EN JFRAME CASA
DIBUJO EN JFRAME CASA
 
Programa en java circulos
Programa en java circulosPrograma en java circulos
Programa en java circulos
 
investigacion topicos avanzados de programacion unidad dos interfaz grafica
investigacion topicos avanzados de programacion unidad dos interfaz graficainvestigacion topicos avanzados de programacion unidad dos interfaz grafica
investigacion topicos avanzados de programacion unidad dos interfaz grafica
 
APLICACIONES DE LAS ECUACIONES DIFERENCIALES
APLICACIONES DE LAS ECUACIONES DIFERENCIALESAPLICACIONES DE LAS ECUACIONES DIFERENCIALES
APLICACIONES DE LAS ECUACIONES DIFERENCIALES
 
EL CPU Y SUS PARTES
EL CPU Y SUS PARTES EL CPU Y SUS PARTES
EL CPU Y SUS PARTES
 
INVESTIGACION “SOLUCION DE SISTEMAS DE ECUACIONES: METODO DE JACOBY”
INVESTIGACION “SOLUCION DE SISTEMAS DE ECUACIONES: METODO DE JACOBY”INVESTIGACION “SOLUCION DE SISTEMAS DE ECUACIONES: METODO DE JACOBY”
INVESTIGACION “SOLUCION DE SISTEMAS DE ECUACIONES: METODO DE JACOBY”
 
que es un Curriculum
que es un Curriculumque es un Curriculum
que es un Curriculum
 
Programacion concurrente
Programacion concurrenteProgramacion concurrente
Programacion concurrente
 
Lenguajes de simulacion
Lenguajes de simulacionLenguajes de simulacion
Lenguajes de simulacion
 
Paradigmas de programacion
Paradigmas de programacion Paradigmas de programacion
Paradigmas de programacion
 
INVESTIGACIÓN DE CHIPSET
INVESTIGACIÓN DE CHIPSET INVESTIGACIÓN DE CHIPSET
INVESTIGACIÓN DE CHIPSET
 
dibujo jigglypuff en java
dibujo jigglypuff en java dibujo jigglypuff en java
dibujo jigglypuff en java
 
maquinas de turing
maquinas de turingmaquinas de turing
maquinas de turing
 
investigacion introduccion a los lenguajes y automatas
investigacion introduccion a los lenguajes y automatasinvestigacion introduccion a los lenguajes y automatas
investigacion introduccion a los lenguajes y automatas
 
programa pelotas java
programa pelotas javaprograma pelotas java
programa pelotas java
 
SISTEMA OPERATIVOS
SISTEMA OPERATIVOSSISTEMA OPERATIVOS
SISTEMA OPERATIVOS
 
Investigacion calculo derivadas e integrales
Investigacion calculo derivadas e integralesInvestigacion calculo derivadas e integrales
Investigacion calculo derivadas e integrales
 
maquinas de turing jflap
maquinas de turing jflapmaquinas de turing jflap
maquinas de turing jflap
 
ESPRESIONES REGULARES
ESPRESIONES REGULARESESPRESIONES REGULARES
ESPRESIONES REGULARES
 
automatas finitos
 automatas finitos automatas finitos
automatas finitos
 

Similar a Programa expresiones regulares

You are task to add a yawning detection to the programme below;i.pdf
You are task to add a yawning detection to the programme below;i.pdfYou are task to add a yawning detection to the programme below;i.pdf
You are task to add a yawning detection to the programme below;i.pdfsales223546
 
C Code and the Art of Obfuscation
C Code and the Art of ObfuscationC Code and the Art of Obfuscation
C Code and the Art of Obfuscationguest9006ab
 
Computer Graphics Lab File C Programs
Computer Graphics Lab File C ProgramsComputer Graphics Lab File C Programs
Computer Graphics Lab File C ProgramsKandarp Tiwari
 
Computer graphics lab manual
Computer graphics lab manualComputer graphics lab manual
Computer graphics lab manualUma mohan
 
Computer graphics lab assignment
Computer graphics lab assignmentComputer graphics lab assignment
Computer graphics lab assignmentAbdullah Al Shiam
 
The International Journal of Engineering and Science (IJES)
The International Journal of Engineering and Science (IJES)The International Journal of Engineering and Science (IJES)
The International Journal of Engineering and Science (IJES)theijes
 
Assignment on Numerical Method C Code
Assignment on Numerical Method C CodeAssignment on Numerical Method C Code
Assignment on Numerical Method C CodeSyed Ahmed Zaki
 
computer graphics practicals
computer graphics practicalscomputer graphics practicals
computer graphics practicalsManoj Chauhan
 
Create a java project that - Draw a circle with three random init.pdf
Create a java project that - Draw a circle with three random init.pdfCreate a java project that - Draw a circle with three random init.pdf
Create a java project that - Draw a circle with three random init.pdfarihantmobileselepun
 
Data Structure in C Programming Language
Data Structure in C Programming LanguageData Structure in C Programming Language
Data Structure in C Programming LanguageArkadeep Dey
 
Let us c(by yashwant kanetkar) chapter 2 solution
Let us c(by yashwant kanetkar) chapter 2 solutionLet us c(by yashwant kanetkar) chapter 2 solution
Let us c(by yashwant kanetkar) chapter 2 solutionrohit kumar
 
Artificial intelligence
Artificial intelligenceArtificial intelligence
Artificial intelligenceAditya Sharma
 
Numerical Method Assignment
Numerical Method AssignmentNumerical Method Assignment
Numerical Method Assignmentashikul akash
 

Similar a Programa expresiones regulares (20)

You are task to add a yawning detection to the programme below;i.pdf
You are task to add a yawning detection to the programme below;i.pdfYou are task to add a yawning detection to the programme below;i.pdf
You are task to add a yawning detection to the programme below;i.pdf
 
Python From Scratch (1).pdf
Python From Scratch  (1).pdfPython From Scratch  (1).pdf
Python From Scratch (1).pdf
 
C Code and the Art of Obfuscation
C Code and the Art of ObfuscationC Code and the Art of Obfuscation
C Code and the Art of Obfuscation
 
Computer Graphics Lab File C Programs
Computer Graphics Lab File C ProgramsComputer Graphics Lab File C Programs
Computer Graphics Lab File C Programs
 
Computer graphics lab manual
Computer graphics lab manualComputer graphics lab manual
Computer graphics lab manual
 
Computer graphics lab assignment
Computer graphics lab assignmentComputer graphics lab assignment
Computer graphics lab assignment
 
The International Journal of Engineering and Science (IJES)
The International Journal of Engineering and Science (IJES)The International Journal of Engineering and Science (IJES)
The International Journal of Engineering and Science (IJES)
 
Program uts
Program utsProgram uts
Program uts
 
Assignment on Numerical Method C Code
Assignment on Numerical Method C CodeAssignment on Numerical Method C Code
Assignment on Numerical Method C Code
 
Uts
UtsUts
Uts
 
ADA FILE
ADA FILEADA FILE
ADA FILE
 
computer graphics practicals
computer graphics practicalscomputer graphics practicals
computer graphics practicals
 
Uts
UtsUts
Uts
 
Revision1schema C programming
Revision1schema C programmingRevision1schema C programming
Revision1schema C programming
 
Create a java project that - Draw a circle with three random init.pdf
Create a java project that - Draw a circle with three random init.pdfCreate a java project that - Draw a circle with three random init.pdf
Create a java project that - Draw a circle with three random init.pdf
 
Data Structure in C Programming Language
Data Structure in C Programming LanguageData Structure in C Programming Language
Data Structure in C Programming Language
 
VTU Data Structures Lab Manual
VTU Data Structures Lab ManualVTU Data Structures Lab Manual
VTU Data Structures Lab Manual
 
Let us c(by yashwant kanetkar) chapter 2 solution
Let us c(by yashwant kanetkar) chapter 2 solutionLet us c(by yashwant kanetkar) chapter 2 solution
Let us c(by yashwant kanetkar) chapter 2 solution
 
Artificial intelligence
Artificial intelligenceArtificial intelligence
Artificial intelligence
 
Numerical Method Assignment
Numerical Method AssignmentNumerical Method Assignment
Numerical Method Assignment
 

Más de Anel Sosa

Codigo Visual Studio: Galeria de imagenes
Codigo Visual Studio: Galeria de imagenesCodigo Visual Studio: Galeria de imagenes
Codigo Visual Studio: Galeria de imagenesAnel Sosa
 
Comandos sql
Comandos sql Comandos sql
Comandos sql Anel Sosa
 
Codigo ensamblador
Codigo ensamblador Codigo ensamblador
Codigo ensamblador Anel Sosa
 
Metodologia incremental
Metodologia incrementalMetodologia incremental
Metodologia incrementalAnel Sosa
 
Escenario socioeconomico
Escenario socioeconomicoEscenario socioeconomico
Escenario socioeconomicoAnel Sosa
 
Panuco Veracruz
Panuco Veracruz Panuco Veracruz
Panuco Veracruz Anel Sosa
 
investigacion unidad tres componentes y librerias
investigacion unidad tres componentes y libreriasinvestigacion unidad tres componentes y librerias
investigacion unidad tres componentes y libreriasAnel Sosa
 
inv unidad 1 topicos avanzados de programacion
inv unidad 1 topicos avanzados de programacioninv unidad 1 topicos avanzados de programacion
inv unidad 1 topicos avanzados de programacionAnel Sosa
 
simulacion numeros pseudoaleatorios
simulacion numeros pseudoaleatoriossimulacion numeros pseudoaleatorios
simulacion numeros pseudoaleatoriosAnel Sosa
 
Arquitecturas de software
Arquitecturas de software Arquitecturas de software
Arquitecturas de software Anel Sosa
 

Más de Anel Sosa (11)

Codigo Visual Studio: Galeria de imagenes
Codigo Visual Studio: Galeria de imagenesCodigo Visual Studio: Galeria de imagenes
Codigo Visual Studio: Galeria de imagenes
 
Comandos sql
Comandos sql Comandos sql
Comandos sql
 
Codigo ensamblador
Codigo ensamblador Codigo ensamblador
Codigo ensamblador
 
SIMMAN 3G
SIMMAN 3GSIMMAN 3G
SIMMAN 3G
 
Metodologia incremental
Metodologia incrementalMetodologia incremental
Metodologia incremental
 
Escenario socioeconomico
Escenario socioeconomicoEscenario socioeconomico
Escenario socioeconomico
 
Panuco Veracruz
Panuco Veracruz Panuco Veracruz
Panuco Veracruz
 
investigacion unidad tres componentes y librerias
investigacion unidad tres componentes y libreriasinvestigacion unidad tres componentes y librerias
investigacion unidad tres componentes y librerias
 
inv unidad 1 topicos avanzados de programacion
inv unidad 1 topicos avanzados de programacioninv unidad 1 topicos avanzados de programacion
inv unidad 1 topicos avanzados de programacion
 
simulacion numeros pseudoaleatorios
simulacion numeros pseudoaleatoriossimulacion numeros pseudoaleatorios
simulacion numeros pseudoaleatorios
 
Arquitecturas de software
Arquitecturas de software Arquitecturas de software
Arquitecturas de software
 

Último

VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Bookingdharasingh5698
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Arindam Chakraborty, Ph.D., P.E. (CA, TX)
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . pptDineshKumar4165
 
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...tanu pandey
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfRagavanV2
 
Block diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptBlock diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptNANDHAKUMARA10
 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Bookingdharasingh5698
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Standamitlee9823
 
Intro To Electric Vehicles PDF Notes.pdf
Intro To Electric Vehicles PDF Notes.pdfIntro To Electric Vehicles PDF Notes.pdf
Intro To Electric Vehicles PDF Notes.pdfrs7054576148
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXssuser89054b
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startQuintin Balsdon
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTbhaskargani46
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdfankushspencer015
 
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Bookingroncy bisnoi
 

Último (20)

NFPA 5000 2024 standard .
NFPA 5000 2024 standard                                  .NFPA 5000 2024 standard                                  .
NFPA 5000 2024 standard .
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdf
 
Block diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptBlock diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.ppt
 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
 
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
 
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
 
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced LoadsFEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
 
Intro To Electric Vehicles PDF Notes.pdf
Intro To Electric Vehicles PDF Notes.pdfIntro To Electric Vehicles PDF Notes.pdf
Intro To Electric Vehicles PDF Notes.pdf
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the start
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
 
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
 

Programa expresiones regulares

  • 1. EXPRESIONES REGULARES Sosa Mejía anel verónica 21 DE SEPTIEMBRE DE 2016 ISC. ENRIQUE PONCE RIVERA ITSP
  • 2. import java.applet.Applet; import java.awt.Color; import java.awt.Graphics; import java.awt.*; public class Programa extends Applet { Button b1, b2, b3, b4, b5, b6; Label l1, l2; int x = 200, y; int xf, yf; int xi = 200, yi; int p = -1; int v, z, m, k; String a [] = new String[20]; int f[] = new int[20]; String pantalla[]=new String [20]; int cont = 0; int n, r, l, q; public void init() { b1 = new Button("0"); b2 = new Button("1"); b3 = new Button("0*"); b4 = new Button("1*"); b5 = new Button("+"); b6 = new Button("borrar");
  • 3. add(b1); add(b2); add(b3); add(b4); add(b5); add(b6); } public boolean action(Event evt, Object Obj) { if (evt.target.equals(b1)) { f[cont] = 1; a [cont] = "O"; pantalla[cont]="0"; cont++; p++; } if (evt.target.equals(b2)) { f[cont] = 2; a [cont] = "1"; pantalla[cont]="1";
  • 4. cont++; p++; } if (evt.target.equals(b3)) { f[cont] = 3; ar[cont] = "0"; pantalla[cont]="0*"; cont++; p++; } if (evt.target.equals(b4)) { f[cont] = 4; a[cont] = "1"; pantalla[cont]="1*"; cont++; p++;
  • 5. } repaint(); System.out.println(cont); return true; } public void paint(Graphics g) { g.setColor(Color.GREEN); g.fillRect(0, 0, 1440, 800); b1.setSize(70, 50); b2.setSize(70, 50); b3.setSize(70, 50); b4.setSize(70, 50); b5.setSize(70, 50); b6.setSize(70, 50); b1.setLocation(50, 50); b2.setLocation(120, 50); b3.setLocation(190, 50); b4.setLocation(260, 50); b5.setLocation(330, 50);
  • 6. b6.setLocation(700, 50); y = 300; x = 220; xi = 200; l = y - 25; r = 200 - 50; m = 200; int c=1000; g.drawString("exprecion:", 930, 200); for (int i = 0; i < cont; i++) { if (f[i] == 1) { g.setColor(Color.BLACK); xf = xi + 50; g.drawLine(xi, y, xf, y); xi = xf + 150; g.drawOval(r, l, 50, 50); r = r + 100; g.drawOval(r, l, 50, 50); r = r + 100; g.drawString("" + a[i], x, y - 10);
  • 7. x = x + 200; g.drawString(""+pantalla[i], c, 200); c+=10; } if (f[i] == 2) { g.setColor(Color.BLUE); xf = xi + 50; g.drawLine(xi, y, xf, y); xi = xf + 150; g.drawOval(r, l, 50, 50); r = r + 100; g.drawOval(r, l, 50, 50); r = r + 100; g.drawString("" + a[i], x, y - 10); x = x + 200; g.drawString(""+pantalla[i], c, 200); c+=10; } if (f[i] == 3) { g.setColor(Color.BLUE); g.drawArc(x + 50, y - 50, 100, 50, 0, 180);
  • 8. g.drawArc(x - 50, y - 50, 300, 150, 180, 180); g.setColor(Color.BLUE); xf = xi + 50; g.drawLine(xi, y, xf, y); xi = xf + 50; xf = xi + 50; g.drawLine(xi, y, xf, y); xi = xf + 50; xf = xi + 50; g.drawLine(xi, y, xf, y); xi = xf + 150; g.drawOval(r, l, 50, 50); r = r + 100; g.drawOval(r, l, 50, 50); r = r + 100; g.drawOval(r, l, 50, 50); r = r + 100; g.drawOval(r, l, 50, 50); r = r + 100; g.drawString("" + a[i], x = xi - 275, y - 10); x = x + 300; g.drawString(""+pantalla[i], c, 200); c+=10; }
  • 9. if (f[i] == 4) { g.setColor(Color.BLUE); g.drawArc(x + 50, y - 50, 100, 50, 0, 180); g.drawArc(x - 50, y - 50, 300, 150, 180, 180); g.setColor(Color.BLACK); xf = xi + 50; g.drawLine(xi, y, xf, y); xi = xf + 50; xf = xi + 50; g.drawLine(xi, y, xf, y); xi = xf + 50; xf = xi + 50; g.drawLine(xi, y, xf, y); xi = xf + 150; g.drawOval(r, l, 50, 50); r = r + 100; g.drawOval(r, l, 50, 50); r = r + 100; g.drawOval(r, l, 50, 50); r = r + 100; g.drawOval(r, l, 50, 50); r = r + 100; g.drawString("" + a[i], x = xi - 275, y - 10); x = x + 300;
  • 10. g.drawString(""+pantalla[i], c, 200); c+=10; } if (f[i] == 5) { v=xi; g.drawOval(xi - 50, y + 50, 50, 50); g.drawOval(m - 150, y + 50, 50, 50); x = 220; xi = 200; r = 200 - 50; m = 200; y = y + 150; l = y - 25; g.drawString(""+pantalla[i], c, 200); c+=10; } } y = 300; xi = 100; for (int i = 0; i < cont; i++) { switch (f[i]) {
  • 11. case 1: g.setColor(Color.BLACK); xf = xi + 50; g.drawLine(xi, y, xf, y); xi = xf + 150; g.setColor(Color.BLACK); g.fillRect(100, y, 50, 5); break; case 2: g.setColor(Color.BLACK); xf = xi + 50; g.drawLine(xi, y, xf, y); xi = xf + 150; g.setColor(Color.BLACK); g.fillRect(100, y, 50, 5); break; case 3: g.setColor(Color.BLACK); xf = xi + 50; g.drawLine(xi, y, xf, y); xi = xf + 50; xf = xi + 50; g.drawLine(xi, y, xf, y);
  • 12. xi = xf + 50; xf = xi + 50; g.drawLine(xi, y, xf, y); xi = xf + 150; g.setColor(Color.BLACK); g.fillRect(100, y, 50, 5); break; case 4: g.setColor(Color.BLACK); xf = xi + 50; g.drawLine(xi, y, xf, y); xi = xf + 50; xf = xi + 50; g.drawLine(xi, y, xf, y); xi = xf + 50; xf = xi + 50; g.drawLine(xi, y, xf, y); xi = xf + 150; g.setColor(Color.BLACK); g.fillRect(100, y, 50, 5); break; case 5: v=xi; x = 220; xi = 100;
  • 13. r = 200 - 50; m = 200; l = y - 25; g.drawLine(xi+50, y, xi, y+75); y = y + 150; break; case 7: } } } }