Documentos de Académico
Documentos de Profesional
Documentos de Cultura
Tesis Software Algebra Boole PDF
Tesis Software Algebra Boole PDF
Director
MOISÉS QUINTANA ALVAREZ
CORPORAC I O N U N I V E R S I T A R I A T E C N O L O G I C A D E B O L I V A R
CARTAGENA D.T Y C.
2001
2
T r a b a j o d e G r a d o p r e s e n ta d o
para optar el título de
Ingeniero de Sistemas
Director
CARTAGENA D.T Y C.
2001
3
Señores:
CORPORACION UNIVERSITARIA TECNOLOGICA DE BOLIVAR
Comité de Evaluación de Proyectos
Facultad de Ingeniería de Sistemas.
La Ciudad.
Respetados señores:
Cordialmente,
C a r t a g e n a d e I n d i a s , E n e r o 1 5 d e 2 00 0
4
Señores:
CORPORACION UNIVERSITARIA TECNOLOGICA DE BOLIVAR
Comité de Evaluación de Proyectos
Facultad de Ingeniería de Sistemas.
La Ciudad.
Respetados señores:
Cordialmente,
MOISÉS QUINTANA
Nota de aceptación
5
Jurado
Jurado
d e t o d o s l o s t r a b a j o s d e g r a d o a p r o b a d o s , los cuales no
proyecto”.
7
Ga b r i e l a , C a r m e n y M a y o . A
Antonio Juan.
Sara
8
l o g r o . A m i s h e r m a n o s D airo
y Abadys. A mi sobrino
esposo Lewis.
Dianys
AGRADECIMIENTOS
apoyo incondicional.
colaboración.
apoyo incondicional.
10
CONTENIDO
Página
INTRODUCCIÓN
1.5. DIDÁCTICA 44
2.3.1. Objetivo 69
2.3.2. Motivación 70
2.3.3. Escenario 70
2.4.1. Objetivo 70
13
2.4.2. Motivación 71
2.4.3. Escenario 71
2.4.4. Evaluación 72
2.5.1. Objetivo 73
2.5.2. Motivación 73
2.5.3. Escenario 74
2.5.4. Evaluación 74
2.6.1. Objetivo 75
2.6.2. Escenario 75
2.6.3. Motivación 76
2.6.4. Evaluación 76
2.7.1. Objetivos 77
2.7.2. Escenario 78
2.7.3. Motivación 78
2.7.4. Evaluación 78
3. DISEÑO COMPUTACIONAL 80
4.3. CLASES 97
Tentrada F 109
5. RECOMENDACIONES 112
6. CONCLUSIONES 113
BIBLIOGRAFÍA 115
ANEXOS 125
16
LISTA DE CUADROS
Pág.
Cuadro 1 T a b l a d e A g r u p a m i e nt o B a s e 24
Cuadro 9 T a b l a L e c c i ó n – Teoría 3 86
LISTA DE TABLAS
Pág.
Tabla 5 T a b l a d e V e r d a d Q u e D e f i n e l a O p e r a c i ó n N A ND 12
Tabla 11 C o m p l e j i d a d E j e r c i c i o s S i m p l i f i c a c i ó n Q u i n e
McCluskey 74
LISTA FIGURAS
Pág.
RESUMEN
Álgebra de Boole.
INTRODUCCION
h o r a d e r e s o l v e r l o s e j e r c i c i o s e n c a s a y d e d e f i n i r l o s conceptos
consultados.
c a r r e r a s e v u e l v a n a n e c e s i t a r l o s c o n o c i m i e n t o s d e l Á l g ebra
las circunstancias.
E s t a a c t i v i d a d p u e d e v e r s e l i m i t a d a p o r t i e m p o , e s p a c i o y recursos.
t i e m p o q u e d e d i c a a u n a l u m n o e n p a r t i c u l a r a r e solver todas
p r o fe s o r d i s p o n i b l e p a r a d i c h a a s e s o r í a e n u n t e m a c o m o e l
• L a s f a l l a s e n e l a p r e n d i z a j e d e l Á l g e b ra Booleana, inciden en
d u r a n t e d i s t i n t o s t i e m p o s , a l g u n a s de ellas ya mencionadas
siguientes criterios:
24
simplificación.
expresión booleana.
• A y u d a r l e a s i m p l i f i c a r o l l e v a r a u n a f o r m a m á s s i m p l e p e ro
simplificación.
E s t e t r a b a j o d e g r a d o le f a c i l i t a a l u s u a r i o ( a l u m n o ) e l a p r e n d i z a j e
software puede ser utilizado como apoyo a los docentes que dicten
tema.
A m e d i d a q u e e l u s u a r i o i n t e r a c t ú a c o n e l MEC(Material Educativo
la aplicación inmediata.
L o s m é t o d o s d e i n v e s t i g a c i ó n e m p l e a d o s s o n : e n t r e v i s tas, análisis
l ó g i c o s y d e s c r i b i r s e , a n a l i z a r s e , m e d i a n t e e l Á l g e b r a B ooleana. En
1 . 1 . 1 O p e r a c i o n e s B á s i c a s d e l Á l g e b r a B o o l e a n a . Solo existen
t r e s o p e r a c i o n e s b á s i c a s : O R , A N D Y N O T , llamadas operaciones
lógicas.
De la Tabla 1 se concluye:
27
A B X=A+B
0 0 0
0 1 1
1 0 1
1 1 1
s í m b o l o ( l ) s e p u e d e o m i t i r e s d e c i r , X = A lB e s l o m i s m o q u e X = A B ,
A B X =AB
0 0 0
0 1 0
1 0 0
1 1 1
De la Tabla 2 se concluye:
ordinaria de 1 y 0.
entradas sean 1.
q L a s a l i d a es c e r o e n c u a l q u i e r c a s o e n q u e u n a o m á s
s í m b o l o (- ) d e l a n t e d e l a v a r i a b l e d e s e a d a p a r a r e p r e s e n t a r u n a
T a b l a 3 . T a b l a d e V e r d a d p a ra la operación NOT.
A X =-A
0 1
1 0
De la Tabla 4 se concluye:
de un INVERSOR.
entradas sean 0.
30
sean uno.
Ta b l a 4 . T a b l a d e v e r d a d q u e d e f i n e l a o p e r a c i ó n N O R .
A B X =- ( A + B )
0 0 1
0 1 0
1 0 0
1 1 0
o p e r a c i ó n s e e nc u e n t r a n e n l a t a b l a d e l a T a b l a 5 .
De la tabla 5 se concluye:
seguida de un INVERSOR.
31
entradas sean 1.
sean cero.
A B X =- ( A B )
0 0 1
0 1 1
1 0 1
1 1 0
1 . 1 . 2 F o r m a d e S u m a d e P r o d u c t o s . L o s m étodos de diseño y
d o s o m á s t é r m i n o s A ND ( p r o d u c t o s ) q u e s e o p e r a n c o n O R
(sumas).
una forma más simple que contenga menos variables en uno o más
1 X• 0 = 0 .
2 X• 1 = X .
3 X • X =X.
4 X - X = 0.
33
5 X + 0 = X.
6 X + 1 = 1.
7 X + X = X.
8 X + -X = 1
9 X + Y = Y + X.
10 X • Y = Y • X.
1 1 X + (Y + Z) = (X + Y) + Z = X + Y + Z.
1 2 X(YZ) = (XY)Z = X Y Z .
1 4. X + X Y = X .
1 5. X + - XY = X + Y.
34
LEYES DE DEMORGAN:
1 6. - (X + Y) = - X • - Y.
1 7 . - (X • Y ) = - X + - Y.
q L a e x p r e s i ó n o r i g i n a l s e p o n e e n f o r m a d e s uma de productos
de la multiplicación de términos.
términos.
1 . 1 . 3 . 2 M é t o d o d e l M a p a d e K a r n a u g h . El método de Karnaugh es
limita a seis variables. Los problemas con cinco y seis entradas son
demasiado complicados.
El map a d e K a r n a u g h s e f o r m a d e l a s i g u i e n t e m a n e r a :
2 . L o s c u a d r a d o s d e l m a p a d e K a r n a u g h se m a r c a n d e f o r m a q u e
f i n d e q u e l o s c u a d r a d o s q u e s o n a d y a c e n t e s t a n t o v e r t i c a l como
derecha.
3 . U n a v e z q u e e l m a p a d e K a r n a u g h s e h a l l e n a d o c o n c e ros y
Ej. : Los siguientes son los mapas de Karnaugh para dos, tres y
A B X
0 0 1
0 1 0
1 0 0
1 1 1
X= -A -B + AB
-B B
-A 1 0
A 0 1
A B C X
0 0 0 1
0 0 1 1
0 1 0 1
0 1 1 0
1 0 0 0
1 0 1 0
1 1 0 1
1 1 1 0
38
X = -A - B -C + -A -B C + - AB -C + A B -C
-C C
- A -B 1 1
- AB 1 0
AB 1 0
A -B 0 0
A B C D X
0 0 0 0 0
0 0 0 1 1
0 0 1 0 0
0 0 1 1 0
0 1 0 0 0
0 1 0 1 1
0 1 1 0 0
0 1 1 1 0
1 0 0 0 0
1 0 0 1 0
1 0 1 0 0
1 0 1 1 0
1 1 0 0 0
1 1 0 1 1
1 1 1 0 0
1 1 1 1 1
Figura 3.
40
- C -D - CD CD C -D
- A -B 0 1 0 0
- AB 0 1 0 0
AB 0 1 1 0
A -B 0 0 0 0
consiste en:
Existe una r e g l a d e a g r u p a m i e n t o d e c u a l q u i e r t a m a ñ o , l a c u a l d i c e :
final.
dos y uno de ocho elimina tres. Este principio se usa para obtener
41
una expresi ó n l ó g i c a s i m p l i f i c a d a a p a r t i r d e u n m a p a d e K a r n a u g h
siguientes:
3 . A c o n t i n u a c i ó n , b us c a r a q u e l l o s u n o s q u e s e a n a d y a c e n t e s s ó l o
repetido.
n o s e h a y a n r e p e ti d o .
42
6 . Agrupar los pares que sean necesarios para incluir los unos que
de agrupamientos.
agrupamiento.
1 . 1 . 3 . 3 M é t o d o D e Q u i n e M c C luskey: E l m é t o d o d e M c C l u s k e y e s
F = - a -b - c -d + - a -b c -d + - a b c -d + - abcd + a -b - c -d + a -b - cd + ab - cd
+ abcd
son:
1 . C o l u m n a 1 . C a d a u n o d e l o s t é r m i n o s d e l a función.
43
1.
obtenido.
4 . C o l u m n a 4 . E l í n d i c e q u e c o r r e s p o n d e a l n ú m e r o d e u n o s que
- a - b -c - d 0000 0 Índice 0
- a - bc - d 0010 2 Índice 1
a - b -c - d 1000 8
- a b c- d 0110 6 Índice 2
a - b -c d 1001 9
a b - cd 1101 13
columna uno de igual índice con los del siguiente índice, donde se
e n c u e n t r e u n a s o l a d i f e r e n c i a s e t o m a e s e t e r m i n o y s e forma la
n ú m e r o s d e c i m a l e s c o r r e s p o n d i e n t e s a l o s t é r m i n o s e n l o s que se
0 0 -0 (0,2) Índice 0
- 000 (0,8)
0 - 10 (2,6) Índice 1
1 0 0- (8,9)
0 1 1- (6,7) Índice 2
1 - 01 (9,13)
1 1 -1 (13,15)
45
A g r u p a m i e n t o d e S e g u n d o O r d e n a s í s u c e s i v a m e n t e h a s t a que no
a b c d 0 2 6 7 8 9 13 15
0 0 -0 X X
- 000 X X
0 - 10 X X
1 0 0- X X
0 1 1- X X
1 - 01 X X
- 111 X X
1 1 -1 X X
posibles.
F = - a -b - d + a - b -c + - a b c + a b d ó F = -b - c -d –a c -d + a -c d + b c d
nuestros usuarios.
u s u a r i o – lector influy a n e n e l d e s a r r o l l o d e l t e x t o m u l t i m e d i a .
48
pueden ser de dos tipos: los juegos educativos y los juegos para
conceptos.
COMPUTADOR.
d e p e n d i e n d o d e l a s c u a l e s a p a r e c e u n a r e t r o a limentación diferente
material.
49
aritméticos).
etc.
r e a l i z a r , p u e s t o q u e s e t r a b a j a e n d o s p l a n o s s i m u l t á n e a m e nte el
d e s c u b r i m i e n t o , a u n q u e e n e l f o n d o n o e s d i f e r e n t e , y a q u e está
c a p a c i d a d d e g e n e r a c i ó n y d e e n t e n d e r - haciendo. Actualmente
t a m b i é n s e h a b l a c o m o o b j e t i v o d e l d e s c u b r i m i e n t o e l e s t i m u l ar el
b i o l ó g i c o , s o c i a l e t c . ) , d o n d e s e p r e s e n t a l a p r o b l e m ática de
familias:
princip a l e s a s o f t w a r e e d u c a t i v o s , e s q u e o f r e c e p a u t a s e s p e c i f i c a s
información po r s u c u e n t a .
* L a s t e o r í a s d e l c o n d i c i o n a m i e n t o e s t í m u l o – respuesta: El
i nc l u y e n d o l a s p i e d r a s , l a s r o c a s , e t c . ; a e s t o s e l e l l a m o a n i m i s m o .
o p i n i ó n d e l a c a s u a l i d a d d e t o d o s l o s f e n ó m e n o s d e l a n a t u r aleza.
i n t e l i g e n t e , b i e n d i s e ñ a d a q ue a p r e n d e m e d i a n t e u n p r o c e s o a d i t i v o
metas de enseñanza.
1 . 4 . 1 E l c o n d i c i o n a m i e n t o C l á s i c o d e P a v l o v ( 1 8 4 9 - 1 9 3 6 ) . En sus
i n t e r e s a d o e n e l p r oc e s o d i g e s t i v o d e l o s p e r r o s y n o e n e l
perro.
a n i m a l s e g r e g a r á s a li v a a l o í r e l s o n i d o o a l v e r l a l u z , s i n l a
reflejo.
1 . 4 . 2 E l c o n e x i o n i s m o d e T h o r n d i k e ( 1 8 7 4 -1 9 4 9 ) . El fundamento
e n l a q u e t i e n e q u e l o g r a r u n a m e t a , c o m o p o r e j e m p l o , s a l i r de una
d e e r r o r e s q u e s e c o m e t e n o p o r e l t i e m p o q u e t r a n s c u r r e a n t e s de
problema.
azar. D e l a n t e r i o r e x p e r i m e n t o , de d u j o q u e e l g a t o n o “ p e s c a ”
con la comprensión
tres:
- Ley del ejercicio. Según esta ley cuanto más se repita una
retención.
- L e y d e l e f e c t o . E s t á l i g a d a a l p r i n c i p i o d e p l a c e r – dolor. Por lo
1 . 4 . 3 C o n d i c i o n a m i e n t o c o n t i g u o d e E d w i n G u t h r i e ( 1 8 8 6 -1 9 5 9 ) ..
1 . 4 . 4 C o n d i c i o n a m i e n t o o p e r a n t e d e B . F . S k i n n e r ( 1 9 0 4 -1 9 7 4 ).
D e s c u b r i ó y d e s a r r o l l ó u n m o d e l o o p a r a d i g m a d e a p r e n d i zaje,
R e f u e r z o e s c u a l q u i e r e v e n t o q u e i n c r e m e n t e l a fuerza de la
respuesta.
Ejemplo: todos los movimientos que hace una rata para alcanzar el
u n a b u e n a c a l i f i c a c i ó n , o t o d a s l a s “p i l a t u n a s ” d e l b e b e p o r l o g r a r
la sonrisa de su madre.
condicionamiento operante”.
59
P r o g r a mas y
registros
Interés en el
Estudio Intensivo
del sujeto
Control del
comportamiento del
Interés en el
control del
s i g n i f i c a q u e l a c o n d u c t a t i e n e u n a c a u s a y q u e s o l o puede producir
2 . R e f o r z a m i e n t o p r i m a r i o y s e c u n d a r i o . U n r e f o r z a d o r p r imario
es aquel que resulta grato por sí mismo, sin nexo alguno con
s e c u n d a r i o , au n q u e n o p a s a d e s e r u n s i m p l e p a p e l o m e t a l ,
m o m e n t o e n q u e s e o b t i e n e e l c o mportamiento deseado y el
d i f e r e n t e d e l r e f o r z a m i e n t o , y a q u e m i e n t r a s e l c a s t i g o consiste en
de uno negativo.
C o m p u t a d o r ) e n f o c a d o h a c i a l o s e n t r e n a d o r e s - tutores, porque
♦ El d e s a r r o l l o d e l p e n s a m i e n t o c o m o p r o c e s o o p u e s to a la
compresión.
operaciones de la lógica.
otras situaciones.
63
• E l o t r o c o ns i s t e e n a d q u i r i r u n a n u e v a e s t r u c t u r a d e o p e r a c i o n e s
1 . 4 . 6 T e o r í a d e V i g o s k y : A p r e n d i z a j e S i g n i f i c a t i v o . Trata sobre
m e m o r i z a r l o . E l a p r e n d i z a j e s i g n i f i c a t i v o e s r e t e n i do más tiempo
1.5 DIDÁCTICA.
1 . 5 . 1 C o n c e p t o d e D i d á c t i c a . L a d i d á c t i c a e s c i e n c i a y a r te de
e s t a b l e c e n o r m a s d e a c c i ó n o s u g i e r e f o r m a s d e l c o m p o r t a miento
educación.
sea posible.
social.
alumno.
65
objetivos.
t é c ni c a s s o n f u n d a m e n t a l e s e n l a e n s e ñ a n z a y d e b e n e s t a r , l o m á s
ajustada y e f i c i e n t e , t o m a r e n c o n s i d e r a c i ó n e l m e d i o d o n d e s e e s t á
enseñando.
66
q u e s e q u i e r e e n s e ñ a r ; e s l l e va r l o a p a r t i c i p a r a c t i v a m e n t e e n l o s
reflexión.
metas definidas.
siguientes pa s o s :
67
1 . 6 . 1 T i p o s d e M o t i v a c i ó n . Ha y d o s m o d a l i d a d e s d e l l e v a r a l
positiva o negativa.
materia en sí.
E l e s t u d i o s e l l e v a a c a b o b a j o e l i mperio de la coacción.
r e a v i v a r d i c h o i n t e r é s p o r lo q u e e s t á s i e n d o e s t u d i a d o . D e e s e
1 . 6 . 3 F u e n t e s y T é c n i c a s D e M o t i v a c i ó n . Constituyen elementos,
necesidades.
A l g u n a s f u e n t e s d e m o t i v a c i ó n p u e d e n , a s i m i s m o – y según la
1 . N e c e s i d a d e s d e l e d u c a n d o , q u e p u e d e n s e r d e n a t u r a leza
5 . Actividad lúdicra.
7 . Aprobación social.
8 . Competición.
1 0 . Necesidades económicas.
1 1 . Necesidades de conocimiento,
15. Aspiraciones.
t é c n i c a s p r o c u r a n s u s c i t a r mo t i v o s y a c t i v a r p o s i b i l i d a d e s i n t e r n a s .
hechos de la actualidad.
atenci ó n l o s t r a b a j o s d e l a c l a s e .
d e s u s t r a e r a l a l u m n o d e l a s i t u a c i ó n d e s i m p l e espectador,
intelectualmente.
d e s f a v o r a b l e s p a r a e l t r a b a j o e s c o l a r c o m o : r e p r i m e ndas,
q u e t r a n s c u r r e s o l a m e n t e e n e l c a p o t e ó ri c o t i e n e p o c a s
su tarea.
l a a c t i v i d a d , l a e x p l o r a c i ó n , m a n i p u l a c i ó n y c o n t a c t o , l o s c u a l e s nos
A d i f e r e n c i a d e l a c ur i o s i d a d y e x p l o r a c i ó n , e s t á l a m a n i p u l a c i ó n
las cosas.
combinan en objetos.
el objeto.
d e a c c i o n e s . D e n t r o d e u n a c l a s e g e n e r a l d e ac c i o n e s , l a a c c i ó n
EDUCATIVO COMPUTARIZADO).
en el usuario.
S i s t e m a d e M o t i v a c i ó n . M o t i v a c i ó n q u e i n c e n t i v e e l a prendizaje del
tema en mención.
abandonos.
1 .8 . 1 . 3 V a r i a b l e s d e C o m u n i c a c i ó n .
realizando.
a p l i c a c i o n e s d e é s t a , c o m o p o r e j e m p l o a l a L ó g i c a D i g i ta l .
79
L ó g i c a , A r q u i t e c t u r a d e l C o mp u t a d o r , T é c n i c a s D i g i t a l e s , C i r c u i t o s
2 . 2 . 1 ¿ P o r q u é e l M E C e s t i p o t u t o r – E n t r e n a d o r ? Se presenta la
obtiene de esta.
81
u n a a r d i l l a , u n r a t ó n u o t r o . D e s e a n d o i n s p i r a r a l u s u a r i o : a nimo,
1. Lección Historia.
4 . L e c c i ó n S i m p l i f i c a c i ó n M é t o d o d e Q u i n e - McCluskey.
Tercero. Etc.
6. Lección Aplicaciones.
circuitos Digitales.
Tabla 9.
84
N I V E L C OMPLEJIDAD P U N T U A C I Ó N
1 Baja 10
2 Media baja 20
3 Media 30
4 Alta 40
e n q u e s e e n c u e n t r a e l u s u a r i o , c o n e s t a i n f o r m a ción se accede a
r e s p u e s t a d e s e a d a s e l e a p l i c a u n r e f o r z a d o r p ositivo subiéndolo
c e r o c u a n d o e s i n c o r r e c t a , y p a r a l a s evaluaciones en que se
pasos acertados, el cual debe ser mayor del 60% para subir de
v e i n t e p u n t o s q u e é l o b t e n g a e n s u e v a lu a c i ó n c o n s i g u e u n a
85
t o t a l d e l a p u n t u a c i ó n d e l e j e r c i c i o , si n o e s c o r r e c t a s e l e p r o p o n e
2 . 2 . 5 E j e r c i c i o s R e s u e l t o s . E l u s u a r i o p u e d e c o n s u l t a r e n la base
continuación.
86
usuario.
e l c e r e b r o . L o i d e a l e s u t i l i z a r d e 5 a 7 , s i se desea utilizar
4.
88
Color Sentido
Rojo Fue r z a v i t a l a c t i v i d a d
Azul Tranquilizante
Amarillo Estimulante
Verde Estabilidad
Morado Metamorfosis
Gris Negación
Blanco Positivo
2 . 3 . 1 O b j e t i v o . E l c o n o c e r e l p o r q u é , d ó n d e y p a r a qué, surgieron
p a r a Á l g e b r a B o o l e a n a , e n s u s d o s m ó d u l o s : Biografía de George
pueda:
booleana.
En los módulos: Op e r a c i o n e s d e l á l g e b r a B o o l e a n a , e c u a c i o n e s
mejor manera.
cuatro niveles de co m p l e j i d a d e n l o s q u e s e p u e d e e n c o n t r a r q u i e n
pueda:
• Reduci r u n a e x p r e s i ó n b o o l e a n a u t i l i z a n d o e s t e m é t o d o .
asimilación de estos.
c u a t r o n i v e l e s d e co m p l e j i d a d e n l o s q u e s e p u e d e e n c o n t r a r q u i e n
NIVEL VARIABLES
1 3
2 4
3 5
4 6
u s u a r i o c r e a l a s ta b l a s q u e s e l e p i d e n , y para la reducción se
de lección.
estudiante pueda:
DeMorgan.
• A p l i c a r l o s t e o r e m a s d e l Á l g e b r a d e B o o l e y D e M o r g a n para
2 . 6 . 3 M o t i v a c i ó n . P a r a m a nt e n e r a l u s u a r i o p r e d i s p u e s t o a l o q u e
u t i l i z a n d o l o s t e o r e m a s q u e s e l e m u e s t r a n a u n l a d o de la pantalla,
2.6.4 Evaluación. En esta lección se manejan los cuatro niveles de complejidad en que
se puede encontrar el usuario que va a ser evaluado, y se determina de acuerdo al
número de variables booleanas que contenga el ejercicio(Ver Tabla 9).
NIVEL VARIABLES
1 3
2 4
3 5
4 6
P a r a e v a l u a r a l u s u a r i o e n e s t a l e c c i ó n s e l e p r o p o n e s i m pl i f i c a r u n a e c u a c i ó n
booleana, utilizando los teoremas que se exhiben al lado de ésta, el usuario procura
simplificar la ecuación con el menor número de equivocaciones posibles.
Estudiantes y Lección_Simplificación.
nand, nor).
lógica s .
booleana.
2.7.2 Escenario. La lección se desarrolla en medio de una gama de colores verdes que
inducen a la concentración, en medio de un ambiente adecuado lleno de tranquilidad,
estabilidad donde el estudiante se siente a gusto, lo cual permite que él esté
predispuesto a conocer lo que se le va a enseñar.
2.7.3 Motivación. En esta lección se busca motivar al estudiante haciendo que participe
e n la lección, se le solicita que él llene la tabla de verdad para una ecuación booleana,
2 . 7.4 Evaluación. En esta lección se manejan los cuatro niveles de complejidad en que
se puede encontrar el usuario que va a ser evaluado, y se determina de acuerdo al
número de variables booleanas que contenga el ejercicio(Ver Tabla 13).
97
Tabla 13. C o m p l e j i d a d E j e r c i c i o s S i m p l i f i c a c i ó n A l g e b r a i c a
NIVEL VARIABLES
1 3
2 4
3 5
4 6
3. DISEÑO COMPUTACIONAL
á l g e b r a b o o l e a n a p a r a c o n s u l t a s , s us c a m p o s s o n : T e m a , N i v e l d e
de Ejercicio.
visitado la lección.
resueltos del módulo, tres campos más que controla los ejercicios
l e c c i ó n , c o n s u l t a a e j e r c i c i o s r e s u e l t o s de l a l e c c i ó n , t r e s c a m p o s
R e d u c c i ó n.
e s t u d i a n t e e n l a l e c c i ó n a p li c a c i o n e s d e l á l g e b r a B o o l e a n a . L o s
campos que contiene son: Código del alumno, número de veces que
e j e r c i c i o s q u e h a r es u e l t o d e l o s m ó d u l o s .
Los campos que contiene son: Código del alumno, número de veces
Booleanas.
101
Cua d r o 5 . T a b l a E s t u d i a n t e s .
por el usuario
encuentra el usuario
102
ejercicio.
ha visitado la lección
N u m L e c c _ V i s t E n t e r o C o rto N ú m e r o d e V e c e s q u e h a V i s i t a d o l a
lección.
Operaciones Booleanas.
Verdad.
Ecuaciones Booleanas.
105
NumLecc_Vist Entero N ú m e r o d e V e c e s q u e h a V i s i t a d o la
Corto lección.
Minterms
agrupamiento.
Lección.
consultado
circuitos digitales.
ecuaciones booleanas.
C u a d r o 1 2 . T a b l a d e l a L e c c i ó n S i m p l i f i cación.
lección.
d e t a l l a d o s u t i l i z a m o s la siguiente convención:
DIAGRAMA USUARIO
109
Identificar
Estudiante
Alumno
Seleccionar
Lección Salir
DIAGRAMA SELECCIÓN
110
Retornar
Salir
Hist Ayuda
Aplicaciones
Seleccionar
Leccion Ayuda
Simplificacion
McCluskey
Lección_I Estudiantes
TB
Simplificacion
Algebraica
DIAGRAMA HISTORIA
111
Ayuda
Retornar
Ayuda
Hist
Estudiante
Leccion_1
Salir
Ayuda Ayuda
Retornar
EjercR Estudiante
Salir
Tema
Seleccionado
EjercR
Evaluacion
Evaluar
Leccion_I
E n e l d i a g r a m a L e c c i ó n _ I s e r e fi e r e a l a s t a b l a s : T e o r í a B á s i c a ,
Procesos:
Boole.
T a m b i é n p e r m i t e l a c r e a c i ó n e i n s t a l a c i ó n de componentes visuales
aplicaciones.
116
TCustonControl
TEntradaE TEntradaF
OperadorNot
4.3 CLASES
TentradaF.
117
compuerta.
su número de entradas.
otra compuerta.
P r o c e s s C l ic k : E n t i e m p o d e e j e c u c i ó n a l d a r c l i c d e r e c h o p e r m i t e
S a l i r D . A s i g na l a s a l i d a a l a p r o p i e d a d F s a l i d a .
119
a c t u a l i z a n l a s p r o p i e d a d e s , r e l a c i o n a d a s a c a d a zo n a s e n s i b l e .
mover el señalador.
compuerta.
F N u m P . E n t e r o . N ú m e r o q u e o c u p a l a c o m p ue r t a e n l a p a n t a l l a .
120
a su número de entradas.
otra compuerta.
F E n tr a d a 6 . C a d e n a . I n d i c a q u e c o m p o n e n t e e n t r o a l a c o m p u e r t a .
F C o n e c t 1 , F C o n e c t 2 , F C o n e c t 3 , F C o n e c t 4 , FConect5, FConect6.
NAND.
121
M o u s e D o w n : r e s p o n d e a u n c l i c k d e l r a t ó n . E v a l ú a q u e e l c l i c k se
mover el señalador.
respectivas entradas.
122
compuerta.
su número de entradas.
otra compuerta.
V a l i d a r . P e r m i t e e n e l d i s e ñ o c o n t r o l a r q u e l a c o m p u e r ta tenga de
MouseMove: Responde a l m o v i m i e n t o d e l s e ñ a l a d o r d e l r a t ó n , a l
mover el señalador.
compuerta.
su número de entradas.
otra compuerta.
125
B o l e a n . I n d i c a si u n a e n t r a d a e s t a o n o c o n e c t a d a .
d é s o b r e u n a z o n a s e n s i b l e d e l e l e me n t o , s i e s t o s e c u m p l e s e
mover el señalador.
compuerta.
127
F S a l i d a . C a d e n a . G u a r d a l a s a l i d a d e l a c o m p ue r t a .
su número de entradas.
otra compuerta.
F E n t r a d a 1 . Cade n a . I n d i c a q u e c o m p o n e n t e e n t r o a l a c o m p u e r t a .
P a i n t : Hace el di b u j o d e l o b j e t o f u e n t e e s d e c i r l a c o m p u e r t a N o t .
entrada.
128
MouseMove: R e s p o n d e a l m o v i m i e n t o d e l s e ñ a l a d o r d e l ratón, al
mover el señalador.
C l i c K . M u e s t r a l a e nt r a d a e n l a p a n t a l l a .
mover el señalador.
mover el señalador.
5. RECOMENDACIONES
y Simplificación algebraica.
6. CONCLUSIONES
siguientes:
e n e l d e s a r r o l l o d e l p r o c e s o d e e n s e ñ a n z a - aprendizaje de
expresión booleana.
133
de Boole.
GLOSARIO
A p r e n d i z a j e A s i s t i d o p o r C o m p u t a d o r a : enfoque de la educación
basada en computadora en la cual se hace énfasis en el sujeto que
incrementa su conocimiento, sin que a este se le enseñe o muestre
explícitamente, el sujeto lo tiene que inferir o apropiarselo por sí
mismo, empleando para ello alguno s programas didácticos de
computadora. El proceso ya no es de inculcación de información
sino de capturar conocimiento. Las técnicas de descubrimiento y la
programación en LOGO se señalan como buenos exponentes de
e s t e e n f o q u e . S i n e m b a r g o e s t e e n f a s i s p u e de darsele a cualquier
modalidad de la Enseñanza por Computadora, por lo que se le toma
como sinónimo aunque en el fondo no lo sea.
A r c h i v o ( " f i l e " ): I n f o r m a c i ó n ( o c o n j u n t o d e d a t o s e s t r u c t u r a d o s )
h o m o g é n e a a l m a c e n a d a e n u n d i s c o o d i s k e t t e e i d e n t i f i c ad o s p o r
un nombre. Está formado por un conjunto de registros ("records")
que dan la información acerca de un individuo y están etiquetadas.
Una base de datos consiste de un grupo estructurado y relacionado
de archivos.
B a s e d e d a t o s : Es la organización y f o r m a d e m a n e j o d e u n a
colección de datos (banco de datos) interrelacionados,
estructurados y almacenados en disco (en archivos manejados de
manera transparente para el usuario), dentro de un conjunto sin
r e d u n d a n c i a s p e r j u d i c i a l e s e i n n e c e s a r i a s p a r a s u c onsulta y
actualización. Frecuentemente bajo este nombre se quiere dar a
entender al sistema manejador de una base de datos (DBMS)
consistente en el paquete que permite entrar, actualizar, recuperar,
135
Cadena : U n o o v a r i o s c a r a c t e r e s a l f a n u m é r i c o s o e s p e c i a l e s ,
incluyendo el espacio o blanco (en este caso tiene que estar
encerrados entre comillas, para saber el comienzo y fin de la
c a d e n a ) . E s s i m p l e m e n t e l a s e c u e n c i a d e l o s c ó d i g o s de esos
caracteres y no representa un valor o cantidad, por lo que puede
ser utilizada como nombre de una variable o instrucción en un
lenguaje de cómputo (siempre que se respete la sintaxis del
l e n g u a j e ) o c o m o u n d a t o s o b r e e l c u a l s e v a e n p r i n c i p i o a realizar
una operación no numérica como ordenar, consultar, comparar etc.
C o m a n d o : Es un elemento d e u n l e n g u a j e s e n c i l l o d e p r o g r a m a c i ó n
que consiste en órdenes o comandos eventualmente modificados; o
precisados por una secuencia de parámetros.
E n s e ñ a n z a a s i s t i d a p o r c o m p u t a d o r a ( E A C ): Referida también
como instrucción asistida por computadora, define el campo de
metodologías, técnicas, y programas que empleando la
computadora pretenden enseñar algo a un estudiante. De alguna
manera auxi lian o sustituyen al maestro proveyendo información,
ejercicios, demostrando conceptos y convirgiendo las ideas dentro
de un modo interactivo que requiere respuesta del estudiante y que
a su vez modula la dirección de la instrucción.
i n c u l c a c i ó n d e l c o n o c i mi e n t o y h a b i l i d a d e s , p e r o s o b r e t o d p o r q u e e l
contenido explícitamente trata sobre el tema a aprender, mientras
que la herramienta es libre de contenido.
Iconos : S í m b o l o s v i s u a l e s e m p l e a d o s p a r a r e p r e s e n t a r o p c i o n e s
dentro de un menú o datos.
I n t e r a c t i v o o c o n v e r s a c i o n a l: f o r m a d e c o m u n i c a c i ó n d i a l o g a l o =
bidireccional entre el hombre y la computadora.
L ó g i c a B i n a r i a o A l g e b r a d e B o o l e ( B o o l e a n a ) : Sistema lógico y
a l g e b r a i c o e n e l q u e ú n i c a m e n t e s e t i e n e n d o s valores posibles:
Verdadero y Falso, a veces tambien se maneja como 0 y 1.
Shannon aplicó esta lógica a los circuitos de conmutación y creo lo
que se conoce como Circuitos Combinatorios. En esta lógica solo
h a y d o s c o n s t a n t e s 0 o 1 , y t o d a s l a s v a r i a b l e s y expresiones que
se puedan armar pueden valeer sólo 0 o 1. Los circuitos de una
computadora se basan en esta lógica y en la teoría de autómatas.
No confundir con sistema binario.
Pantalla : S e e m p l e a e s t e t é r m i n o e n d o s s e n t i d o s , e l p r i m e r o c o m o
sinónimo de monitor o "display", pero dentro del contexto de
enseñanza asistida por computadora como la información que en un
momento dado se presenta en el monitor ante los ojos del
estudiante. Aunque es deseable que un marco quepa en una
p a n t a l l a n o e s i n d i s p e n s a b l e . M o n i t o r " b i t- m a p " : E s u n t i p o d e
monitor o pantalla de display que permite direccionar cada uno de
l o s p u n t o s d e la pantalla, llamados "pixel". Esto se contrasta con
los monitores de rastreo en el cual solamente pueden direccionar
una línea completa y la gráfica se forma barriendo todas las líneas
d e l m o n i t o r d e a r r i b a h a c i a a b a j o . E s c l a r o q u e l o s m o n i t o r e s " b i t-
map" t i e n e n u n m a y o r p o d e r d e r e s o l u c i ó n .
Ratón : D i s p o s i t i v o d e e n t r a d a e m p l e a d o p a r a m o v e r e l c u r s o r
dentro de la pantalla y eventualmente para seleccionar alguna
opción. El ratón se desplaza sobre una superficie plana cuyo
movimiento es repetido por el cursor en la pantalla.
140
T e c l a s d e f u n c ión : C o n j u n t o d e t e c l a s e s p e c i a l e s n u m e r a d a s q u e
no tienen una definición fija y que por lo tanto pueden ser
utilizadas por un programa para facilitar la realización rápida de
algunas instrucciones.
Vector : U n a l i s t a o r d e n a d a d e v a r i a b l e s d e l m i s m o t i p o ( n o m b r e s ,
números, etc.).
BILIOGRAFIA
1989.
B E C K E R , H e n r y J . U s i n g C o m p u t e r F o r I n s t r u c t i o n . Byte (USA):
1 4 9- 1 6 2 F e b r e r o 1 9 8 7 .
142
INTRODUCCION
y el flujo d e d a t o s d e t a l l a d o .
1.1 HARDWARE.
1.2 SOFTWARE.
software.
2 . ESTRUCTURAS DE DATOS
LECCION_
APLICACION
Cod_Est
Num_Lecc_Vist
Cons_Ejer
Num_cir
LECCION_ Num_ecu
TEORIAB EJERCICIOS_
Punt_Lecc
Cod_Est
Num_Lecc_Vist RESUELTOS
Cons_Ejerc
Num_operac Enunciado
Num_Tablas Nivel
Num_Ecuac ESTUDIANTES Respuesta
P u n t _L e c c Grafico
Num_Ejer
Cod_Est
Num_Est
Clave
Punt_Est LECCION_
Ult_Lecc SIMPLIFICACION
Estr_Est Cod_Est
Niv_Est Num_Lecc_Vist
EJERCICIOS_ Cons_Ejerc
PROPUESTOS Punt_Lecc
Tema LECCION_ Num_Simp
Enunciado McCLUSKEY
Nivel Cod_Est
Respuesta NumLecc_Vist
Gráfico Cons_Ejerc
Puntaje LECCIÓN_
Num_Exp
Num_Ejerc HISTORIA Num_Tab
Variables Cod_Est
Num_Red
Num_Vist
Punt_Lec
148
Campo 1.
Nombre. Cod_Est.
Tipo. Alfabético.
Campo 2.
N o m b r e . Nom_est.
Tipo. Alfabético.
Campo 3.
149
Tipo. Alfabético.
Campo 4.
Nombre. Punt_Est.
D e s c r i p c i ó n . P un t a j e a c u m u l a d o d e l u s u a r i o e n l a s e v a l u a c i o n e s
realizadas.
T i p o . Real.
Campo 5.
Nombre. Ult_lecc.
Tipo. Alfabético.
150
Campo 6.
N o m b r e . Niv_Est.
D e s c r i p c i ó n . N i v e l d e c o m p l e j i d a d e n e l q u e s e e n c u e ntra el
estudiante.
Campo 1.
Nombre. Tema.
Tipo. Alfabético.
Campo 2.
Nombre. Enunciado.
Tipo. Memo.
Campo 3 .
Nombre. Nivel.
Campo 4.
Nombre. Respuesta.
Tipo. Memo.
Campo 5.
Nombre. Grafico.
T ipo. Gráfico.
Campo 1.
Nombre. Tema.
Tipo. alfabético.
Campo 2.
Nombre. Enunciado.
Tipo. Memo.
Campo 3.
Nombre. Nivel.
153
Des cripción. N i v e l d e d i f i c u l t a d d e l e j e r c i c i o .
Campo 4.
Nombre. Respuesta.
Tipo. Memo.
Campo 5.
Nombre. Gráfico.
Tipo. Grafico.
Campo 6
Nombre. Puntaje.
154
T i p o . Real.
Campo 7.
Nombre. Num_Ejer.
Campo 8.
Nombre. Variables.
Campo 1.
Nombre. Cod_Est.
Tipo. Alfabético.
Campo 2.
N o m b r e . Num_Vist.
2.2.4 Lección_TeoriaB.
Campo 1.
156
Nombre. Cod_Est.
Tipo. Alfabético.
Campo 2.
Nombre. NumLecc_Vist.
Teoría B á s i c a d e l Á l g e b r a B o o l e a n a .
Campo 3.
Nombre. Cons_Ejer.
Campo 4.
N o m b r e . Num_Operac.
D escripción. C o n t r o l a l o s e j e r c i c i o s q u e h a r e s u e l t o e l u s u a r i o d e l
Básica.
Tipo. Alfabético.
Campo 5.
Nombre. Num_Tab.
Tipo. Alfabético.
Campo 6.
Nombre. Num_Ecuac.
158
Tipo. Alfabético.
Campo 7.
Nombre. Punt_Lecc.
T i p o . Real.
Campo 1.
Nombre. Cod_Est.
Tipo. Alfabético.
Campo 2.
159
Nombre. NumLecc_Vist.
Campo 3.
Nombre. Cons_Ejer.
resueltos.
Campo 4.
Nombre. Num_Exp.
Tipo. Alfabético..
Campo 5.
Nombre. Num_Tab.
M ó d u l o T a b l a s d e A g r u p a m i e n t o s d e l a l e cción Simplificación de
McCluskey.
Tipo. Alfabético..
Campo 6.
Nombre. Num_Red.
Tipo. Alfabético..
Campo 7.
161
N o m b r e . Punt_ L e c c .
T i p o . Real.
2.2.6 Lección_Aplicación
Campo 1.
Nombre. Cod_Est.
Tipo. Alfabético.
Campo 2.
Nombre. NumLecc_Vist.
Simplificación Algebraica.
Campo 3.
Nombre. Cons_Ejer.
Campo 4.
Nombre. Num_cir.
D e s c r ipción. C o n t r o l a l o s e j e r c i c i o s q u e h a r e s u e l t o e l u s u a r i o d e l
Tipo. Alfabético..
Campo 5.
N o m b r e . Num_ecu.
163
Tipo. Alfabético..
Campo 6.
Nombre. Punt_Lecc.
T i p o . Real.
Campo 1.
Nombre. Cod_Est.
Tipo. Alfabético.
Campo 2.
164
Nombre. NumLecc_Vist.
lección.
Campo 3.
Nombre. Cons_Ejer.
resueltos.
Campo 4.
Nombre. Punt_Lecc.
D e s c r i p c ió n . P u n t a j e o b t e n i d o e n e l m ó d u l o .
T i p o . Real.
165
Campo 5.
N o m b r e . Num_ecu.
Tipo. Alfabético..
DIAGRAMA USUARIO
Identificar
Estudiante
Alumno
Seleccionar
Lección Salir
167
DIAGRAMA SELECCIÓN
Retornar
Salir
Hist Ayuda
Aplicaciones
Seleccionar
Leccion Ayuda
Simplificacion
McCluskey
Lección_I Estudiantes
TB
Simplificacion
Algebraica
168
DIAGRAMA HISTORIA
Ayuda
Retornar
Ayuda
Hist
Estudiante
Leccion_1
Salir
169
Ayuda Ayuda
Retornar
EjercR Estudiante
Salir
Tema
Seleccionado
EjercR
Evaluacion
Evaluar
Leccion_I
3 . PROCEDIMIENTOS PRINCIPALES
var
Num0:Numeros;
LongNum,i:Integer;
begin
sw0:=False;
Num0:=['0','1','2','3','4','5','6','7','8','9'];
LongNum:=Length(Numer o);
if (Numero='') then
sw0:=true
else
begin
i:=1;
while ((i<=LongNum) and (sw0=False)) do
if (Numero[i] in Num0) then
i:=i+1
else
begin
numero:=' ';
sw0:=True;
end;
end;
end;
171
P R O C E D I M I E N T O V A L I D A R _ L E T R A S . Verific a q u e l o s c a r a c t e r e s
var
Let0:Letras;
LongLet,i:Integer;
begin
sw0:=False;
L e t 0 : = [ ' á ' , ' a ' , ' b ' , ' c ' , ' d ' , ' e ' , ' é ' , ' f ' , ' g ' , ' h ' , ' i ' , ' í ' , ' j ' , ' k ' , ' l ' , ' m ' , ' n ' , ' ñ ' , ' o ' , ' ó ' , ' p' , ' q ' , ' r '
,'s','t','u','ú','v','w','x','y','z','A','Á','B','C','D','E','É','F','G','H','I','Í','J','K','L'
,'M','N','Ñ','O','Ó','P','Q','R','S','T','U','Ú','V','W','X','Y','Z',' ','.'];
LongLet:=Length(Cadena);
begin
showmessage('Por favor solo digite letras');
cadena:=' ';
sw0:=True;
end;
end;
end;
172
var
LongN,LongC,i,sw1,sw2:Integer;
begin
Num:=['0','1','2','3','4','5','6','7','8','9'];
L e t : = [ ' a ' ,' b ' , ' c ' , ' d ' , ' e ' , ' f ' , ' g ' , ' h ' , ' i ' , ' j ' , ' k ' , ' l ' , ' m ' , ' n ' , ' ñ ' , ' o ' , ' p ' , ' q ' , ' r ' , ' s ' , ' t ' , ' u ' , ' v ' , '
w','x','y','z','A','B','C','D','E','F','G','H','I','J','K','L','M','N','Ñ','O','P','Q','R',
'S','T','U','V','W','X','Y','Z',' ','.'];
Nombre:=Edit1.Text;
C o d i g o : = E d it2.Text;
LongN:=Length(Nombre);
LongC:=Length(Codigo);
Estudiantes.Open;
sw1:=0;
sw2:=0;
if (Nombre=' ') or (Codigo=' ') then
showmessage('Por favor,digite los datos completos')
else
begin
i:=1;
sw1:=0;
while (i<=LongC)and(sw1=0) do
i f (Codigo[i] in Num) then
i:=i+1
else
begin
Showmessage('El codigo solo debe contener números');
Codigo:=' ';
Edit2.Clear;
Edit2.SetFocus;
sw1:=1;
end;
i:=1;
sw2:=0;
while (i<=LongN)and(sw2=0) do
if (Nombre[i] in Let) then
i:=i+1
else
begin
Showmessage('El nombre solo debe contener letras');
Nombre:=' ';
173
Edit1.Clear;
Edit1.SetFocus;
sw2:=1;
end;
end;
if (sw1=0)and(sw2=0) then
begin
Estudiantes.SetKey;
Estudiantes.FieldByName('Cod_Est').AsString:=Codigo;
Estudiantes.GotoKey;
if (Estudiantes.GotoKey=True) then
begin
showmessage('Código ya existe');
Edit2.Clear;
Edit2.SetFocus;
end
else
begin
panel1.visible:=True;
Edit3.SetFocus;
SpeedButton1N.Enabled:=Fa l s e ;
SpeedButton3N.Enabled:=False;
end;
end;
end;
Estudiantes.Insert;
Estudiantes.Edit;
Estudiantes.Fields[0].AsString:=Codigo;
Estudiantes.Fields[1].AsString:=Nombre;
Estudiantes.Fields[2].AsString:=Clave1;
Estudiantes.Fields[3].AsInteger:=0;
Estudiantes.Fields[4].AsString:=' ';
Estudiantes.Fields[5].AsInteger:=0;
Estudiantes.Fields[6].AsInteger:=1;
Estudiantes.post;
Estudiantes.EnableControls;
panel1.visible:=false;
SpeedButton3N.Enabled:=True;
PageControl1.ActivePage:=PInformacion;
label6I.caption:=Estudiantes.FieldByName('Nom_Est').AsString;
label7I.caption:=Codigo;
Codigo1:=Codigo;
label8I.caption:=Estudiantes.FieldByName('Ult_Lecc').AsString;
Punt:=Estudiantes.FieldByName('Punt_Est').AsFloat;
FormatFloat('0.00',Punt);
label9I.caption:=PuntS;
Estr:=Estudiantes.FieldByName('Estr_Est').As I n t e g e r ;
EstrS:=IntToStr(Estr);
label10I.caption:=EstrS;
Niv:=Estudiantes.FieldByName('Niv_Est').AsInteger;
NivS:=IntToStr(Niv);
label11I.caption:=NivS;
Estudiantes.Refresh;
Estudiantes.Close;
end;
end;
Niv:=Estudiantes.FieldByName('Niv_Est').AsInteger;
NivS:=IntToStr(Niv);
label11I.caption:=NivS;
end;
end
else
begin
sho wmessage('Código no existe');
edit1A.Clear;
Edit1A.SetFocus;
edit2A.Clear;
end;
end;
Estudiantes.Close;
end;
LECCIÓN HISTORIA
Estudiantes e Historia.
end;
Leccion_Historia.Open;
Leccion_Historia.SetKey;
Leccion_Historia.FieldByName('Cod_Es t ' ) . A s S t r i n g : = C o d i g o 1 ;
Leccion_Historia.GotoKey;
if (Leccion_Historia.GotoKey=True) then
begin
Leccion_Historia.Edit;
Leccion_Historia.Fields[1].AsInteger:=Leccion_Historia.Fields[1].AsInteg
er+1;
Leccion_Historia.Post;
Leccion_Historia.EnableCont r o l s ;
Leccion_Historia.Close;
end
else
begin
Leccion_Historia.DisableControls;
Leccion_Historia.Last;
Leccion_Historia.Insert;
Leccion_Historia.Edit;
Leccion_Historia.Fields[0].AsString:=Codigo1;
Leccion_Historia.Fields[1].AsInteg e r : = 1 ;
Leccion_Historia.post;
Leccion_Historia.EnableControls;
Leccion_Historia.Close;
end;
FEntrada.Show;
end;
LECCIÓN TEORIA BASICA.
Estudiantes.Edit;
Estudiantes.Fields[4].AsString:='Teoría Básica';
Estudiantes.Post;
Estudiantes.EnableControls;
Estudiantes.Close;
end;
Leccion_TeoriaB.Open;
Leccion_TeoriaB.SetKey;
Leccion_TeoriaB.FieldByName('Cod_Est').AsString:=Codigo1;
Leccion_TeoriaB.GotoKey;
if (Leccion_TeoriaB.GotoKey=True) then
begin
Leccion_TeoriaB.Edit;
Leccion_TeoriaB.Fields[1].AsInteger:=Leccion_TeoriaB.Fields[1].AsInteg
er+1;
Leccion_TeoriaB.Post;
Leccion_TeoriaB . E n a b l e C o n t r o l s ;
Leccion_TeoriaB.Close;
end
else
begin
Leccion_TeoriaB.DisableControls;
Leccion_TeoriaB.Last;
Leccion_TeoriaB.Insert;
Leccion_TeoriaB.Edit;
Leccion_TeoriaB.Fields[0].AsString:=Codigo1;
Leccion_TeoriaB.Fields[1].AsIn teger:=1;
Leccion_TeoriaB.Fields[2].AsFloat:=0;
Leccion_TeoriaB.Fields[3].AsInteger:=0;
Leccion_TeoriaB.Fields[4].AsString:='00000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000';
Leccion_TeoriaB.Fields[5].AsString:='00000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000';
Leccion_TeoriaB.Fields[6].AsString:='00000000000000000000000000000
0 0 0 0 0 0 0 0 0 000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000';
Leccion_TeoriaB.Fields[7].AsString:='00000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
179
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000';
Leccion_TeoriaB.post;
G Leccion_TeoriaB.EnableControls;
Leccion_TeoriaB.Close;
end;
end;
Á l g e b r a B o o l e a n a q u e s e le p r o p o n e e n e s e m ó d u l o .
end;
end;
end;
begin
label1.Visible:=False;
label2.Visible:=False;
label3.Visible:=False;
label4.Visible:=False;
B0.visible:=False;
B1.visible:=False;
P anel1.Visible:=True;
Cerrar1.Enabled:=True;
BRegresar.Visible:=True;
label6.Visible:=True;
label7.Visible:=True;
label8.Visible:=True;
end;
end;
end;
end;
Ejercicios_Propuestos.DisableControls;
sw:=False;
Ejercicios_Propuestos.First;
while ((not(Ejercicios_Propuestos.EOF)) and (sw=False)) do
begin
Ejercicios_Propuestos.Edit;
if (Ejercicios_Propuestos.Fields[0].AsString= 'Operaciones
Booleanas')and (Ejercicios_Propuestos.Fields[2].Asinteger=niv) then
if (EjerSiNo[Ejercicios_Propuestos.Fields[7].AsInteger]='0') then
sw:=True;
if sw=false then
Ejercicios_Propuestos.Next;
end;
if (sw) then
begin
PropBas3:=PropBas3+1;
Ecuac:=Ejercicios_Propuestos.Fields[1].asstring;
FEvaluarOperac.Label2 . C a p t i o n : = ' X = ' + E c u a c ;
FEvaluarOperac.Show;
FOperacABAnd.Hide;
end
else
showmessage('No hay más ejercicios sobre este tema en este nivel.');
end;
utilizar.
else
Tipo:='And';
end;
a utilizar.
procedure NandNor (Ecuac :string ;var Tipo: string; var C antV: integer);
var
i,j:integer;
sw1:boolean;
Expres:string;
begin
sw1:=False;
CantV:=0;
Expres:='';
for i:=1 to length(Ecuac) do
if ((Ecuac[i]=' -' ) a n d ( E c u a c [ i + 1 ] = ' ( ' ) ) t h e n
begin
Expres:=Expres+Ecuac[i]+Ecuac[i+1];
j:=i+2;
while ((Ec uac[j]<>')') and (j<=length(Ecuac))) do
begin
Expres:=Expres+Ecuac[j];
if (Ecuac[j]='+') then
sw1:=True
else
CantV:=CantV+1;
j:=j+1;
end;
end;
if (sw1) then
Tipo:='Nor'
else
Tipo:='Nand';
end;
if (sw=False) then
begin
VTerm[NTerm- 1]:=Acumula;
Acumula:='';
end;
end;
end;
if (NCol=stringgrid1.ColCount- 1) then
begin
NTerm:=NTerm+1;
NCol:=0;
end;
if (NTerm=stringgrid1.RowCount) then
if (Cantv<=4) then
begin
sw_t:=True;
NCol:=stringgrid1.ColCount-1 ;
NTerm:=1;
end
else
begin
NCol:=0;
NTerm2:=1;
end;
end
else
if (NTerm2<StringGrid2.RowCount) then
begin
StringGrid2.Cells[NCol,NTerm2]:='1';
if (NCol<stringgrid2.ColCount - 1 ) t h e n
Acumula:=Acumula+'1';
NCol:=NCol+1;
if (NCol=stringgrid2.ColCount - 1 ) t h e n
begin
sw:=False;
i:=0;
while ((i<=NTerm+NTerm2- 2 ) a n d ( s w = F a l s e ) ) d o
begin
Comp:=CompareStr(VTerm[i],Acumula);
if (Comp=0) then
begin
panel3.Visible:=True;
label14.Caption:=Acumula;
NError:=NError+1;
NCol:=0;
sw:=True;
for j:=0 to StringGrid2.ColCount-1 d o
StringGrid2.Cells[j,NTerm2]:='';
acumula:='';
end
else
187
i:=i+1;
end;//while
i f ( s w = F a l s e ) then
begin
VTerm[NTerm+NTerm2- 2]:=Acumula;
Acumula:='';
end;
end;//
if (NCol=stringgrid2.ColCount - 1 ) t h e n
begin
NTerm2:=NTerm2+1;
NCol:=0;
if (NTerm2=stringgrid2.RowCount) then
begin
sw_t:=True;
NCol:=stringgrid2.ColCount- 1 ;
NTerm:=1;
NTerm2:=20;
end;
end;
end;
end
else
if (sw_t) then
begin
if (NTerm<StringGrid1.RowCount) then
begin
StringGrid1.Cells[NCol,NTerm]:='1';
if (Tipo='And') then
begin
Term:=VTerm[NTerm- 1];
sw0:=False;
for j:=1 to length(Term) do
if (Term[j]='0') then
sw0:=True;
if (sw0=False) then
begin
if (StringGrid1.Cells[NCol,NTerm]='1') then
begin
panel1.Visible:=True;
label6.Caption:=StringGrid1.Cells[NCol,NTerm];
end
else
begin
panel2.Visible:=True;
label10.Caption:='1';
NError:=NError+1;
StringGrid1.Cells[NCol,NTerm]:='1';
end;
end
else
188
if (sw0) then
begin
if (StringGrid1.Cells[NCol,NTerm]='1') then
begin
panel2.Visible:=True;
label10.Caption:='0';
NError:=NError+1;
StringGrid1.Cells[NCol,NTerm]:='0';
end
else
begin
panel1.Visible:=True;
label6.Caption:=StringGrid1.Cells[NCol,NTerm];
end;
end;
end
else
if (Tipo='Or') then
begin
ceros:=StringGrid1.ColCount - 1;
num0:=0;
Term:=VTerm[NTerm -1 ] ;
for j:=1 to length(Term) do
if (Term[j]='0') then
num0:=num0+1;
if (num0=ceros) then
begin
if (StringGrid1.Cells[NCol,NTerm]='0') then
begin
panel1.Visible:=True;
label6.Caption:=StringGrid1.Cells[NCol,NTerm];
end
else
begin
panel2.Visible:=True;
label10.Caption:='0';
NError:=NError+1;
StringGrid1.Cells[NCol,NTerm]:='0';
end;
end
else
begin
if (StringGrid1.Cells[NCol,NTerm]='0') then
begin
panel2.Visible:=True;
label10.Caption:='1';
NError:=NError+1;
StringGrid1.Cells[NCol,NTerm]:='1';
end
else
begin
189
panel1.Visible:=True;
label6.Caption:=StringGrid1.Cells[NCol,NTerm];
end;
end;
end
else
if (Tipo='Nand') then
begin
Term:=VTerm[NTerm- 1];
sw0:=False;
for j:=1 to length(Term) do
if (Term[j]='0') then
sw0:=True;
if (sw0=False) then
begin
if (StringGrid1.Cells[NCol,NTerm]='1') then
begin
panel2.Visible:=True;
label10.Caption:='0';
NError:=NError+1;
StringGrid1.Cells[NCol,NTerm]:='0';
end
else
begin
p anel1.Visible:=True;
label6.Caption:=StringGrid1.Cells[NCol,NTerm];
end;
end
else
if (sw0) then
begin
if (StringGrid1.Cells[NCol,NTerm]='1') then
begin
panel1.Visible:=True;
label6.Caption:=StringGrid1.Cells[NCol,NTerm];
end
else
begin
panel2.Visible:=True;
label10.Caption:='1';
NError:=NError+1;
StringGrid1.Cells[NCol,NTerm]:='1';
end;
end;
end
else
if (Tipo='Nor') then
begin
c e r o s : = S t r i n g G r i d 1 . C o l C o u n t- 1 ;
num0:=0;
Term:=VTerm[NTerm- 1];
190
Term:=VTerm[NTerm+NTerm2-2 ] ;
sw0:=False;
for j:=1 to length(Term) do
if (Term[j]=' 0') then
sw0:=True;
if (sw0=False) then
begin
if (StringGrid2.Cells[NCol,NTerm2]='1') then
begin
panel1.Visible:=True;
label6.Caption:=StringGrid2.Cells[NCol,NTerm2];
end
else
begin
panel2 . V i s i b l e : = T r u e ;
label10.Caption:='1';
NError:=NError+1;
StringGrid2.Cells[NCol,NTerm2]:='1';
end;
end
else
if (sw0) then
begin
if (StringGrid2.Cells[NCol,NTerm2]='1') then
begin
p a n e l 2 . Visible:=True;
label10.Caption:='0';
NError:=NError+1;
StringGrid2.Cells[NCol,NTerm2]:='0';
end
else
begin
panel1.Visible:=True;
label6.Caption:=StringGrid2.Cells[NCol,NTerm2];
end;
end;
end
else
if (Tipo='Or') then
begin
ceros:=StringGrid2.ColCount - 1;
num0:=0;
Term:=VTerm[NTerm+NTerm2- 2];
for j:=1 to length(Term) do
if (Term[j]='0') then
num0:=num0+1;
if (num0=ceros) then
begin
if (StringGrid2.Cells[NCol,NTerm2]='0') then
begin
panel1.Visible:=True;
192
label6.Caption:=StringGrid2.Cells[NCol,NTerm2];
end
else
begin
panel2.Visible:=True;
label10.Caption:='0 ' ;
NError:=NError+1;
StringGrid2.Cells[NCol,NTerm2]:='0';
end;
end
else
begin
if (StringGrid2.Cells[NCol,NTerm2]='0') then
begin
panel2.Visible:=True;
label10.Caption:='1';
NEr ror:=NError+1;
StringGrid2.Cells[NCol,NTerm2]:='1';
end
else
begin
panel1.Visible:=True;
label6.Caption:=StringGrid2.Cells[NCol,NTerm2];
end;
end;
end
else
if (Tipo='Nand') then
begin
T e r m : = V T e r m [ N T e r m + N T e r m 2- 2];
sw0:=False;
for j:=1 to length(Term) do
if (Term[j]='0') then
sw0:=True;
if (sw0=False) then
begin
if (StringGrid2.Cells[NCol,NTerm2]='1') then
begin
panel2.Visible:=True;
label10.Caption:='0';
NError:=NError+1;
StringGrid2.Cells[NCol,NTerm2]:='0';
end
else
begin
panel1.Visible:=True;
label6.Caption:=StringGrid2.Cells[NCol,NTerm 2 ] ;
end;
end
else
if (sw0) then
193
begin
if (StringGrid2.Cells[NCol,NTerm2]='1') then
begin
panel1.Visible:=True;
label6.Caption:=StringGrid2.Cells[NCol,NTerm2];
end
else
begin
panel2.Visible:=True;
label10.Caption:='1';
NError:=NError+1;
StringGrid2.Cells[NCol,NTerm2]:='1';
end;
end;
end
else
if (Tipo='Nor') then
begin
c e r o s : = S t r i n g G r i d 2 . C o l C o u n t- 1 ;
num0:=0;
Term:=VTerm[NTerm+NTerm2-2 ] ;
for j:=1 to length(Term) do
if (Term[j]='0') then
num0:=num0+1;
if (num0=ceros) then
begin
if (StringGrid2.Cells[NCol,NTerm2]='0') then
begin
panel2.Visible:=True;
label10.Caption:='1';
NError:=NError+1;
StringGrid2.Cells[NCol,NTerm2]:='1';
end
else
begin
panel1.Visible:=True;
label6.Caption:=StringGrid2.Cells[NCol,NTerm2];
end;
end
else
begin
if (StringGrid2.Cells[NCol,NTerm2]='0') then
begin
panel1.Visible:=True;
label6.Caption:=StringGrid2.Cells[NCol,NTerm2];
end
else
begin
panel2.Visible:=True;
label10.Caption:='0';
NError:=NError+1;
194
StringGrid2.Cells[NCol,NTerm2]:='0';
end;
end;
end;
NTerm2:=NTerm2+1;
if (NTerm2=stringgrid2.RowCount) then
begin
BRegresar.Visible:=true;
B0.Visible:=false;
B1.Visible:=false;
end;
end;
end;
end;
begin
sw:=False;
i:=0;
while ((i<=NTerm) and (sw=False))do
b e gin
Comp:=CompareStr(VTerm[i],Acumula);
if (Comp=0) then
begin
panel3.Visible:=True;
label14.Caption:=Acumula;
NError:=NError+1;
NCol:=0;
sw:=True;
for j:=0 to StringGrid1.ColCount-1 d o
St ringGrid1.Cells[j,NTerm]:='';
acumula:='';
end
else
i:=i+1;
end;//while
if (sw=False) then
begin
VTerm[NTerm- 1]:=Acumula;
Acumula:='';
end;
end;// NTerm
end;//NCol
if (NCol=stringgrid1.ColC o u n t- 1) then
begin
NTerm:=NTerm+1;
NCol:=0;
end;
if (NTerm=stringgrid1.RowCount) then
if (Cantv<=4) then
begin
sw_t:=True;
NCol:=stringgrid1.ColCount-1 ;
NTerm:=1;
end
else
begin
NCol:=0;
N T e r m 2:=1;
end;
end
else
if (NTerm2<StringGrid2.RowCount) then
begin
StringGrid2.Cells[NCol,NTerm2]:='0';
if (NCol<stringgrid2.ColCount - 1 ) t h e n
Acumula:=Acumula+'0';
196
NCol:=NCol+1;
if (NCol=stringgrid2.ColCount - 1 ) t h e n
begin
sw:=False;
i:=0;
while ((i<=NTerm+NTerm2- 2 ) a n d ( s w = F a l s e ) ) d o
begin
Comp:=CompareStr(VTerm[i],Acumula);
if (Comp=0) then
begin
panel3.Visible:=True;
label14.Caption:=Acumula;
NError:=NError+1;
NCol:=0;
sw:=True;
for j:=0 to StringGrid2.ColCount-1 d o
StringGrid2.Cells[j,NTerm2]:='';
acumula:='';
end
else
i:=i+1;
end;//while
if (sw=False) then
begin
VTerm[NTerm+NTerm2- 2 ] : = A c um u l a ;
Acumula:='';
end;
end;
if (NCol=stringgrid2.ColCount - 1 ) t h e n
begin
NTerm2:=NTerm2+1;
NCol:=0;
if (NTerm2=stringgrid2.RowCount) then
begin
sw_t:=True;
NCol:=stringgrid2.ColCount- 1 ;
NTerm:=1;
NTerm2:=20;
end;
end;
end;
end
else
if (sw_t) then
begin
if (NTerm<StringGrid1.RowCount) then
begin
StringGrid1.Cells[NCol,NTerm]:='0';
if (Tipo='And') then
begin
Term:=VTerm[NTerm -1 ] ;
197
s w 0 : = F a lse;
for j:=1 to length(Term) do
if (Term[j]='0') then
sw0:=True;
if (sw0=False) then
begin
if (StringGrid1.Cells[NCol,NTerm]='1') then
begin
panel1.Visible:=True;
label6.Caption:=StringGrid1.C ells[NCol,NTerm];
end
else
begin
panel2.Visible:=True;
label10.Caption:='1';
NError:=NError+1;
StringGrid1.Cells[NCol,NTerm]:='1';
end;
end
else
if (sw0) then
begin
if (StringGrid1.Cells[NCol,NTerm]='1') then
begin
panel2.Visible:=True;
label10.Caption:='0';
NError:=NError+1;
StringGrid1.Cells[NCol,NTerm]:='0';
end
else
begin
panel1.Visible:=True;
label6.Caption:=StringGrid1.Cells[NCol,NTerm];
end;
end;
end
else
if (Tipo='Or') then
begin
ceros:=StringGrid1.ColCount- 1 ;
num0:=0;
Term:=VTerm[NTerm- 1];
f o r j : = 1 t o l e n g t h (Term) do
if (Term[j]='0') then
num0:=num0+1;
if (num0=ceros) then
begin
if (StringGrid1.Cells[NCol,NTerm]='0') then
begin
panel1.Visible:=True;
label6.Caption:=StringGrid1.Cells[NCol,NTerm];
198
end
else
begin
panel2.Visible:=True;
label10.Caption:='0';
NError:=NError+1;
StringGrid1.Cells[NCol,NTerm]:='0';
end;
end
else
begin
i f ( S t r i n g G r i d 1 . C e l l s [ N C o l ,NTerm]='0') then
begin
panel2.Visible:=True;
label10.Caption:='1';
NError:=NError+1;
StringGrid1.Cells[NCol,NTerm]:='1';
end
else
begin
panel1.Visible:=True;
label6.Caption:=StringGrid1.Cells[NCol,NTerm];
end;
end;
end
else
if (Tipo='Nand') then
begin
Term:=VTerm[NTerm- 1];
sw0:=False;
for j:=1 to length(Term) do
if (Term[j]='0') then
sw0:=True;
if (sw0=False) then
begin
if (StringGrid1.Cells[NCol,NTerm]='1') then
begin
panel2.Visible:=True;
label10.Caption:='0';
NError:=NError+1;
StringGrid1.Cells[NCol,NTerm]:='0';
end
else
begin
panel1.Visible:=True;
label6.Caption:=StringGrid1.Cells[NCol,NTerm];
end;
end
else
if (sw0) then
begin
199
if (StringGrid1.Cells[NCol,NTerm]='1') then
begin
panel1.Visible:=True;
label6.Caption:=StringGrid1.Cells[NCol,NTerm];
end
else
begin
panel2.Visible:=True;
label10.Caption:='1';
NError:=NError+1;
StringGrid1.Cells[NCol,NTerm]: = ' 1 ' ;
end;
end;
end
else
if (Tipo='Nor') then
begin
c e r o s : = S t r i n g G r i d 1 . C o l C o u n t- 1 ;
num0:=0;
Term:=VTerm[NTerm- 1];
for j:=1 to length(Term) do
if (Term[j]='0') then
num0:=num0+1;
if (num0=ceros) then
begin
if (StringGrid1.Cells[NCol,NTerm]='0') then
begin
panel2.Visible:=True;
label10.Caption:='1';
NError:=NError+1;
StringGrid1.Cells[NCol,NTerm ] : = ' 1 ' ;
end
else
begin
panel1.Visible:=True;
label6.Caption:=StringGrid1.Cells[NCol,NTerm];
end;
end
else
begin
if (StringGrid1.Cells[NCol,NTerm]='0') then
b egin
panel1.Visible:=True;
label6.Caption:=StringGrid1.Cells[NCol,NTerm];
end
else
begin
panel2.Visible:=True;
label10.Caption:='0';
NError:=NError+1;
S t r i n g G r i d 1 . C e l l s [NCol,NTerm]:='0';
200
end;
end;
end;
NTerm:=NTerm+1;
if (NTerm=stringgrid1.RowCount) then
if (cantv<=4) then
begin
BRegresar.Visible:=true;
B0.Visible:=false;
B1.Visible:=false;
end
else
NTerm2:=1;
end
else
if (NTerm2<StringGrid2.RowCount) then
begin
StringGrid2.Cells[NCol,NTerm2]:='0';
if (Tipo='And') then
begin
T e r m : = V T e r m [ N T e r m + N T e r m 2- 2];
sw0:=False;
for j:=1 to length(Term) do
if (Term[j]='0') then
sw0:=True;
if (sw0=False) then
begin
if (StringGrid2.Cells[NCol,NTerm2]='1') then
begin
panel1.Visible:=True;
label6.Caption:=StringGrid2.Cells[NCol,NTerm2];
end
else
begin
panel2.Visible:=True;
label10.Caption:='1';
NError:=NError+1;
StringGrid2.Cells[NCol,NTerm2]:='1';
end;
end
else
if (sw0) then
begin
if (StringGrid2.Cells[NCol,NTerm2]='1') then
begin
panel2.Visible:=True;
label10.Caption:='0';
NError:=NError+1;
StringGrid2.Cells[NCol,NTerm2]:='0';
end
else
201
b eg i n
panel1.Visible:=True;
label6.Caption:=StringGrid2.Cells[NCol,NTerm2];
end;
end;
end
else
if (Tipo='Or') then
begin
c e r o s : = S t r i n g G r i d 2 . C o l C o u n t- 1 ;
num0:=0;
Term:=VTerm[NTerm+NTerm2-2 ] ;
for j:=1 to length(Term) do
if (Term[j]='0') then
num0:=num0+1;
if (num0=ceros) then
begin
if (StringGrid2.Cells[NCol,NTerm2]='0') then
begin
panel1.Visible:=True;
label6.Caption:=StringGrid2.Cells[NCol,NTerm2];
end
else
begin
panel2.Visible:=True;
label10.Caption:='0';
NError:=NError+1;
StringGrid2.Cells[NCol,NTerm2]:='0';
end;
end
else
begin
if (StringGrid2.Cells[NCol,NTerm2]='0') then
begin
panel2.Visible:=True;
label10.Caption:='1';
NError:=NError+1;
StringGrid2.Cells[NCol,NTerm2]:='1';
end
else
begin
panel1.Visible:=True;
label6.Caption:=StringGrid2.Cells[NCol,NTerm2];
end;
end;
end
else
if (Tipo='Nand') then
begin
Term:=VTerm[NTerm+NTerm2- 2];
sw0:=False;
202
StringGrid2.Cells[NCol,NTerm2]:='1';
end
else
begin
panel1.Visible:=True;
label6.Caption:=StringGrid2.Cells[NCol,NTerm2];
end;
end
else
begin
if (StringGrid2.Cells[NCol,NTerm2]='0') then
begin
panel1.Visible:=True;
label6.Caption:=StringGrid2.Cells[NCol,NTerm2];
end
else
begin
panel2.Visible:=True;
label10.Caption:='0';
NError:=NError+1;
StringGrid2.Cells[NCol,NTerm2]:='0';
end;
end;
end;
NTerm2:=NTerm2+1;
if (NTerm2=stringgrid2.RowCount) then
begin
BRegresar.Visible:=true;
B0.Visible:=false;
B1.Visible:=false;
end;
end;
end;
end;
p r o c e d u re TFEvaluarOperac.BRegresarClick(Sender: TObject);
var
PorcE,Punt,Desc,Puntaje,PuntE:Real;
NumEjer:integer;
begin
204
panel1.Visible:=False;
panel2.Visible:=False;
if ((Tipo='And') or (Tipo='Or')) then
begin
NumEjer:=FTablasdeV.Ejercicios_Propuestos.Fields[7].AsInteger;
EjerSiNo[NumEjer]:='1';
Punt:=FTablasdeV.Ejercicios_Propuestos.Fields[5].AsFloat;
PorcE:=(NError*100)/TError;
FTablasdeV.Ejercicios_Propuestos.Close;
Leccion_TeoriaB.open;
Leccion_TeoriaB.DisableControls;
Leccion_TeoriaB.Se t K e y ;
Leccion_TeoriaB.FieldByName('Cod_Est').AsString:=Codigo1;
Leccion_TeoriaB.GotoKey;
if (Leccion_TeoriaB.GotoKey=True) then
begin
Leccion_TeoriaB.Edit;
if (PorcE<=60) then
begin
Punt:=((100 -((NError*100)/(2*TError)))*Punt)/100;
if (ResBas3=0) then
begin
Puntaje:=Punt;
Leccion_TeoriaB.Fields[2].AsFloat:=
Leccion_TeoriaB.Fields[2].AsFloat+Punt;
end
else
begin
D e s c : = P u n t- (Punt*0.05);
Puntaje:=Desc;
Leccion_TeoriaB.Fields[2].AsFloat:=
L ec c i o n _ T e o r i a B . F i e l d s [ 2 ] . A s F l o a t + D e s c ;
end;
Leccion_TeoriaB.Fields[5].AsString:=EjerSiNo;
Leccion_TeoriaB.Post;
Leccion_TeoriaB.EnableControls;
Leccion_TeoriaB.Close;
Estudiantes.Open;
Estudiantes.DisableControls;
Estudiantes .Setkey;
Estudiantes.FieldByName('Cod_Est').AsString:=Codigo1;
Estudiantes.GotoKey;
if (estudiantes.gotokey=true) then
begin
Estudiantes.Edit;
Estudiantes.fields[6].AsInteger:=Estudiantes.fields[6].AsInteger+1;
Estudiantes.fields[3].Asfloat:=Estudiantes.fields[3].Asfloat+Punt;
PunT:=((Estudiantes.fields[3].AsFloat)/20);
Estrellas:=Trunc(PunT);
Estudiantes.fields[5].AsInteger:=Estrellas;
Estudiantes.Post;
205
Estudiantes.EnableControls;
Estudiantes.Clos e ;
end;
FFelicit.Memo2.Text:=FormatFloat('0.00',Puntaje);
FFelicit.Show;
FEvaluarOperac.Hide;
end
else
begin
PuntE:=(Leccion_TeoriaB.Fields[2].AsFloat)*0.1;
Leccion_TeoriaB.Fields[2].AsFloat:=
Leccion_TeoriaB.Fields[2] .AsFloat- PuntE;
Leccion_TeoriaB.Fields[5].AsString:=EjerSiNo;
Leccion_TeoriaB.Post;
Leccion_TeoriaB.EnableControls;
Leccion_TeoriaB.Close;
Estudiantes.Open;
Estudiantes.DisableControls;
Estudiantes.Setkey;
Estudiantes.FieldByName('Cod_Est').AsString:=Codigo1;
Estudiantes.GotoKey;
if (estudiantes.gotokey=true) then
begin
Estudiantes.Edit;
Estudiantes.fields[6].AsInteger:=Estudiantes.fields[6].AsInteger- 1 ;
E s t u d i a n t e s . f i e l d s [ 3 ] . A s f l o a t : = E s t u d i a n t e s . f i e l d s [3].Asfloat -PuntE;
PunT:=((Estudiantes.fields[3].AsFloat)/20);
Estrellas:=Trunc(PunT);
Estudiantes.fields[5].AsInteger:=Estrellas;
Estudiantes.Post;
Estudiantes.EnableControls;
Estudiantes.Close;
end;
FEquivoc.Show;
FEvaluarOperac.Hide;
end;
end;
end
else
if ((Tipo='Nand') or (Tipo='Nor')) then
begin
NumEjer:=FAplicNand3.Ejercicios_Propuestos.Fields[7].AsInteger;
EjerSiNo[NumEjer]:='1';
Punt:=FAplicNand3.Ejercicios_Propuestos.Fields[5].AsFloat;
PorcE:=(NError*100)/TError;
FAplicNand3.Ejercicios_Propuestos.Close;
Leccion_Aplicaciones.open;
Leccion_Aplicaciones.DisableControls;
Leccion_Aplicaciones.SetKey;
Leccion_Aplicaciones.FieldByName('Cod_Est').AsString:=Codigo1;
Leccion_Aplicaciones.GotoK e y ;
206
if (Leccion_Aplicaciones.GotoKey=True) then
begin
Leccion_Aplicaciones.Edit;
if (PorcE<=60) then
begin
Punt:=((100 -((NError*100)/(2*TError)))*Punt)/100;
if (ResBas3=0) then
begin
Puntaje:=Punt;
Leccion_Aplicaciones.Fields[2].AsFloat:=
Leccion_Aplicaciones.Fields[2].AsFloat+Punt;
end
else
begin
D e s c : = P u n t- (Punt*0.05);
Puntaje:=Desc;
Leccion_Aplicaciones.Fields[2].AsFloat:=
Leccion_Aplicaciones.Fields[2].AsFloat+Desc;
end;
Lec cion_Aplicaciones.Fields[4].AsString:=EjerSiNo;
Leccion_Aplicaciones.Post;
Leccion_Aplicaciones.EnableControls;
Leccion_Aplicaciones.Close;
Estudiantes.Open;
Estudiantes.DisableControls;
Estudiantes.Setkey;
Estudiantes.FieldByName('Cod_Est').AsString:=Codigo1;
Estudiantes.GotoKey;
if (estudiantes.gotokey=true) then
begin
Estudiantes.Edit;
Estudiantes.fields[6].AsInteger:=Estudiantes.fields[6].AsInteger+1;
Estudiantes.fields[3].Asfloat:=Estudiantes.fields[3].Asfloat+Punt;
PunT:=((Estudiantes.fields[3].AsFloat)/20);
Estrellas:=Trunc(PunT);
Estudiantes.fields[5].AsInteger:=Estrellas;
Estudiantes.Post;
Estudiantes.EnableControls;
Estudiantes.Close;
end;
FFelicit.Memo2.Text:=F ormatFloat('0.00',Puntaje);
FFelicit.Show;
FEvaluarOperac.Hide;
end
else
begin
PuntE:=(Leccion_Aplicaciones.Fields[2].AsFloat)*0.1;
Leccion_Aplicaciones.Fields[2].AsFloat:=
Leccion_Aplicaciones.Fields[2].AsFloat-PuntE;
Leccion_Aplicaciones.Fields[4].AsString:=EjerSiNo;
Leccion_Aplicaciones.Post;
207
Leccion_Aplicaciones.EnableControls;
Leccion_Aplicaciones.Close;
Estudiantes.Open;
Estudiantes.DisableControls;
Estudiantes.Setkey;
Estudiantes.FieldByName('Cod_Est').AsString:=Codigo1;
Estudiantes.GotoKey;
if (estudiantes.gotokey=true) then
begin
Estudiantes.Edit;
Estudiantes.fields[6].AsInteger:=Estudiantes.fields[6].AsInteger- 1 ;
E s t u d i a n t e s . f i e l d s [ 3 ] . A s f l o a t : = E s t u d i a n t e s . f i e l d s [3].Asfloat -PuntE;
PunT:=((Estudiantes.fields[3].AsFloat)/20);
Estrellas:=Trunc(PunT);
Estudiantes.fields[5].AsInteger:=Estrellas;
Estudiantes.Post;
Estudiantes.EnableControls;
Estudiantes.Close;
end;
FEquivoc.Show;
FEvaluarOperac.Hide;
end;
end;
end;
end;
P R O C E D I M I E N T O P R O P U E S T O S _ T A B L A _ V E R D A D . Selecciona un
Leccion_TeoriaB.Open;
Leccion_TeoriaB.SetKey;
Leccion_TeoriaB.FieldByName('Cod_Est').AsString:=Codigo1;
Leccion_TeoriaB.GotoKey;
Leccion_TeoriaB.Edit;
EjerSiNo:=Leccion_TeoriaB.Fields[5].AsString;
L e c c ion_TeoriaB.Close;
Ejercicios_Propuestos.Open;
Ejercicios_Propuestos.DisableControls;
sw:=False;
Ejercicios_Propuestos.First;
while ((not(Ejercicios_Propuestos.EOF)) and (sw=False)) do
begin
Ejercicios_Propuestos.Edit;
i f (Ejercicios_Propuestos.Fields[0].AsString='Tablas de Verdad')and
(Ejercicios_Propuestos.Fields[2].Asinteger=niv) then
if (EjerSiNo[Ejercicios_Propuestos.Fields[7].AsInteger]='0') then
sw:=True;
if sw=false then
Ejercicios_Propuestos.Next;
end;
if (sw) then
begin
PropBas2:=PropBas2+1;
Ecuac:=Ejercicios_Propuestos.Fields[1].asstring;
FEvaluarTabladeV.Memo1.Text:='X= '+Ecuac;
FEvaluarTabladeV.Show;
FTablasdeV.Hide;
end
else
showmessage('No hay más ejercicios sobre este tema en este nivel.');
end;
PROCEDIMIENTO R E S U E L T O S _ T A B L A _ V E R D A D . Selecciona un
Verdad.
Estudiantes.GotoKey;
if (Estudiantes.GotoKey=True) then
begin
Estudiantes.Edit;
niv:=Estudiantes.Fields[6].AsInteger;
end;
Estudiantes.Close;
Leccion_TeoriaB.Open;
Leccion_TeoriaB.SetKey;
Leccion_TeoriaB.Field ByName('Cod_Est').AsString:=Codigo1;
Leccion_TeoriaB.GotoKey;
Leccion_TeoriaB.Edit;
Leccion_TeoriaB.Close;
Ejercicios_Resueltos.Open;
Ejercicios_Resueltos.DisableControls;
sw:=False;
Ejercicios_Resueltos.First;
while ((not(Ejercicios_Resueltos.EOF)) a n d ( s w = F a l s e ) ) d o
begin
Ejercicios_Resueltos.Edit;
if (Ejercicios_Resueltos.Fields[0].AsString='Tablas de
Verdad')and(Ejercicios_Resueltos.Fields[1].Asinteger=niv) then
begin
if (Ejercicios_Resueltos.Fields[2].Asinteger=Num_Res) then
begin
sw:=True;
Num_Res:=Num_Res+1;
end
else
Ejercicios_Resueltos.Next;
end
else
if (sw=false) then
Ejercicios_Resueltos.Next;
end;
if (sw) then
begin
Ecuac:=Ejercicios_Resueltos.Fields[3].asstring;
FEjerTVRes.Mem o 1 . T e x t : = ' X =
'+Ejercicios_Resueltos.Fields[3].asString;
FEjerTVRes.Show;
FTablasdeV.Hide;
end
else
showmessage('No hay más ejercicios sobre este tema en este nivel.');
end;
210
e x p r e s i ó n q u e r e s u l t a de l a t a b l a d e v e r d a d q u e l l e n a e l u s u a r i o e n
begin
Cerrar1.Enabled:=True;
BRegresar.Visible:=True;
B0.Visible:=False;
B1.Visible:=False;
label1.Visible:=False;
label2.Visible:=False;
label3.Visible:=False;
l a b e l 4 . V i s i b l e : = F a l s e;
label5.Visible:=False;
label6.Visible:=True;
label7.Visible:=True;
label8.Visible:=True;
panel1.Visible:=True;
EcuacTab(Ecuac);
label9.Visible:=True;
label10.Visible:=True;
label10.Caption:='X= '+Ecuac;
end;
end;
end;
sw:=True;
StringGrid1.Cells[0,NTerm]:='';
StringGrid1.Cells[1,NTerm]:='';
StringGrid1.Cells[2,NTerm]:='';
acumula:='';
end
else
i:=i+1;
end;
if (sw=False) then
begin
VTerm[NTerm -1 ] : = A c u m u l a ;
Acumula:='';
end;
end;
end;
if (NCol=4) then
begin
NTerm:=NTerm+1;
NCol:=0;
end;
if (NTerm=9) then
begin
Cerrar1.Enabled:=True;
BRegresar.Visible:=True;
B0.Visible:=False;
B1.Visible:=False;
label1.Visible:=False;
label2.Visible:=False;
label3.Visible:=False;
label4.Visible:=False;
label5.Visible:=False;
label6.Visible:=True;
label7.Visible:=True;
label8.Visible:=True;
panel1.Visible:=True;
EcuacTab(Ecuac);
label9.Visible:=True;
label10.Visible:=True;
label10.Caption:='X= '+Ecuac;
end;
end;
end;
P R O C E D I M I E N T O P R O P U E S T O S _ E C U A C I Ó N _ M A X . Selecciona un
características de éste.
for i:=1 to 32 do
VEcuac[i]:='X';
Ecuacion:=Ejercicios_Propuestos.Fields[1].asstring;
NumV:=Ejercicios_Propuestos.Fields[6].asInteger;
NumTer:=Length(Ecuacion);
for i:=1 to NumTer do
VEcuac[i]:=Ecuacion[i];
FEvaluarEc.Show;
FFormEcMax.Hide;
end
else
showmessage('No hay más ejercicios sobre este tema en este nivel.');
end;
PROCEDIMIENTO R E S U E L T O S _ E C U A C I O N M A X . Selecciona un
if (Edit1.Text<>'') then
begin
if (( Numero<1) or ( Numero>8)) then
begin
showmessage('El número de filas se encuentra entre uno (1) y ocho
(8)');
edit1.Clear;
end
else
begin
sw0:=False;
for i:=0 to 3 do
i f ( E d i t 1 . T ext=VecST[i])then
sw0:=True;
if (sw0) then
begin
showmessage('Ese número de fila ya lo digitaste. Prueba con otro
por favor');
Edit1.Clear;
end
else
begin
NT:=StrToInt(Edit1.Text);
if (StringGrid1.Cells[3,NT]='1' ) t h e n
begin
showmessage('Para obtener una función maxterms solo se tienen en
cuenta las variables de entrada que hacen cero (0) la función');
Edit1.Clear;
end
else
begin
VecST[Num1- 1]:=Edit1.Text;
Num1:=Num1+1;
NumV:=0;
Ecuac:='';
label3.Visible:=True;
label4.Visible:=True;
label8.visible:=true;
label10.Visible:=True;
label7.Visible:=True;
BA.visible:=True;
BA1.visible:=True;
BB.visible:=True;
B B 1.visible:=True;
BC.visible:=True;
BC1.visible:=True;
BA.enabled:=true;
BA1.enabled:=true;
Bb.enabled:=true;
Bb1.enabled:=true;
Bc.enabled:=true;
218
Bc1.enabled:=true;
Label1.Visible:=False;
Label9.Vi sible:=False;
Label5.Visible:=False;
Label6.Visible:=False;
label7.caption:=Edit1.Text;
Edit1.Clear;
Edit1.Visible:=False;
BAceptar.visible:=False;
label2.Visible:=true;
end;
end;//else
end;//else
end
else
showmessage('Por favor digite el número de la fila que hace cero (0)
la función');
end;
end;
end;
i f ( N u m V= 3 ) t h e n
begin
Ecuac:=Ecuac+')';
Func:=Func+Ecuac;
end;
BA.Enabled:=False;
BA1.Enabled:=False;
if ((Num1<5) and (NumV=3)) then
begin
Label5.Visible:=True;
Label6.Visible:=True;
Edit1.Visible:=True;
BAceptar.Visible:=True;
BAceptar.Enabled:=True;
end;
label2.Caption:=func;
end
else
Showmessage('Debes digitar - A');
end;
end;
P R O C E D I M I E N T O F O R M A R _- A. C u a n d o e l u s u a r i o e s t á f o r m a n d o
Label11.Visible:=True;
Cerrar1.Enabled:=True;
B R e g r e s a r . V i s i b le:=True;
end;
if (NumV=3) then ///# de terminos
begin
Ecuac:=Ecuac+')';
Func:=Func+Ecuac;
end;
BA.Enabled:=False;
BA1.Enabled:=False;
if ((Num1<5) and (NumV=3)) then
begin
Label5.Visible:=True;
Label6.Visible : = T r u e ;
Edit1.Visible:=True;
BAceptar.Visible:=True;
BAceptar.Enabled:=True;
end;
label2.Caption:=func;
end
else
Showmessage('Debes digitar A');
end;
end;
if ((Num1=5)and(NumV=3)) then
begin
Label4.Visible:=False;
L a b e l 1 1 . V i s i b l e : = T r u e;
Cerrar1.Enabled:=True;
BRegresar.Visible:=True;
end;
if (NumV=3) then ///# de terminos
begin
Ecuac:=Ecuac+')';
Func:=Func+Ecuac;
end;
BB.Enabled:=False;
BB1.Enabled:=False;
if ((Num1<5) and (NumV=3)) then
b eg i n
Label5.Visible:=True;
Label6.Visible:=True;
Edit1.Visible:=True;
BAceptar.Visible:=True;
BAceptar.Enabled:=True;
end;
label2.Caption:=Func;
end
else
Showmessage('Debes digitar - B');
end;
end;
P R O C E D I M I E N T O F O R M A R _- B . C u a n d o e l u s u a r i o e s t á f o r m a n d o
Ecuac:=Ecuac+'+'+BB1.Caption;
label2.Caption:=Func+Ecuac;
NumV:=NumV+1;
if ((Num1=5)and(NumV=3)) then
begin
Label4.Visible:=False;
Label11.Visible:=True;
Cerrar1.Enabled:=True;
BRegresar.Visible:=True;
end;
if (NumV=3) then ///# de terminos
begin
Ecuac:=Ecuac+')';
Func:=Func+Ecuac;
end;
BB.Enabled:=False;
BB1.En a b l e d : = F a l s e ;
if ((Num1<5) and (NumV=3)) then
begin
Label5.Visible:=True;
Label6.Visible:=True;
Edit1.Visible:=True;
BAceptar.Visible:=True;
BAceptar.Enabled:=True;
end;
label2.Caption:=Func;
end
else
Showmessage('Deb e s d i g i t a r B ' ) ;
end;
end;
if (Ecuac='') then
Ecuac:='('+BC.Caption
else
Ecuac:=Ecuac+'+'+BC.Caption;
label2.Caption:=Func+Ecuac;
NumV:= NumV+1;
if ((Num1=5)and(NumV=3)) then
begin
Label4.Visible:=False;
Label11.Visible:=True;
Cerrar1.Enabled:=True;
BRegresar.Visible:=True;
end;
if (NumV=3) then ///# de terminos
begin
Ecuac:=Ecuac+')';
F u n c : = F u nc+Ecuac;
end;
BC.Enabled:=False;
BC1.Enabled:=False;
if ((Num1<5) and (NumV=3)) then
begin
Label5.Visible:=True;
Label6.Visible:=True;
Edit1.Visible:=True;
BAceptar.Visible:=True;
BAceptar.Enabled:=True;
end;
label2. C a p t i o n : = F u n c ;
end
else
Showmessage('Debes digitar -C ' ) ;
end;
end;
P R O C E D I M I E N T O F O R M A R _- C . C u a n d o e l u s u a r i o e s t á f o r m a n d o
begin
if (Cells[2,NT]='1') then
begin
if (Ecuac='') then
Ecuac:='('+BC1.Caption
else
Ecuac:=Ecuac+'+'+ B C 1 . C a p t i o n ;
label2.Caption:=Func+Ecuac;
NumV:=NumV+1;
if ((Num1=5)and(NumV=3)) then
begin
Label4.Visible:=False;
Label11.Visible:=True;
Cerrar1.Enabled:=True;
BRegresar.Visible:=True;
end;
if (NumV=3) then
begin
Ecuac:=Ecuac+')';
Func:=Func+Ecuac;
end;
BC.Enabled:=False;
BC1.Enabled:=False;
if ((Num1<5) and (NumV=3)) then
begin
Label5.Visible:=True;
Label6.Visible:=True;
Edit1.Visible:=True;
BAceptar.Visible:=True;
B A c e p t a r . E na b l e d : = T r u e ;
end;
label2.Caption:=Func;
end
else
Showmessage('Debes digitar C');
end;
end;
i,Numero:integer;
sw0:boolean;
begin
if (Num1<5) then
begin
if (Edit1.Text<>'') then
begin
Numero:=StrToInt(Edit1.Text);
if ((Numero<1) or (Numero> 8 ) ) t h e n
begin
showmessage('El número de filas se encuentra entre uno (1) y ocho
(8)');
edit1.Clear;
end
else
begin
sw0:=False;
for i:=0 to 3 do
if (Edit1.Text=VecST[i])then
sw0:=True;
if (sw0) then
begin
showmessage('Ese número de fila ya lo digitaste. Prueba con otro
por favor');
Edit1.Clear;
end
else
begin
NT:=StrToInt(Edit1.Text);
if (StringGrid1.Cells[3,NT]='0') then
begin
showmessage('Para obtener una función min t e r m s s o l o s e t i e n e n e n
cuenta las variables de entrada que hacen uno (1) la función');
Edit1.Clear;
end
else
begin
VecST[Num1- 1]:=Edit1.Text;
Num1:=Num1+1;
NumV:=0;
Ecuac:='';
label3.Visible:=True;
label4.Visible:=True;
label8.visible:=true;
label7.Visible:=True;
label10.Visible:=True;
BA.visible:=True;
BA1.visible:=True;
BB.visible:=True;
BB1.visible:=True;
BC.visible:=True;
226
BC1.visible:=True;
BA.enabled:=true;
BA1.enabled:=true;
Bb.enabled:=true;
Bb1.enabled:=true;
Bc.enabled:=true;
Bc1.enabled:=true;
Label5.Visible:=False;
Label6.Visible:=False;
label7.caption:=Edit1.Text;
Edit1.Clear;
Edit1.Visible:=False;
BAceptar.visible:=False;
label2.Visible:=true;
end;
end;//else
end;//else
end
else
showmessage('Por favor digite el número de la fila que hace cero (0)
la función');
end;
end;
BRegresar.Visible:=True;
end;
if (NumV=3) then
begin
if (Num1<=4) then
begin
Ecuac:=Ecuac+'+';
Func:=Func+Ecuac;
label3.visible:=false;
label10.visible:=false;
label7.visible:=false;
BA.VISIBLE:=false;
Bb.VISIBLE:=false;
Bc.VISIBLE:=false;
Ba1.VISIBLE:=false;
Bb1.VISIBLE:=false;
Bc1.VISIBLE:=false;
end
else
Func:=Func+Ecuac;
label2.caption:=func;
end;
BA.Enabled:=False;
BA1.Enabled:=Fa l s e ;
if ((Num1<5) and (NumV=3)) then
begin
Label5.Visible:=True;
Label6.Visible:=True;
Edit1.Visible:=True;
BAceptar.visible:=True;
end;
end
else
Showmessage('Debes digitar - A');
end;
end;
begin
with StringGrid1 do
begin
if (Cells[0,NT]='0') then
begin
ecuac:=ecuac+BA1.Caption;
label2.caption:=func+ecuac;
NumV:=NumV+1;
if ((Num1=5)and(NumV=3)) then
begin
Label4.Visible:=False;
Label11.Visible:=True;
Cerrar1.En abled:=True;
BRegresar.Visible:=True;
end;
if (NumV=3) then
begin
if (Num1<=4) then
begin
Ecuac:=Ecuac+'+';
Func:=Func+Ecuac;
label3.visible:=false;
label10.visible:=false;
label7.visible:=false;
BA.VISIBLE:=false;
Bb.VISIBLE:=false;
Bc.VISIBLE:=false;
Ba1.VISIBLE:=false;
Bb1.VISIBLE:=false;
Bc1.VISIBLE:=false;
end
else
Func:=Func+Ecuac;
label2.caption:=func;
end;
BA.Enabled:=False;
BA1.Enabled:=False;
i f ((Num1<5) and (NumV=3)) then
begin
Label5.Visible:=True;
Label6.Visible:=True;
Edit1.Visible:=True;
BAceptar.visible:=True;
end;
end
else
Showmessage('Debes digitar A');
end;
end;
229
P R O C E D I M I E N T O F O R M A R _ B . C u a n d o e l u s u a r i o está formando la
Label5.Visible:=True;
Label6.Visible:=True;
Edit1.Visible:=True;
BAceptar.visible:=True;
end;
end
else
Showmessage('Debes digitar - B');
end;
end;
P R O C E D I M I E N T O F O R M A R _- B . C u a n d o e l u s u a r i o e s t á f o r m a n d o
Ba1.VISIBLE:=false;
Bb1.VISIBLE:=false;
Bc1.VISIBLE:=false;
end
else
Func:=Func+Ecuac;
label2.caption:=func;
end;
Bb.Enabled:=False;
Bb1.Enabled:=False;
if ((Num1<5) and (NumV=3)) the n
begin
Label5.Visible:=True;
Label6.Visible:=True;
Edit1.Visible:=True;
BAceptar.visible:=True;
end;
end
else
Showmessage('Debes digitar B');
end;
end;
end;
if (NumV=3) then
begin
if (Num1<=4) then
begin
Ecuac:=Ecuac+'+';
Func:=Func+Ecuac;
label3.visible:=false;
label10.visible:=false;
label7.visible:=false;
BA.VISIBLE:=false;
Bb.VISIBLE:=false;
B c . VI S I B L E : = f a l s e ;
Ba1.VISIBLE:=false;
Bb1.VISIBLE:=false;
Bc1.VISIBLE:=false;
end
else
Func:=Func+Ecuac;
label2.caption:=func;
end;
Bc.Enabled:=False;
Bc1.Enabled:=False;
if ((Num1<5) and (NumV=3)) then
begin
Label5.Visible:=True;
Label6.Visible:=True;
Edit1.Visible:=True;
BAceptar.visible:=True;
end;
end
else
Showmessage('Debes digitar -C ' ) ;
end;
end;
P R O C E D I M I E N T O F O R M A R _- C . C u a n d o e l u s u a r i o e s t á f o r m a n d o
with StringGrid1 do
begin
i f ( C e l l s [ 2 , N T ] = ' 0') then
begin
ecuac:=ecuac+Bc1.Caption;
label2.caption:=func+ecuac;
NumV:=NumV+1;
if ((Num1=5)and(NumV=3)) then
begin
Label4.Visible:=False;
Label11.Visible:=True;
Cerrar1.Enabled:=True;
BRegresar.Visible:=True;
end;
if (NumV=3) then
begin
if (Num1<=4) then
begin
Ecuac:=Ecuac+'+';
Func:=Func+Ecuac;
label3.visible:=false;
label10.visible:=false;
label7.visible:=false;
BA.VISIBLE:=false;
Bb.VISIBLE:=false;
Bc.VISIBLE:=fa l s e ;
Ba1.VISIBLE:=false;
Bb1.VISIBLE:=false;
Bc1.VISIBLE:=false;
end
else
Func:=Func+Ecuac;
label2.caption:=func;
end;
Bc.Enabled:=False;
Bc1.Enabled:=False;
if ((Num1<5) and (NumV=3)) then
begin
Label5.Vis i b l e : = T r u e ;
Label6.Visible:=True;
Edit1.Visible:=True;
BAceptar.visible:=True;
end;
end
else
Showmessage('Debes digitar C');
end;
end;
234
P R O C E D I M I E N T O P R O P U E S T O S _ E C U A C I Ó N _ M I N . Selecciona un
características de éste.
VEcuac[i]:='X';
Ecuacion:=Ejercicios_Propuestos.Fields[1].asstring;
NumV:=Ejercicios_Propuestos.Fields[6].asInteger;
NumTer:=Length(Ecuacion);
for i:=1 to NumTer do
VEcuac[i]:=Ecuacion[i];
FEvaluarEc.Show;
FFormEcMin.Hide;
end
else
showmessage('No hay más ejercicios sobre este tema en este nivel.');
end;
PROCEDIMIENTO R E S U E L T O S _ E C U A C I O N M I N . Selecciona un
Leccion_McCluskey.Fields[1].AsInteger:=Leccion_McCluskey.Fields[1].A
sInteger+1;
Leccion_McCluskey.Post;
Leccion_McCluskey.EnableControls;
Leccion_McCluskey.Close;
end
else
begin
Leccion_McCluskey.DisableControls;
Leccion_McCluskey.Last;
Leccion_McCluskey.Insert;
Leccion_McCluskey.Edit;
Leccion_McCluskey.Fields[0].AsString:=Codigo1;
Leccion_McCluskey.Fields[1].AsInteger:=1;
Leccion_McCluskey.Fields[2].AsFloat:=0;
Leccion_McCluskey.Fields[3].AsInteger:=0;
Leccion_McCluskey.Fields[4].AsString:='00000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000';
Leccion_McCluskey.Fields[5].AsString:='00000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000';
238
Leccion_McCluskey.Fields[6].AsString:='00000000000000000000000000
00000000000000000000000000000000 0000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000';
Leccion_McCluskey.post;
Leccion_McCluskey.EnableC o n t r o l s ;
Leccion_McCluskey.Close;
end;
form9.show;
end;
e n c u e nt r e é l .
begin
Ejercicios_Propuestos.Edit;
if (Ejercicios_Propuestos.Fields[0].AsString='Expresiones
Minterms')and (Ejercicios_Propuestos.Fields[2].Asinteger=niv) then
if (EjerSiNo[Ejercicios_Propuestos.Fields[7].AsInteger]='0') then
sw:=True;
if sw=false then
Ejercicios_Propuestos.Next;
end;
if (sw) then
begin
FEvaluarMinterms.MEnunciado.Text:=Ejercicios_Propuestos.Fields[1].as
string;
form10.hide;
FEvaluarMinterms.Show;
end
else
showmessage('No existen más ejercicios de este nivel');
end;
correspondiente.
booleana.
while(sw=0)do{mq 1}
begin
i:=1;
j:=1;
sw:=1;
long:=length(guarda);
w h i l e ( j < = l o n g- 1 ) d o { m q 2 }
begin
sw1:=0;
sw2:=0;
if(guarda[i]='- ')then
begin
i:=i+1;
sw1:=1;
end;
if(guarda[i+1]='- ')then
begin
j:=i+2;
sw2:=1;
end
else
j:=i+1;
l:=comparestr(guarda[i],guarda[j]);
if (l>0)then
begin
sw:=0;
if ((sw1=0) a n d ( s w 2 = 0 ) ) o r ( ( s w 1 = 1 ) a n d ( s w 2 = 1 ) ) t h e n
begin
aux:=guarda[i];
guarda[i]:=guarda[j];
guarda[j]:=aux;
end
else
if (sw1=1) and (sw2=0) then
241
begin
guarda[i- 1]:=guarda[j];
aux:=guarda[i];
guarda[i]:=' -' ;
guarda[j]:=aux;
end
else
if (sw1=0) and (sw2=1) then
begin
aux:=guarda[i];
guarda[i]:=' -' ;
guarda[j- 1]:=guarda[j];
guarda[j]:=aux;
end;
end;
if ((sw=0)and(sw1=0)and(sw2=1)) or ((sw=0)and(sw1=0)and(sw2=0))
or((sw=1)and(sw1=0)and(sw2=0)) or ((sw=1)and(sw1=1)and(sw2=0))
then
i:=j
else
i : = j- 1;
end;
end;
end;
sw:=False;
while (k<CuentaTerm) and (sw=False) do
begin
comp:=CompareStr(stringGrid1.cells[0,k],Termagrup);
if (comp=0) then
sw:=True;
k:=k+1;
end;
if (sw) then
begin
showmessage('Término ya existe');
stringGrid1.Cells[0,CuentaTerm]:='';
cuentavar1:=0;
if (form13.BD.Enabled=False)then
begin
BD.Enabled:=True;
BD1.Enabled:=True;
end;
if ((form13.BB1.Enabled=False) or (form13.BB2.Enabled=False) or
(form13.BB3.Enabled=False))then
begin
BB.Enabled:=True;
BB1.Enabled:=True;
end;
if ((form13.BC1.Enabled=False) or (form13.BC2.Enabled=False) or
(form13.BC3.Enabled=False))then
begin
BC.Enabled:=True;
BC1.Enabled:=True;
end;
if ((form13.BE1.Enabled=False) or (form13.BE2.Enabled=False) or
(form13.BE3.Enabled=False))then
begin
BE.Enabled:=True;
BE1.Enabled:=True;
end;
if ((form13.BA1.Enabled=False) or (form13.BA2.Enabled=False)) then
begin
BA.Enabled:=True;
BA1.Enabled:=True;
end;
if ((form13.BF1.Enabled=False) or (form13.BF2.Enabled=False)) then
begin
BF.Enabled:=True;
BF1.Enabled:=True;
end;
end
else
begin
stringGrid1.Cells[0,cuentaterm]:=termagrup;
cuentavar1:=0;
243
CuentaTerm:=CuentaTerm+1;
if (CuentaTerm=NumTerminos) then
begin
label3.visible:=Fals e ;
label4.visible:=False;
edit1.visible:=False;
Aceptar4.visible:=False;
memo2.visible:=True;
stringGrid1.colcount:=2;
cuentavar1:=0;
cuentaterm:=0;
end
else
begin
if (form13.BD.Enabled=False)then
begin
BD.E nabled:=True;
BD1.Enabled:=True;
end;
if ((form13.BB1.Enabled=False) or (form13.BB2.Enabled=False) or
(form13.BB3.Enabled=False))then
begin
BB.Enabled:=True;
BB1.Enabled:=True;
end;
if ((form13.BC1.Enabled=False) or (form13.BC2.Enabled=False) or
(form13.BC3.Enabled=False))then
begin
BC.Enabled:=True;
BC1.Enabled:=True;
end;
if ((form13.BE1.Enabled=False) or (form13.BE2.Enabled=False) or
(form13.BE3.Enabled=False))then
begin
BE.Enabled:=True;
B E 1 . E n a bl e d : = T r u e ;
end;
end;
end;
end;
end;
if (stringGrid1.colcount=2)then
begin //5
label3.visible:=false;
label4.visible:=false;
label1.visible:=false;
label2.visible:=false;
strinGgrid1.width:=192;
B 0 . e n a b l e d : = t r u e;
B1.enabled:=true;
BA.visible:=false;
BA1.visible:=false;
BB.visible:=false;
BB1.visible:=false;
BC.visible:=false;
BC1.visible:=false;
BD.visible:=false;
BD1.visible:=false;
BE.visible:=false;
B E 1 . v i s i b l e : = f a lse;
BF.visible:=false;
BF1.visible:=false;
B0.visible:=true;
B1.visible:=true;
term2:=' ';
if (cuentaterm>0)then
begin//6
term0:=stringGrid1.cells[0,cuentaterm- 1];
i:=1;
longitud:=length(term0);
term1:='' ;
While(i<=longitud)do
begin
if (term0[i]=' -') then
begin
term1:=term1+'0';
i:=i+2;
end
else
if (term0[i]='A')or
(term0[i]='B')or(term0[i]='C')or(term0[i]='D')or(term0[i]='E')OR
(term0[i]='F')then
begin
term1:=term1+'1';
i:=i+1;
end
ELSE
245
I:=I+1;
end;
term2:=stringGrid1.cells[1,cuentaterm- 1];
if (term1<>term2)then
begin
panel1.visible:=true;
label14.caption:=term1;
l a b e l 1 9 .caption:=term2;
stringGrid1.cells[1,cuentaterm- 1]:=term1;
end;
end;
if (CuentaTerm=NumTerminos) then
begin
stringGrid1.colcount:=3;
stringGrid1.Width:=288;
cuentavar1:=0;
cuentaterm:=0;
memo2.visible:=false;
B0.Enabled:=false;
B1.Enabled:=false;
memo2.visible:=false;
memo1.visible:=true;
memo3.visible:=true;
edit2.visible:=true;
edit2.Focused;
edit2.enabled:=true;
aceptar2.visible:=true;
aceptar.visible:=false;
b1.visible:=false;
b0.visible:=false;
ba.visible:=false;
bb.visible:=false;
bc.visible:=false;
bd.visible:=false;
be.visible:=false;
bf.visible:=false;
ba1.visible:=false;
bb1.visible:=false;
b c 1 . v i s i b l e:=false;
bd1.visible:=false;
be1.visible:=false;
bf1.visible:=false;
cuentaterm:=0;
panel1.visible:=false;
ejemplo.visible:=true;
end
else
begin
cuentavar1:=0;
cuentaterm:=cuentaterm+1;
end;
246
end;
end;
end;
if (sw=true)then
showmessage('Digite solo números')
else
begin
i f ( s t r t o i n t ( n u m ) < 6 ) o r ( s t r t o i n t ( n u m ) > =0 ) t h e n
begin
bina:=stringGrid1.cells[1,cuentaterm];
long:=length(bina);
i:=1;
cuenta:=0;
while(i<=long)do
begin
if (bina[i]='1') then
cuenta:=cuenta+1;
i:=i+1;
end;
if (inttostr(cuenta)<>edit1.Text)then
begin
panel3.Visible:=True;
label56.Caption:=inttostr(cuenta);
label58.Caption:=edit1.Text+'.';
label56.Visible:=True;
label58.Visible:=True;
end;
edit1.clear;
247
stringGrid1.Cells[3,cuentaterm]:='indice '+inttostr(cuenta);
cuentaterm:=cuentaterm+1;
end
else
showmessage('El número mínimo de unos es 0, y el máximo es 6');
end;
end;
if (cuentaterm=numterminos)then
begin
label8.visible:=true;
Me m o 1 . v i s i b l e : = t r u e ;
BotonOk.visible:=true;
Memo2.visible:=false;
edit1.visible:=false;
speedbutton1.visible:=false;
with stringGrid1 do
f o r j : = 0 t o c o l c o u n t - 1 do
for k:=0 to rowcount- 1 d o
mat[j,k]:=cells[j,k];
ordenmat(mat);
with stringGrid1 do
f o r j : = 0 t o c o l c o u n t - 1 do
for k:=0 to rowcount- 1 d o
cells[j,k]:=mat[j,k+1];
end;
end;
if ((form13.BB1.Enabled=False) or (form13.BB2.Enabled=False) or
(form13.BB3.Enabled=False))then
begin
form12.BB.Visible:=True;
form12.BB1.Visible:=True;
form12.BB.Enabled:=True;
form12.BB1.Enabled:=True;
end
els e
if ((form13.BB1.Enabled=True) or (form13.BB2.Enabled=True) or
(form13.BB3.Enabled=True))then
begin
form12.BB.Enabled:=False;
form12.BB1.Enabled:=False;
end;
if ((form13.BC1.Enabled=False) or (form13.BC2.Enabled=False) or
(form13.BC3. Enabled=False))then
begin
form12.BC.Visible:=True;
249
form12.BC1.Visible:=True;
form12.BC.Enabled:=True;
form12.BC1.Enabled:=True;
end
else
if ((form13.BC1.Enabled=True) or (form13.BC2.Enabled=True) or
(form13.BC3.Enabled=True))the n
begin
form12.BC.Enabled:=False;
form12.BC1.Enabled:=False;
end;
if ((form13.BE1.Enabled=False) or (form13.BE2.Enabled=False) or
(form13.BE3.Enabled=False))then
begin
form12.BE.Visible:=True;
form12.BE1.Visible:=True;
form12.BE.Enabled:=True;
form12.BE1.Enabled:=True;
end
else
if ((form13.BE1.Enabled=True) or (form13.BE2.Enabled=True) or
(form13.BE3.Enabled=True))then
begin
form12.BE.Enabled:=False;
form12.BE1.Enabled:=False;
end;
begin
form12.BF.Enabled:=False;
form12.BF1.Enabled:=False;
end;
Form12.label1.Visible:=False;
Form12.label2.Visible:=False;
Form12.edit1.visible:=false;
Form12.edit1.Enabled:=false;
Form12.Aceptar4.Visible:=false;
form12.aceptar.visible:=true;
form12.aceptar.enabled:=true;
Form12.label3.Visible:=True;
Form12.label4.Visible:=True;
Form12.StringGrid1.Visible: = T r u e ;
end;
ordenterm(TermGral);
end;
número tres.
mat1[3,i]:=mat1[3,i+1];
mat1[0,i+1]:=aux1;
mat1[1,i+1]:=aux2;
mat1[2,i+1]:=aux3;
mat1[3,i+1]:=aux4;
sw:=0;
end;
e nd;
end;
end;
McCluskey.
Ejercicios_Resueltos.Next;
end;
if (sw) then
begin
Funcion:=Ejercicios_Resueltos.Fields[3].asstring;
FEjerMCRes.Memo4.Lines.Text:='X='+Funcion;
VEjerR[Ejercicios_Resueltos . F i e l d s [ 2 ] . A s I n t e g e r ] : = ' 1 ' ;
NumT:=0;
ContarTerm(Funcion,NumT);
FEjerMCRes.StringGrid1.Height:=19*(NumT+1);
with FEjerMCRes.StringGrid1 do
begin
RowCount:=NumT;
for i:=0 to 3 do
for j:=0 to NumT- 1 do
Cells[i,j]:='';
end;
w i t h FEjerMCRes.StringGrid1 do
f o r i : = 0 t o N u m T -1 d o
Vec[i]:='';
FuncVec(Funcion,Vec);
with FEjerMCRes.StringGrid1 do
begin
Height:=NumT*19;
RowCount:=NumT;
for i:=0 to NumT- 1 do
Cells[0,i]:=Vec[i];
end;
col:=1;
F E j e r MCRes.PageControl1.ActivePage:=FEjerMCRes.PTablaAgr;
FEjerMCRes.Image1.Visible:=True;
FEjerMCRes.Show;
form14.Hide;
end
else
showmessage('No hay más ejercicios sobre este tema en este nivel.');
end;
de unos y ceros.
cad,num1:string;
begin
num:=strtoint(dec);
dec:='';
repeat
bin:=num mod 2;
dec:=dec+inttostr(bin);
num:=num div 2;
until(num<2);
num1:=IntToStr(num);
dec:=dec+num1;
long:=length(dec);
cad:='';
for i:=long downto 1 do
cad:=cad+dec[i];
if (longceld>long) then
for i:=1 to (longceld- long) do
cad:='0'+cad;
dec:=cad;
end;
asigna (-).
de Quine McCluskey.
procedure agrupamiento(StringGrid1:
TStringGrid;mat1:agrupa;col1:integer;col2:integer;col3:integer;var mat2:
agrupa;var cont:integer);
var
i , j , l o n g , c , c 1 : i n te g e r ;
indice,indice2,cadena:string;
sw,sw1:boolean;
begin
j:=0;
while(j<=stringGrid1.rowcount -1 ) d o
begin
indice:=mat1[col1,j];
i:=j+1;
sw:=false;
while(i<=stringGrid1.rowcount- 1)and (sw=false)do
if indice=mat1[col1,i] then
i:=i+1
e lse
begin
sw:=true;
indice2:=mat1[col1,i];
end;
if (sw) then
while(mat1[col1,i]=indice2)and(i<=stringGrid1.rowcount- 1)do
begin
cadena:='';
comparecad(mat1[col2,j],mat1[col2,i],cadena,sw1);
if (sw1) then
begin
m a t2[0,cont]:=cadena;
mat2[1,cont]:=mat1[col3,j]+','+mat1[col3,i];
long:=length(cadena);
c1:=0;
for c:=1 to long do
if cadena[c]='1' then
c1:=c1+1;
mat2[2,cont]:='indice'+inttostr(c1);
cont:=cont+1;
end;
i:=i+1;
257
end;
j:=j+1;
end;
end;
P R O C E D I M I E N T O O R D _ V E C T . Ordena un vector
P R O C E D I M I E N T O I N I C I A R _ S I M P L I F I C A C I O N . Cuando un u s u a r i o
procedure TForm7.Bsimplifi
258
cClick(Sender: TObject);
begin
Estudiantes.Open;
Estudiantes.SetKey;
Estudiantes.FieldByName('Cod_Est').AsString:=Codigo1;
Estudiantes.GotoKey;
if (Estudiantes.GotoKey=True) then
begin
Estudiantes.Edit;
Estudiantes.Fields[4].AsString:='Simplificación Algebraica';
Estudiantes.Post;
Estudiantes.EnableControls;
Estudiantes.Close;
end;
Leccion_Simplificacion.Open;
Leccion_Simplificacion.SetKey;
Leccion_Simplificacion.FieldByName('Cod_Est').AsString:=Codigo1;
Leccion_Simplificacion.GotoKey;
if (Leccion_Simplificacion.GotoKey=True) then
begin
Leccion_Simplificacion.Edit;
L e c c i o n_Simplificacion.Fields[1].AsInteger:=Leccion_Simplificacion.Field
s[1].AsInteger+1;
Leccion_Simplificacion.Post;
Leccion_Simplificacion.EnableControls;
Leccion_Simplificacion.Close;
end
else
begin
Leccion_Simplificacion.DisableControls;
Lec cion_Simplificacion.Last;
Leccion_Simplificacion.Insert;
Leccion_Simplificacion.Edit;
Leccion_Simplificacion.Fields[0].AsString:=Codigo1;
Leccion_Simplificacion.Fields[1].AsInteger:=1;
Leccion_Simplificacion.Fields[2].AsFloat:=0;
Leccion_Simplificacion.Fields[3].AsInteger:=0;
Leccion_Simplificacion.Fields[4].AsString:='000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000 000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000';
Leccion_Simplificacion.Fields[5].AsString:='000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000';
259
Leccion_Simplificacion.Fields[6].AsString:='000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000';
Leccion_Simplificacion.Fields[7].AsString:='000000000000000000000 0 0 0
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000';
Leccion_Simplificacion.post;
Leccion_Simplificacion.EnableControls;
Leccion_Simplificacion.Close;
end;
form7.hide;
FSimpAlg0.Show;
end;
Algebraica.
MostOcul;
showmessage('Esta ley no es aplicable en e s t e c a s o ' ) ;
end
else
if (Ejercicio=VEjerc[4]) then
begin
if (Cont_T=0) then
MostOcul;
showmessage('Esta ley no es aplicable en este caso');
end
else
if (Ejercicio=VEjerc[5]) then
begin
if (Cont_T=0) then
begin
MostOcul;
s h o w m e s s age('Esta ley no es aplicable en este caso');
end
else
if (Cont_T=1) then
begin
label29.Visible:=True;
Ecuacion:='X=Q-R +-QR';
showmessage('Hemos obtenido el resultado X=Q-R +-QR aplicando el
teorema 4');
Dos.Visible:=True;
D o s . F o n t .C o l o r : = c l W h i t e ;
Dos.Caption:=Ecuacion;
Cont_T:=0;
DeshBot(FSimpAlg);
{ FSimpAlg2.Show;
FSimpAlg.Hide;}
end
else
showmessage('Esta ley no es aplicable en este caso');
end;
end;
P R O C E D I M I E N T O T E O R E M A _ D I E C I S I E T E . D e t e r m i n a s i el teorema
– (XY)=- X +- Y d e l Á l g e b r a b o o l e a n a e s a p l i c a b l e a l e j e r c i c i o q u e s e
Algebraica.
261
LEcuacion.Visible:=True;
LEcuacion.Caption:=Ejercicio;
Uno.Visible:=True;
E c u a c i o n : = ' X = A B C + A-B (- - A+ -- C ) ' ;
Cont_T:=Cont_T+1;
Uno.Caption:=Ecuacion;
showmessage('Obtuvimos este resultado aplicando la Ley 17 al
t é r m i n o - (- A-C)');
end
else
showmessage('Esta ley no es aplicable en este caso');
end
else
if (Ejercicio=VEjerc[5]) then
begin
if (Cont_T=0) then
MostOcul;
showmessage('Esta ley no es aplicable en este caso');
end;
end;
Algebraica.
if (Ejercicio=VEjerc[3]) then
begin
if (Cont_T=0) then
MostOcul;
showmessage('En este caso no es posible cancelar las inversiones
dobles');
end
else
if (Ejercicio=VEjerc[4]) then
begin
if (Cont_T=0) then
begin
MostOcul;
showmessage('En este caso no es posible cancelar las inversiones
dobles');
end
else
if (Cont_T=1) then
begin
Dos.Visible:=True;
E c u a c i o n : = ' X = A B C + A-B ( A + C ) ' ;
Dos.Caption:=Ecuacion;
Cont_T:=Cont_T+1;
show message('Obtuvimos este resultado cancelando las inversiones
dobles en los términos - - A y -- C ' ) ;
end
else
showmessage('En este caso no es posible cancelar las inversiones
dobles');
end
else
if (Ejercicio=VEjerc[5]) then
begin
i f ( C o n t _ T = 0 ) then
MostOcul;
showmessage('En este caso no es posible cancelar las inversiones
dobles');
end;
end;
P R O C E D I M I E N T O T E O R E M A _ T R E C E . Determina si el teorema
s e l e h a p r o p u e s t o r e s o l v e r al u s u a r i o e n l a l e c c i ó n s i m p l i f i c a c i ó n
Algebraica.
264
Tres.Visible:=True;
E c u a c i o n : = ' X = A B C + A-B A + A-BC';
Tres.Caption:=Ecuacion;
Cont_T:=Cont_T+1;
showmessage('Obtuvimos este resultado aplicando la Ley 13A al
t é r m i n o A-B(A+C)');
end
else
if (Cont_T=4) then
begin
Cinco.Visible:=True;
Ecuacion:='X=AC(B+- B ) + A- B ' ;
cinco.Caption:=Ecuacion;
Cont_T:=Cont_T+1;
s h o w m e s s age('Obtuvimos este resultado aplicando el Teorema 13A
agrupando los términos ABC+A- BC');
end
else
if (Cont_T=6) then
begin
label29.Visible:=True;
Siete.Visible:=True;
Siete.Font.Color:=clWhite;
Ecuacion:='X=A(- B+C ) ' ;
Siete.Caption:=Ecuacion;
Cont_T:=0;
showmessage('Obtuvimos este resultado aplicando el Teorema 13A
a l o s t é r m i n o s A C + A-B ' ) ;
DeshBot(FSimpAlg);
{ FSimpAlg2.Show;
FSimpAlg.Hide;}
end
else
s h o w m e s s age('Esta ley no es aplicable en este caso');
end
else
if (Ejercicio=VEjerc[5]) then
begin
if (Cont_T=0) then
MostOcul;
showmessage('Esta ley no es aplicable en este caso');
end;
end;
X· X=X d e l Á l g e b r a b o o l e a n a e s a p l i c a b l e a l e j e r c i c i o q u e s e l e h a
267
Algebraica.
else
if (Cont_T=3) then
begin
Cuatro.Visible:=True;
E c u a c i o n : = ' X = A B C + A-B + A- B C ' ;
Cuatro.Caption:=Ecuacion;
Cont_T:=Cont_T+1;
s h o w m e s s a g e ( ' O b t u v i m o s e s t e resultado aplicando el Teorema 3 al
t é r m i n o A-B A ' ) ;
end
else
showmessage('Esta ley no es aplicable en este caso');
end
else
if (Ejercicio=VEjerc[5]) then
begin
if (Cont_T=0) then
MostOcul;
showmessage('Esta ley no es aplicable en este c aso');
end;
end;
Algebraica.
Cont_T:=Cont_T+1;
Uno.Caption:=Ecuacion;
showmessage('Obtuvimos este resultado aplicando la Ley 16 al
t é r m i n o - (C+D)');
end
else
i f ((Cont_T=2) and (Ecuacion='X=- (C+D)+C -D+ -B ( A-C +- ACD)')) then
begin
Tres.Visible:=True;
Ecuacion:='X=-C -D+C -D+ -B ( A-C+- A C D ) ' ;
Tres.Caption:=Ecuacion;
Cont_T:=Cont_T+1;
showmessage('Obtuvimos este resultado aplicando la Ley 16 al
térm ino - (R+S+T)');
end
else
if ((Cont_T=1) and (Ecuacion='X= -( C + D ) + C-D(A+ - A)+- B ( A-C+ - ACD)'))
then
begin
dos.Visible:=True;
Ecuacion:='X= -C -D+C -D(A+- A)+ -B ( A-C+- A C D ) ' ;
Dos.Caption:=Ecuacion;
Cont_T:=Cont_T+1;
s h o w m e s s a g e ( 'Obtuvimos este resultado aplicando la Ley 16 al
t é r m i n o - (C+D)');
end
else
showmessage('Esta ley no es aplicable en este caso');
end
else
if (Ejercicio=VEjerc[3]) then
begin
if (Cont_T=0) then
begin
OculLB;
LEcuacion.Visible:=True ;
LEcuacion.Caption:=Ejercicio;
Uno.Visible:=True;
Ecuacion:='X=- ( R S T )-R -S -T';
Cont_T:=Cont_T+1;
Uno.Caption:=Ecuacion;
showmessage('Obtuvimos este resultado aplicando la Ley 16 al
t é r m i n o - (R+S+T)');
end
else
if ((Cont_T=1) and ( Ecuacion='X=( -R+ -S+ -T )- ( R + S + T ) ' ) ) t h e n
begin
Dos.Visible:=True;
Ecuacion:='X=( -R+ -S+ -T )-R -S -T';
Dos.Caption:=Ecuacion;
Cont_T:=Cont_T+1;
270
e j e r c i c i o q u e s e l e h a p r o p u e s t o r e s o l v e r a l u s u a rio en la lección
simplificación Algebraica.
if (Ejercicio=VEjerc[3]) then
begin
if (Cont_T=0) then
MostOcul;
showmessage('Esta ley no es aplicable en este caso');
end
else
if (Ejercicio=VEjerc[4]) then
begin
if (Cont_T=0) then
MostOcul;
showmessage('Esta ley no es aplicable en este caso');
end
else
if (Ejercicio=VEjerc[5]) then
begin
if (Cont_T=0) then
begin
OculLB;
LEcuacion.Visible:=True;
LEc u a c i o n . C a p t i o n : = E j e r c i c i o ;
Uno.Visible:=True;
Ecuacion:='X=Q -Q+Q-R + R -Q + R-R';
Cont_T:=Cont_T+1;
Uno.Caption:=Ecuacion;
showmessage('Hemos obtenido este resultado aplicando el teorema
13B a los términos (Q+R)(-Q +-R ) ) ' ) ;
end
else
showmes sage('Esta ley no es aplicable en este caso');
end;
end;
Algebraica.
X = 1 d e l Á l g e b r a b o o l e a na e s a p l i c a b l e a l e j e r c i c i o q u e s e l e h a
Algebraica.
Ecuacion:='X=AC+A- B ' ;
seis.Caption:=Ecuacion;
Cont_T:=Cont_T+1;
showmessage('Obtuvimos este resultado aplicando el Teorema 8 al
término AC(B+ -B)');
end
else
showmessage('Esta ley no es aplicable en este caso');
end
else
if (Ejercicio=VEjerc[5]) then
begin
if (Cont_T=0) then
MostOcul;
showmessage('Esta ley no es aplicable en este caso');
end;
end;
X +-X Y = X + Y d e l Á l g e b r a b o o l e a n a e s a p l i c a b l e a l e j e r c i c i o q u e s e l e
Algebraica.
D e s h B ot(FSimpAlg);
{ FSimpAlg2.Show;
FSimpAlg.Hide;}
end
else
showmessage('Esta ley no es aplicable en este caso');
end
else
if (Ejercicio=VEjerc[2]) then
begin
if (Cont_T=0) then
MostOcul;
showmessage('Esta ley no es aplicable en este c a s o ' ) ;
end
else
if (Ejercicio=VEjerc[3]) then
begin
if (Cont_T=0) then
MostOcul;
showmessage('Esta ley no es aplicable en este caso');
end
else
if (Ejercicio=VEjerc[4]) then
begin
if (Cont_T=0) then
MostOcul;
showmessage('Esta ley no es aplicable en este caso');
end
else
if (Ejercicio=VEjerc[5]) then
begin
if (Cont_T=0) then
MostOcul;
showmessage('Esta ley no es aplicable en este caso');
end;
end;
P R O C E D I M I E N T O R E S U E L T O S _ S I M P L _ A L G E B R A I C A . Selecciona
mostrar al usuario.
NSimpRes:=NSimpRes+1;
Estudiantes.Open;
Estudiantes.SetKey;
Estudiantes.FieldByName('Cod_Est').AsString:=Codigo 1 ;
Estudiantes.GotoKey;
if (Estudiantes.GotoKey=True) then
begin
Estudiantes.Edit;
niv:=Estudiantes.Fields[6].AsInteger;
end;
Estudiantes.Close;
Leccion_Simplificacion.Open;
Leccion_Simplificacion.SetKey;
Leccion_Simplificacion.FieldByName('Cod_Est').AsString:=
Codigo1;
Leccion_Simplificacion.GotoKey;
Leccion_Simplificacion.Edit;
EjerSiNo:=Leccion_Simplificacion.Fields[4].AsString;
Leccion_Simplificacion.Close;
Ejercicios_Resueltos.Open;
Ejercicios_Resueltos.DisableControls;
sw:=False;
E jercicios_Resueltos.First;
while ((not(Ejercicios_Resueltos.EOF)) and (sw=False)) do
begin
Ejercicios_Resueltos.Edit;
if (Ejercicios_Resueltos.Fields[0].AsString = 'Simplificacion Algebraica')
and (Ejercicios_Resueltos.Fields[1].Asinteger=niv) then
begin
if (Ejercicios_Resueltos.Fields[2].Asinteger=Num_Res) then
begin
sw:=True;
Num_Res:=Num_Res+1;
end
else
Ejercicios_Resueltos.Next;
end
else
if (sw=false) then
Ejercicios_Resueltos.Next;
end;
if (sw) t hen
begin
FEjerSARes.Memo2.Text:=Ejercicios_Resueltos.Fields[4].asString;
FEjerSARes.Memo1.Text:=Ejercicios_Resueltos.Fields[3].asString;
FEjerSARes.Show;
FSimpAlg.Hide;
end
else
showmessage('No hay más ejercicios sobre este tema en este nivel.');
end;
278
algebraica.
if (sw) then
begin
PropSA:=PropSA+1;
Ejercicio:=Ejercicios_Propuestos.Fields[1].asstring;
//Ejercicio:='X=-(A+B+-C+-D+E)+-A-B-C-E+ABCD-E+ABC+-A-BCD-E';
FEvaluarSA.M28.Text:=Ejercicio;
FEvaluarSA.Show;
FSimpAlg.Hide;
end
else
showmessage('No hay más ejercicios sobre este tema en este nivel.');
end;
te o r e m a X ( Y + Z ) = X Y + X Z d e l á l g e b r a b o o l e a n a e n l a e v a l u a c i ó n
usuario.
NError:=NError+1;
end
else
if (Ejercicio='X= - A-B -C- D+- A-B C-D+ - AB-C -D ' ) t h e n
if (Cont_T=0) then
begin
ContB:=ContB+1;
OculL;
LEcuac ion.Visible:=True;
LEcuacion.Text:=Ejercicio;
Uno.Visible:=True;
Ecuacion:='X= - A- C-D (- B+B)+- A- BC-D ' ;
Cont_T:=Cont_T+1;
Uno.Text:=Ecuacion;
Panel3.Visible:=True;
Memo1.Text:='Obtuvimos este resultado aplicando el Teorema
13A a los términos - A-B -C- D con - AB-C -D ' ;
end
else
if ((Cont_T=2) and (Ecuacion='X=- A-C -D+ - A-BC -D ' ) ) t h e n
begin
ContB:=ContB+1;
Tres.Visible:=True;
Ecuacion:='X=- A-D (-C +-BC)';
Tres.Text:=Ecuacion;
Cont_T:=Cont_T+1;
Panel3.Visible:=True;
Memo1.Text:='Obtuvimos este resultado aplicando el Teorema
13A al término - A-C- D c o n - A-BC -D';
end
else
if ((Cont_T=1) and (Ecuacion='X= - A-C-D (- B+B)+- A- BC- D ' ) ) t h e n
begin
ContB:=ContB+1;
Dos.Visible:=True;
Ecuacion:='X= - A-D( -C (-B+B)+- BC)';
Dos.Text:=Ecuacion;
Cont_T:=Cont_T+1;
Panel3.Visible:=True;
Memo1.Text:='Obtuvimos este resultado aplicando el Teorema
13A al término - A-C- D( -B+B)con - A-BC -D ' ;
end
else
begin
Panel4.Visible:=True;
Memo2.Text:='El Teorema 13A no es aplicable en este caso';
NError:=NError+1;
end
else
if (Ejercicio='X=ABCDE+- A- BCDE+ABCD- E+- A-B -C -D E ' ) t h e n
if (Cont_T=0) then
282
begin
ContB:=ContB+1;
OculL;
LEcuacion.Visible:=True;
LEcuacion.Text:=Ejercicio;
Uno.Visible:=True;
Ecuacion:='X=ABCD(E+- E)+ - A-B E ( C D +-C -D ) ' ;
Cont_T : = C o n t _ T + 1 ;
Uno.Text:=Ecuacion;
Panel3.Visible:=True;
Memo1.Text:='Obtuvimos este resultado aplicando el Teorema
13A a los términos ABCDE con ABCD- E y - A- BCDE con - A-B-
C -D- E ' ;
end
else
begin
P a nel4.Visible:=True;
Memo2.Text:='El Teorema 13A no es aplicable en este caso';
NError:=NError+1;
end
else
if (Ejercicio='X= -A-B-C-D-E + -(A+B+C+D+E) + ABCDE + AB-CD-E') then
if (Cont_T=0) then
begin
C o n tB:=ContB+1;
OculL;
LEcuacion.Visible:=True;
LEcuacion.Text:=Ejercicio;
Uno.Visible:=True;
Ecuacion:='X= - A-B -C- D-E +- (A+B+C+D+E)+ABD(CE+-C -E ) ' ;
Cont_T:=Cont_T+1;
Uno.Text:=Ecuacion;
Panel3.Visible:=True;
Memo1.Text:='Obtuvimos este resultado aplicando el
Teorema 13A a el término ABCDE con AB -CD -E ' ;
end
else
if ((Cont_T=2) and (Ecuacion='X=-A-B-C-D-E+ABCDE+AB-CD-E')) then
begin
ContB:=ContB+1;
Tres.Visible:=True;
Ecuacion:='X= - A- B- C-D -E+ABD(CE+ -C -E ) ' ;
Tres.Font.Color:=clWhite;
Tres.Text:=Ecuacion;
Cont_T:=0;
DeshBot(FEvaluarSA);
Panel3.Visible:=True;
Memo1.Text:='Obtuvimos este resultado aplicando el
Teorema 13A a los términos ABCDE y AB -CD -E';
Label29.Visible:=True;
BRegresar.Visible:=True;
283
BRegresar.Enabled:=True;
end
else
if ((Cont_T=1) and (Ecuacion='X= - A-B -C-D -E+ - A-B -C- D-E + ABCDE+AB -
CD -E')) then
begin
ContB:=ContB+1;
Dos.Visible:=True;
Ecuacion:='X=- A- B-C -D- E+- A- B-C -D -E+ABD(CE+ -C- E)';
Dos.Text:=Ecuacion;
Cont_T:=Cont_T+1;
Panel3.Visible:=True;
Memo1.Text:='Obtuvimos este resultado aplicando el
Teorema 13A al término ABCDE con AB -CD -E ' ;
end
else
begin
Panel4.Visible:=True;
Memo2.Text:='El Teorema 13A no es aplicable en este caso';
N E r r o r : = NError+1;
end
else
if (Ejercicio='X=- A- BCD -EF+ABCDEF+AB-C D- E F + A- B-CD -EF+ - A- B-C -D -
E -F ' ) t h e n
if (Cont_T=0) then
begin
ContB:=ContB+1;
OculL;
LEcuacion.Visible:=True;
LEcuacion.Text:=Ejercicio ;
Uno.Visible:=True;
Ecuacion:='X=-A-B-E(CDF+-C-D-F)+ABCDEF+A-CD-EF(B+-B)';
Cont_T:=Cont_T+1;
Uno.Text:=Ecuacion;
Panel3.Visible:=True;
Memo1.Text:='Obtuvimos este resultado aplicando el
T e o r e m a 1 3 A a los términos - A- BCD -E F c o n - A-B -C- D-E -F y
AB -CD -E F c o n A- B-CD -E F ' ;
end
else
if (Cont_T=2) then
begin
ContB:=ContB+1;
Tres.Visible:=True;
Ecuacion:='X=- A- B-E(CDF+- C-D -F)+ADF(BCE+- C-E ) ' ;
Tres.Font.Color:=clWhite;
Tres.Text:=Ecuacion;
Cont_T:=0;
DeshBot(FEvaluarSA);
284
Panel3.Visible:=True;
Memo1.Text:='Obtuvimos este resultado aplicando el
Teorema 13A a los términos AB C D E F y A-CD -E F ' ;
Label29.Visible:=True;
BRegresar.Visible:=True;
BRegresar.Enabled:=True;
end
else
begin
Panel4.Visible:=True;
Memo2.Text:='El Teorema 13A no es aplicable en este c a s o ' ;
NError:=NError+1;
end
else
if (Ejer cicio='X=-(A+B+-C+D+E+F)+A-B-CDEF+-ABCD-E-F+-(-A+-B+-C+-D+-E+-F)')
then
if (Cont_T=0) then
begin
ContB:=ContB+1;
OculL;
LEcuacion.Visible:=Tru e ;
LEcuacion.Text:=Ejercicio;
Uno.Visible:=True;
Ecuacion:='X=- (A+B+- C + D + E + F ) + D ( A- B-C E F +- ABC -E- F ) +
- (- A+- B+- C+-D +-E +- F)';
Cont_T:=Cont_T+1;
Uno.Text:=Ecuacion;
Panel3.Visible:=True;
Memo1.Text:='Obtuvimos este resultado aplicando el
Teorema 13A al término A-B -C D E F c o n - A B C D- E- F ' ;
end
else
i f ( ( C o n t _ T = 2 ) a n d ( E c u a c i o n = ' X = - A-B C-D -E -F + A- B-C D E F +- ABCD -E -
F+ABCDEF')) then
begin
ContB:=ContB+1;
Tres.Visible:=True;
Ecuacion:='X= - AC-E -F (- B-D + B D ) + A D E F (- B-C + B C ) ' ;
Tres.Font.Color:=clWhite;
Tres.Text:=Ecuacion;
Cont_T:=0;
DeshBot(FEvaluarSA);
Panel3.Visible:=True;
Memo1.Text:='Obtuvimos este resultado aplicando el
Teorema 13A a los términos - A- BC -D- E- F con - ABCD -E- F y
A- B-C D E F c o n A B C D E F ' ;
Label29.Visible:=True;
BRegresar.Visible:=True;
BRegresar.Enab l e d : = T r u e ;
end
else
285
if (Cont_T=3) then
begin
ContB:=ContB+1;
Cuatro.Visible:=True;
Ecuacion:='X=- A- BC-D -E -F + D ( A-B -CEF+ - ABC- E- F+ABCEF)';
Cuatro.Text:=Ecuacion;
Cont_T : = C o n t _ T + 1 ;
Panel3.Visible:=True;
Memo1.Text:='Obtuvimos este resultado aplicando el
Teorema 13A al término D(A-B -CEF+- ABC -E -F ) c o n
ABCDEF';
end
else
if (Cont_T=4) then
begin
ContB:=ContB+1;
Cinco.Visible:=True;
Ecuacion:='X=- A- BC-D -E -F+D(AEF( -B- C+BC)+- ABC -E -F ) ' ;
Cinco.Text:=Ecuacion;
Cont_T:=Cont_T+1;
Panel3.Visible:=True;
Memo1.Text:='Obtuvimos este resultado aplicando el
Teorema 13A al término A-B -C E F c o n A B C E F ' ;
end
else
if (Cont_T=5) then
begin
ContB:=ContB+1;
Seis.Visible:=True;
Ecuacion:='X=- A- BC-D -E -F + A D E F (-B -C + B C ) +- ABCD -E -F';
Seis.Text:=Ecuacion;
Cont_T:=Cont_T+1;
Panel3.Visible:=True;
Memo1.Text:='Obtuvimos este resultado aplicando el
Teorema 13A al término D ( A E F (-B -C + B C ) +- ABC -E- F ) ' ;
end
else
if (Cont_T=6) then
begin
ContB:=ContB+1;
Siete.Visible:=True;
Ecuacion:='X= - A-E- F( -B C-D+BCD)+ADEF(- B-C + B C ) ' ;
Siete.Font.Color:=clWhite;
Siete.Text:=Ecuacion;
Cont_T:=0;
DeshBot(FEvaluarSA);
Panel3.Visible:=True;
Memo1.Text:='Obtuvimos este resultado aplicando el
Teorema 13A al término - A-BC -D -E- F c o n - ABCD -E -F ' ;
Label29.Visible:=True;
BRegresar.Visible:=True;
286
BRegresar.Enabled:=True;
end
else
begin
Panel4.Visible:=True;
Memo2.Text:='El Teorema 13A no es aplicable en este caso';
NError:=NError+1;
end
else
if(Ejercicio='X=- (- A+ -B+ -C+- D+- E+- F)+ABCDEF+- A- BCDE -F + A- BCD -E -F')
then
if (Cont_T=0) then
begin
ContB:=Cont B+1;
OculL;
LEcuacion.Visible:=True;
LEcuacion.Text:=Ejercicio;
Uno.Visible:=True;
Ecuacion:='X=-(-A+-B+-C+-D+-E+-F)+ABCDEF+-BCD-F(-AE+A-E)';
Cont_T:=Cont_T+1;
Uno.Text:=Ecuacion;
Panel3.Visible:=True;
Memo1.Text:='Obtuvimos este resultado aplicando el
Teorema 13A al término - A- BCDE -F c o n A-BCD- E- F ' ;
end
else
if ((Cont_T=3) and (Ecuacion='X=ABCDEF+- A- BCDE -F + A-BCD -E -F'))
then
begin
ContB:=ContB+1;
Cuatro.Visible:=True;
Ecuacion:='X=ABCDEF+ -B C D- F( - A E + A-E)';
Cont_T:=Cont_T+1;
Cuatro.Text:=Ecuacion;
Panel3.Visible:=True;
Memo1.Text:='Obtuvimos este resultado aplicando el
Teorema 13A al término - A-BCDE- F c o n A-BCD -E -F';
end
else
if (Cont_T=4) and (Ecuacion='X=ABCDEF+-BCD- F( - A E + A-E ) ' ) ) t h e n
begin
ContB:=ContB+1;
Cinco.Vis i b l e : = T r u e ;
Ecuacion:='X=CD(ABEF+-B -F (- A E + A- E ) ) ' ;
Cinco.Font.Color:=clWhite;
Cinco.Text:=Ecuacion;
Cont_T:=0;
DeshBot(FEvaluarSA);
Panel3.Visible:=True;
Memo1.Text:= 'Obtuvimos este resultado aplicando el
Teorema 13A al término ABCDEF con -BCD -F (- A E + A- E)';
287
Label29.Visible:=True;
BRegresar.Visible:=True;
BRegresar.Enabled:=True;
end
else
i f ( (Cont_T=1) and (Ecuacion='X= -( - A+ -B+ -C+- D+- E+- F)+ABCDEF+- BCD -
F ( - AE+A- E)')) then
begin
ContB:=ContB+1;
Dos.Visible:=True;
Ecuacion:= 'X=-(-A+-B+-C+-D+-E+-F)+CD(ABEF+-B-F(-AE+A-E))';
Cont_T :=Cont_T+1;
Dos.Text:=Ecuacion;
Panel3.Visible:=True;
Memo1.Text:='Obtuvimos este resultado aplicando el
Teorema 13A al término ABCDEF con - BCD- F (- A E + A-E ) ' ;
end
else
i f ( ( C ont_T=4) and (Ecuacion='X=ABCDEF+CD(ABEF+ -B -F (- A E + A-E))'))
then
begin
ContB:=ContB+1;
Cinco.Visible:=True;
Ecuacion:='X=CD(ABEF+ABEF+- B- F( - A E + A-E ) ) ' ;
Cinco.Text:=Ecuacion;
Cont_T:=Cont_T+1;
Panel3.Visible:=True;
Memo1.Text:='Obtuvimos este resultado aplicando el
Teorema 13A al término ABCDEF con CD(ABEF+
-B -F (- A E + A-E ) ' ;
end
else
begin
Panel4.Visible:=True;
Memo2.Text:='El Teorema 13A no es aplicable en este caso';
NError:=NError+1;
end
else
if(Ejercicio= 'X= -( A + B + C + D + E + F ) + - A- B-C -D -E- F + - A-
BCDEF+ABCDEF+AB- CDE -F ' ) t h e n
i f (Cont_T=0) then
begin
ContB:=ContB+1;
OculL;
LEcuacion.Visible:=True;
LEcuacion.Text:=Ejercicio;
Uno.Visible:=True;
Ecuacion:='X= -( - A+ -B+ -C+ -D+- E+- F ) +-C -F (- A- B-D -
+ABDE)+CDEF( - A-B+AB)';
Cont_T:=Cont_T+1;
Uno.Text:=Ecuacion;
288
Panel3.Visible:=True;
Memo1.Text:='Obtuvimos este resultado aplicando el
Teorema 13A al término - A-B -C- D-E -F c o n - A-BCDEF y
- A- BCDEF con ABCDEF';
end
else
if ((Cont_T=2) and (Ecuacion='X= - A-B -C-D -E -F +- A-BCDEF + ABCDEF +
AB -CDE -F')) then
begin
ContB:=ContB+1;
Tres.Visible:=True;
E c u a c i o n:='X=-C - F(- A- B-D -E+ABDE)+CDEF( - A-B + A B ) ' ;
Tres.Font.Color:=clWhite;
Tres.Text:=Ecuacion;
Cont_T:=0;
DeshBot(FEvaluarSA);
Panel3.Visible:=True;
Memo1.Text:='Obtuvimos este resultado aplicando el
Teorema 13A a los términos - A-B -C- D-E -F con AB -CDE -F
y - A-B C D E F c o n A B C D E F ' ;
Label29.Visible:=True;
BRegresar.Visible:=True;
BRegresar.Enabled:=True;
end
else
if ((Cont_T=2) and (Ecuacion='X= - A-B- C-D -E -F+ -C -F (- A-B -D -
E+ABDE)+CDEF( - A-B + A B ) ' ) ) t h e n
begin
ContB:=ContB+1;
Tres.Visible:=True;
Ecuacion:='X= -C -F (- A-B -D -E+ - A-B- D-E + A B D E ) +
CDEF( - A-B + A B ) ' ;
Tres.Text:=Ecuacion;
Cont_T:=Cont_T+1;
Panel3.Visible:=True;
Memo1.Text:='Obtuvimos este resultado aplicando el
Teorema 13A a los términos - A- B- C-D -E -F c o n
-C - F( - A- B-D -E+ABDE)';
end
else
if ((Cont_T=1) and (Ecuacion='X=- A- B-C -D- E- F+ - A- B-C -D -E -F+ - A-
BCDEF+ABCDEF+AB- CDE -F')) then
begin
ContB:=ContB+1;
Dos.Visible:=True;
Ecuacion:='X=-A-B-C-D-E-F+-C-F(-A-B-D-E+ABDE)+
CDEF(-A-B+AB)';
Dos.Text:=Ecuacion;
Cont_T:=Cont_T+1;
Panel3.Visible:=True;
Memo1.Text:='Obtuvimos este resultado aplicando el
289
begin
ContB:=ContB+1;
Tres.Visible:=True;
Ecuacion:='X=-C-F(-A-B-D-E+-A-B-D-E+ABDE)+CDEF(-A-B+AB)';
Tres.Text:=Ecuacion;
Cont_T:=Cont_T+1;
P a n e l 3 . V i s i b l e : = T r u e;
Memo1.Text:='Obtuvimos este resultado aplicando el
Teorema 13A a los términos - A-B -C- D-E - F con
- C- F( - A- B- D-E+ABDE)';
end
else
begin
P a n e l 4 . V i s ible:=True;
Memo2.Text:='El Teorema 13A no es aplicable en este caso';
NError:=NError+1;
end
else
i f ( E j e r c i c i o = ' X = A-B C-D+ -(A+B+C+- D)+ - A-BCD') then
if (Cont_T=0) then
begin
ContB:=ContB+1;
OculL;
LEcuacion.Visible:=True;
LEcuacion.Text:=Ejercicio;
Uno.Visible:=True;
Ecuacion:='X=- B C ( A-D +- AD)+ -(A+B+C+-D ) ' ;
Cont_T:=Cont_T+1;
Uno.Text:=Ecuacion;
Panel3.Visible:=True;
Memo1.Text:='Obtuvimos este resultado aplicando el
Teorema 13A a los términos A- BC- D con - A-B C D ' ;
end
else
if ((Cont_T=2) and (Ecuacion='X=A-BC-D+-A-B-CD+-A-BCD')) then
begin
ContB:=ContB+1;
Tres.Visible:=True;
Ecuacion:='X=A- BC- D+- A- BD( -C + C ) ' ;
Cont_T:=Cont_T+1;
Tres.Text:=Ecuacion;
P a n e l 3.Visible:=True;
Memo1.Text:='Obtuvimos este resultado aplicando el
290
Panel3.Visible:=True;
Memo1.Text:='Obtuvimos este resultado aplicando el
Teorema 13A a el término - ACD con - A- C D ' ;
end
else
if ((Cont_T=1) and (Ecuacion='X=A-BC-D+-A-B-C--D+-A-BCD')) then
begin
ContB:=ContB+1;
Dos.Visible:=True;
E c u a c i o n :='X=- B C ( A-D +- AD)+ - A-B -C- -D ' ;
Cont_T:=Cont_T+1;
Dos.Text:=Ecuacion;
Panel3.Visible:=True;
Memo1.Text:='Obtuvimos este resultado aplicando el
Teorema 13A a el términ o A-BC -D c o n - A- BCD';
end
else
begin
Panel4.Visible:=True;
Memo2.Text:='El Teorema 13A no es aplicable en este caso';
NError:=NError+1;
end
else
if (Ejercicio='X=- (A+B+- C)+ - A-B C D +- AB- CD') then
if (Cont_T=0) then
begin
ContB:=ContB+1;
OculL;
LEcuacion.Visible:=True;
LEcuacion.Te xt:=Ejercicio;
Uno.Visible:=True;
Ecuacion:='X= -( A + B +-C)+- AD( -BC+B -C)';
Cont_T:=Cont_T+1;
Uno.Text:=Ecuacion;
Panel3.Visible:=True;
Memo1.Text:='Obtuvimos este resultado ap l i c a n d o e l
Teorema 13A a los términos A-B C-D c o n - A- BCD';
end
else
if ((Cont_T=2) and (Ecuacion='X=-A-BC+-A-BCD+-AB-CD')) then
begin
ContB:=ContB+1;
Tres.Visible:=True;
Ecuacion:='X= - A-BC(1+D)+ - AB-C D ' ;
Cont_T:=Cont_T+1;
Tres.Text:=Ecuacion;
Panel3.Visible:=True;
Memo1.Text:='Obtuvimos este resultado aplicando el
Teorema 13A a el término - A- B C c o n - A-B C D ' ;
end
else
292
end
else
if ((Cont_T=5) and (Ecuacion='X= - A(-BC+- B C D + B-C D ) ' ) ) t h e n
begin
ContB:=ContB+1;
Seis.Visible:=True;
Ecuacion:='X=- A(- BC(1+D)+B-C D ) ' ;
Cont_T:=Cont_T+1;
S e i s . T e x t : = E c uacion;
Panel3.Visible:=True;
Memo1.Text:='Obtuvimos este resultado aplicando el
Teorema 13A a el término -B C c o n -B C D ' ;
end
else
begin
Panel4.Visible:=True;
Memo2.Text:='El Teorema 13A no es aplicable en este caso';
NError:=NError+1;
end
else
if(Ejercicio='X=-(A+B+-C+-D+E)+-ABC-DE+A-B-C-DE+ABCDE') then
if (Cont_T=0) then
begin
ContB:=ContB+1;
OculL;
LEcuacion.Visible:=True;
LEcuacion.Text:=Ejercicio;
Uno.Visible:=True;
Ecuacion:='X=-(A+B+-C+-D+E)+BCE(-A-D+AD)+A-B-C-DE';
Cont_T:=Cont_T+1;
Uno.Text:=Ecuacion;
Panel3.Visible:=True;
Memo1.Text:='Obtuvimos este resultado aplicando el
Teorema 13A a los términos A-B -C-DE con ABCDE';
end
else
if ((Cont_T=3) and (Ecuacion='X=-A-BCD-E+BCE(-A-D+AD)+A-B-C-DE'))
then
begin
ContB:=ContB+1;
Cuatro.Visible:=True;
Ecuacion:='X=- B( - ACD -E + A- C-D E ) + B C E (- A-D + A D ) ' ;
Cuatro.Font.Color:=clWhite;
Cuatro.Text:=Ecuacion;
Cont_T:=0;
DeshBot(FEvaluarSA);
Panel3.Visible:=True;
Memo1.Text:='Obtuvimos este resultado aplicando el
Teorema 13A a los términos - A-B C D-E c o n A- B-C -DE';
Label29.Visible:=True;
BRegresar.Visible:=True;
294
BRegresar.Enabled:=True;
end
else
if ((Cont_T=2) and (Ecuacion='X=-A-BCD-E+-ABC-DE+A-B-C-DE+ABCDE')) then
begin
ContB:=ContB+1;
Tres.Visible:=True;
Ecuacion:='X= -B (- ACD -E + A-C -DE)+BCE( - A-D+AD)';
Tres.Font.Color:=clWhite;
Tres.Text:=Ecuacion;
Cont_T:=0;
DeshBot(FEvaluarSA);
Panel3.Visible:=True;
Memo1.Text:='Obtuvimos este resultado aplicando el
Teorema 13A a los términos - A- BCD -E c o n A-B -C- DE y
- ABC- D E c o n A B C D E ' ;
Label29.Visible:=True;
BRegresar.Visible:=True;
BRegresar.Enabled:=True;
end
else
if ((Cont_T=1) and (Ecuacion='X= - A-B --C --D -E+ - ABC- D E + A-B -C -
DE+ABCDE')) then
begin
ContB:=ContB+1;
Dos.Visible:=True;
Ecuacion:='X=-A-B--C--D-E+BCE(-A-D+AD)+A-B-C-DE';
Cont_T:=Cont_T+1;
Dos.Text:=Ecuacion;
Panel3.Visible:=True;
Memo1.Text:='Obtuvimos este resultado aplicando el
Teorema 13A a los términos - ABC -D E c o n A B C D E ' ;
end
else
begin
Panel4.Visible:=True;
Memo2.Text:='El Teorema 13A no es aplicable en este caso';
NError:=NError+1;
end
else
i f ( E j e r c i c i o = ' X = (- A+B)(A+B+C)- D') then
if (Cont_T=0) then
begin
ContB:=ContB+1;
OculL;
LEcuacion.Visible:=True;
LEcuacion.Text:=Ejercicio;
Uno.Visible:=True;
Ecuacion:='X=( - A+ B ) ( A-D+B -D+C -D ) ' ;
Cont_T:=Cont_T+1;
Uno.Text:=Ecuacion;
295
Panel3.Visible:=True;
Memo1.Text:='Obtuvimos este resultado aplicando el
Teorema 13A a los términos (A+B+C) con -D';
end
else
if ((Cont_T=4) and (Ecuacion='X=- AB -D+- AC- D+AB-D + B- D+BC -D ' ) ) t h e n
begin
ContB:=ContB+1;
Cinco.Visible:=True;
Ecuacion:='X=B- D( - A+A)+C -D (- A+B)+B- D ' ;
Cont_T:=Cont_T+1;
Cinco.Text:=Ecuacion;
Panel3.Visible:=True;
Memo1.Text:='Obtuvimos este resultado aplicando el
Teorema 13A a los términos - AB-D con AB- D y
- AC- D con BC- D ' ;
end
else
if ((Cont_T=3) and (Ecuacion='X=( - AB+- AC+AB+B+BC)-D ' ) ) t h e n
begin
ContB:=ContB+1;
Cuatro.Visible:=True;
Ecuacion:='X= - AB -D+ - AC -D+ AB- D+B -D + B C-D';
Cont_T:=Cont_T+1;
Cuatro.Text:=Ecuacion;
Panel3.Visible:=True;
Memo1.Text:='Obtuvimos este resultado aplicando el
Teorema 13A a el término ( - AB+- A C + AB+B+BC) con
–D';
end
else
begin
Panel4.Visible:=True;
Memo2.Text:='El Teorema 13A no es aplicable en este caso';
NError:=NError+1;
end
else
if (Ejercicio='X=(B+- C ) (-B+C)+ -( - A+B+ -C ) ' ) t h e n
if ((Cont_T=4) and (Ecuacion='X=BC+ -B -C + A-B C ' ) ) t h e n
begin
ContB:=ContB+1;
Cinco.Visible:=True;
E c u a c i o n : = ' X = C ( B + A-B ) +- B-C';
Cont_T:=Cont_T+1;
Cinco.Text:=Ecuacion;
Panel3.Visible:=True;
Memo1.Text:='Obtuvimos este resultado aplicando el
Teorema 13A a el término BC c o n A-BC';
end
else
if ((Cont_T=3) and (Ecuacion='X=- BB+BC+- B- C+-C C + A-BC')) then
296
begin
ContB:=ContB+1;
Cuatro.Visible:=True;
Ecuacion:='X= -B B + C ( B + A-B)+- B-C +-CC';
Cont_T:=Cont_T+1;
Cuatro.Text:=Ecuacion;
Panel3.Visible:=True;
Memo1.Text:='Obtuvimos este resultado aplicando el
Teorema 13A a el término BC con A- B C ' ;
end
else
begin
Panel4.Visible:=True;
Memo2.Text:='El Teorema 13A no es aplicable en este
caso';
NError:=NError+1;
end
else
if (Ejercicio='X=-(A+B+-C+-D+E)+-A-B-C-E+ABCD-E+ABC+-A-BCD-E') then
if (Cont_T=0) then
begin
ContB:=ContB+1;
OculL;
LEcuacion.Visible:=True;
LEcuacion.Text:=Ejercicio;
Uno.Visible:=True;
Ecuacion:='X=-(A+B+-C+-D+E)+-A-B-E(-C+CD)+ABC(D-E+1)';
Cont_T:=Cont_T+1;
Uno.Text:=Ecuacion;
Pa n e l 3 . V i s i b l e : = T r u e ;
Memo1.Text:='Obtuvimos este resultado aplicando el
Teorema 13A a los términos - A- B-C -E c o n - A- BCD -E y
ABCD -E c o n A B C ' ;
end
else
if ((Cont_T=2) and (Ecuacion='X= - A-BCD -E+ - A-B -C- E+ABCD -
E+ABC
+- A-BCD- E ' ) ) t h e n
begin
ContB:=ContB+1;
Tres.Visible:=True;
Ecuacion:='X=-A-B-E(CD+-C)+ABC(D-E+1)+-A-BCD-E';
Cont_T:=Cont_T+1;
Tres.Text:=Ecuacion;
Panel3.Visible:=True;
Memo1.Text:='Obtuvimos este resultado aplicando el
Teorema 13A a los términos - A-BCD -E c o n - A- B-C -E
y ABCD -E c o n A B C ' ;
297
end
else
if ((Cont_T=5) and (Ecuacion='X=-A-B-E(-C+D)+ABC+-A-BCD-E')) then
begin
ContB:=ContB+1;
Seis.Visible:=True;
Ecuacion:='X= - A-B- E( -C + D + C D ) + A B C ' ;
Cont_T:=Cont_T+1;
Seis.Text:=Ecuacion;
Panel3.Visible:=True;
Memo1.Text:='Obtuvimos este resulta do aplicando
el Teorema 13A a el término - A-B -E( -C + D ) c o n
- A-BCD -E';
end
else
if ((Cont_T=6) and (Ecuacion='X=- A- B-E (- C+D+CD)+ABC'))
then
begin
ContB:=ContB+1;
Siete.Visible:=True;
Ecuacion:='X=- A- B- E(- C+D(1+C))+ABC';
Cont_T:=Cont_T+1;
Siete.Text:=Ecuacion;
Panel3.Visible:=True;
Memo1.Text:='Obtuvimos este resultado aplicando
el Teorema 13A a el término D con CD';
end
else
if ((Cont_T=3) and (Ecuacion='X=-A-BCD-E+-A-B-C-E+ABCD-E+ABC'))
then
begin
ContB:=ContB+1;
Cuatro.Visible:=True;
Ecuacion:='X=- A-B -E(CD+ -C)+ABC(D -E + 1 ) ' ;
Cont_T:=Cont_T+1;
Cuatro.Text:=Ecuacion;
Panel3.Visible:=True;
Memo1.Text:='Obtuvimos este resultado aplicando
el Teorema 13A a los términos - A-B C D- E c o n
- A-B -C -E y ABCD -E c o n A B C ' ;
end
else
if ((Cont_T=5) and (Ecuacion='X=-A-BCD-E+-A-B-E(-C+D)+ABC')) then
begin
ContB:=ContB+1;
S e i s . V i s i b le:=True;
Ecuacion:='X= - A-B- E(CD+- C+D)+ABC';
Cont_T:=Cont_T+1;
Seis.Text:=Ecuacion;
Panel3.Visible:=True;
Memo1.Text:='Obtuvimos este res u l t a d o a p l i c a n d o
298
ContB:=ContB+1;
LEcuacion.Visible:=True;
LEcuacion.Text:=Ejercicio;
Uno.Visible:=True;
Ecuacion:='X=- A-B -- C-D -E -F + A- B-C D E F +- ABCD -E -F+ -- A- -B --C --D -- E-
-F';
Cont_T:=Cont_T+1;
Uno.Text:=Ecuacion;
Panel3.Visible:=True;
Memo1.Text:='Obtuvimos este resultado aplicando la Ley 16 a los
t é r m i n o s - (A+B+- C+D+E+F) y - (- A+- B+ -C+- D+- E+- F)';
end
else
if ((Cont_T=1) and (Ecuacion='X= -(A+B+ -C + D + E + F ) + D ( A-B -CEF+ -
A B C- E- F ) +- (- A+-B +-C+ -D+ -E+ -F ) ' ) ) t h e n
begin
ContB:=ContB+1;
Dos.Visible:=True;
Ecuacion:='X= - A-B --C -D- E- F + D ( A-B -CEF+- ABC -E -F)+- - A-- B- -C- -D- -
E -- F ' ;
Cont_T:=Cont_T+1;
Dos.Text:=Ecuacion;
Panel3.Visible:=True;
Memo1.Text:='Obtuvimos este resultado aplicando la Ley 16 al
t é r m i n o - (- A+- B+- C+-D +-E +- F)';
end
else
begin
Panel4. Visible:=True;
Memo2.Text:='La Ley 16 no es aplicable en este caso';
NError:=NError+1;
end
else
if (Ejercicio='X=- (- A+- B+- C+- D+- E+- F)+ABCDEF+- A-BCDE -F + A- BCD -
E -F ' ) t h e n
if (Cont_T=0) then
begin
ContB:=ContB+1;
OculL;
LEcuacion.Visible:=True;
LEcuacion.Text:=Ejercicio;
Uno.Visible:=True;
Ecuacion:='X= -- A- -B --C --D -- E- -F+ABCDEF+- A- BCDE -F + A- BCD -E -F';
Cont_T:=Cont_T+1;
Uno.Text:=Ecuacion;
Panel3.Visible:=True;
Memo1.Text:='Obtuvimos e s t e resultado aplicando la Ley 16 al
t é r m i n o - (- A+- B+- C+-D +-E +- F)';
end
else
301
Memo1.Text:='Obtuvimos e s t e r e s u l t a d o a p l i c a n d o l a L e y 1 6 a l
t é r m i n o - ( A+B+- C+-D + E ) ' ;
end
else
if ((Cont_T=1) and (Ecuacion='X=- (A+B+ -C+- D+E)+BCE( - A-
D + A D ) + A- B- C-D E ' ) ) t h e n
begin
ContB:=ContB+1;
Dos.Visible:=True;
Ecuacion:='X=- A- B-- C- -D- E+BCE( - A-D + A D ) + A- B-C -DE';
Cont_T:=Cont_T+1;
Dos.Text:=Ecuacion;
Panel3.Visible:=True;
Memo1.Text:='Obtuvimos este resultado aplicando la Ley 16 al
t é r m i n o - (A+B+- C+-D + E ) ' ;
end
else
begin
Panel4.Visible:=Tr ue;
Memo2.Text:='La Ley 16 no es aplicable en este caso';
NError:=NError+1;
end
else
if (Ejercicio='X=(B+ -C ) (- B+C)+- (- A+B+ -C ) ' ) t h e n
if (Cont_T=0) then
begin
ContB:=ContB+1;
OculL;
LEcuacion.Visible:=True;
LEcuacion.Text:=Ejercicio;
Uno.Visible:=True;
Ecuacion:='X=(B+-C)( -B+C)+ -- A- B- -C ' ;
Cont_T:=Cont_T+1;
Uno.Text:=Ecuacion;
Panel3.Visible:=True;
Memo1.Text:='Obtuvimos este resultado aplicando la Ley 16 al
t é r m i n o - (- A+B+ -C ) ' ;
end
else
if ((Cont_T=2) and (Ecuacion='X=BC+ -B -C+ -(- A + B +-C ) ' ) ) t h e n
begin
ContB:=ContB+1;
Tres.Visible:=True;
Ecuacion:='X=BC+ -B -C+- - A-B --C';
Cont_T:=Cont_T+1;
Tres.Text:=Ecuacion;
Panel3.Visible:=True;
Memo1.Text:='Obtuvimos este resultado aplicando la Ley 16 al
t é r m i n o - (- A+B+ -C ) ' ;
end
else
305
begin
ContB:=ContB+1;
Dos.Visible:=True;
E c uacion:='X=- A- B- -C- -D- E+- A- B- E( -C+CD)+ABC(D-E + 1 ) ' ;
Cont_T:=Cont_T+1;
Dos.Text:=Ecuacion;
Panel3.Visible:=True;
Memo1.Text:='Obtuvimos este resultado aplicando la Ley 16 al
t é r m i n o - (A+B+- C+-D + E ) ' ;
end
else
if ((Cont_T=2) and (Ecuacion='X= -(A+B+ -C+ -D+E)+ - A- B- E( -
C+CD)+ABC')) then
begin
ContB:=ContB+1;
Tres.Visible:=True;
Ecuacion:='X= - A-B --C -- D-E +- A-B -E (-C + C D ) + A B C ' ;
Cont_T:=Cont_T+1;
Tres.Text:=Ecuacion;
Panel3.Visible:=True;
Memo1.Text:='Obtuvimos este resultado aplicando la Ley 16 al
t é r m i n o - (A+B+- C+-D + E ) ' ;
end
else
i f ( ( Cont_T=2) and (Ecuacion='X= -(A+B+ -C+ -D+E)+ - A- B- E( -
C+D)+ABC(D- E+1)')) then
begin
ContB:=ContB+1;
Tres.Visible:=True;
Ecuacion:='X= - A-B- -C --D -E+ - A-B -E( -C+D)+ABC(D- E+1)';
C o n t _ T : = C o n t _ T +1 ;
Tres.Text:=Ecuacion;
Panel3.Visible:=True;
Memo1.Text:='Obtuvimos este resultado aplicando la Ley 16
al término -(A+B+ -C+ -D + E ) ' ;
end
else
begin
Panel4.Visible:=True;
Memo2.Text:='La Ley 16 no es aplicable en este caso';
NError:=NError+1;
end
else
begin
if (Cont_T=0) then
MostL;
Panel4.Visible:=True;
Mem o2.Text:='La Ley 16 no es aplicable en este caso';
NError:=NError+1;
end;
end;
307
if (Cont_T=1) then
begin
ContB:=ContB+1;
Dos.Visible:=True;
Ecuacion:='X=ABCD+ - A-B E ( C D +-C -D ) ' ;
D os . F o n t . C o l o r : = c l W h i t e ;
Dos.Text:=Ecuacion;
Cont_T:=0;
DeshBot(FEvaluarSA);
Panel3.Visible:=True;
Memo1.Text:='Obtuvimos este resultado aplicando el Teorema 8 al
término ABCD(E+ -E)';
Label29.Visible:=True;
B R e g r e s a r. V i s i b l e : = T r u e ;
BRegresar.Enabled:=True;
end
else
begin
Panel4.Visible:=True;
Memo2.Text:='El Teorema 8 no es aplicable en este caso';
NError:=NError+1;
end
else
if (Ejercicio='X=- A-BCD- EF+ABCDEF+AB -CD -E F + A-B -CD -EF+- A-B -C -
D -E -F ' ) t h e n
if (Cont_T=1) then
begin
ContB:=ContB+1;
Dos.Visible:=True;
Ecuacion:='X=- A-B -E(CDF+- C-D -F)+ABCDEF+A-C D-E F ' ;
Cont_T:=Cont_T+1;
Dos.Text:=Ecuacion;
Panel3.Visible:=True;
Memo1.Text:='Obtuvimos este resultado aplicando el Teorema 8 a
e l t é r m i n o A-CD -EF(B+- B)';
end
else
begin
Panel4.Visible:=True;
Memo2.Text:='El Teorema 8 no es aplicable en este caso';
NError:=NError+1;
end
else
if (Ejercicio='X=A-BC -D+ -( A + B + C +-D)+- A- B C D ' ) t h e n
i f ( ( C o n t _ T = 3 ) a n d ( E c u a c i o n = ' X = A- BC- D+- A- BD( -C + C ) ' ) ) t h e n
begin
ContB:=ContB+1;
Cuatro.Visible:=True;
Ecuacion:='X=A- BC- D+- A-B D ' ;
Cont_T:=Cont _T+1;
Cuatro.Text:=Ecuacion;
310
Panel3.Visible:=True;
Memo1.Text:='Obtuvimos este resultado aplicando el Teorema 8 a
el término - A- B D (-C + C ) ' ;
end
else
if ((Cont_T=6) and (Ecuacion='X= -B(AC -D+- AD(C+- C ) ) ' ) ) t h e n
begin
ContB:=ContB+1;
Siete.Visible:=True;
Ecuacion:='X= -B(AC -D+- A D ) ' ;
Siete.Font.Color:=clWhite;
Siete.Text:=Ecuacion;
Cont_T:=0;
DeshBot(FEvaluarSA);
Panel3.Visible:=True;
Memo1.Text:='Obtuvimos este resultado aplicando el Teorema 8 a
el término - AD(-C+C)';
Label29.Visible:=True;
BRegresar.Visible:=True;
BRegresar.Enabled:=True;
end
else
begin
Panel4.Visible:=Tr u e ;
Memo2.Text:='El Teorema 8 no es aplicable en este caso';
NError:=NError+1;
end
else
if (Ejercicio='X=(- A+B)(A+B+C) -D') then
if ((Cont_T=5) and (Ecuacion='X=B-D (- A+A)+C -D( - A+B)+B-D')) then
begin
ContB:=ContB+1;
Seis.Visible:=True;
Ecuacion:='X=B -D + C-D (- A+B)+B -D ' ;
Cont_T:=Cont_T+1;
Seis.Text:=Ecuacion;
Panel3.Visible:=True;
Memo1.Text:='Obtuvimos este resultado aplicando el Teorema 8 a
e l término B-D (- A + A ) ' ;
end
else
begin
Panel4.Visible:=True;
Memo2.Text:='El Teorema 8 no es aplicable en este caso';
NError:=NError+1;
end
else
begin
if (Cont_T=0) then
MostL;
Panel4.Visible:=True;
311
DeshBot(FEvaluarSA);
Panel3.Visible:=True;
Memo1.Text:='Obtuvimos este resultado aplicando el Teorema 15 al
t é r m i n o A C +- A)';
Label29.Visible:=True;
BRegresar.Visible:=True;
BRegresar.Enabled:=True;
end
else
begin
Panel4.Visible:=True;
Memo2.Text:='El Teorema 15 no es aplicable en este caso';
NE r r o r : = N E r r o r + 1 ;
end
else
if (Ejercicio='X=- A-B -C -D+- A- BC- D+- AB -C-D ' ) t h e n
if (Cont_T=3) then
begin
ContB:=ContB+1;
Cuatro.Visible:=True;
Ecuacion:='X= - A-D( -B+ -C ) ' ;
Cuatro.Font.Color:=clWhite;
Cuatro.Text:=Ecuacion;
Cont_T:=0;
DeshBot(FEvaluarSA);
Panel3.Visible:=True;
Memo1.Text:='Obtuvimos este resultado aplicando el Teorema 15 al
t é r m i n o - A-D (- C+- BC)';
Label29.Visible:=True;
BRegresar.Visible:=True;
BRegresar.Enabled:=True;
end
else
begin
Panel4.Visible:=True;
Memo2.Text:='El Teorema 15 no es aplicable en este caso';
NError:=NError+1;
end
else
if (Ejercicio='X=(B+ -C)( -B+C)+- (- A + B +-C)') then
if ((Cont_T=5) and (Ecuacion='X=C(B+A- B)+ -B -C')) then
begin
ContB:=ContB+1;
Seis.Visible:=True;
Ecuacion:='X=C(A+B)+ -B -C ' ;
Seis.Font.Color:=clWhite;
Seis.Text:=Ecuacion;
Cont_T:=0;
DeshBot(FEvaluarSA);
Panel3.Visible:=True;
313
end
else
if ((Cont_T=5) and (Ecuacion='X= - A-B- E(CD+- C)+ABC')) then
begin
ContB:=ContB+1;
Seis.Visible:=True;
Ecuacion:='X= - A- B- E( -C+D)+ABC';
Seis.Font.Color:=clWhite;
Seis.Text:=Ecuacion;
Cont_T:=0;
DeshBot(FEvaluarSA);
Panel3.Visible:=True;
Memo1.Text:='Obtuvimos este resultado aplicando el Teorema 15
a e l t é r m i n o - A-B -E(CD+ -C)';
Label29.Visible:=True;
BRegresar.Visible:=True;
B R e g resar.Enabled:=True;
end
else
if ((Cont_T=2) and (Ecuacion='X= -(A+B+ -C+ -D+E)+ - A- B- E( -
C+CD)+ABC')) then
begin
ContB:=ContB+1;
Tres.Visible:=True;
Ecuacion:='X=- (A+B+- C+-D + E ) +- A-B -E (-C+D)+ABC';
Cont_T:=Cont_T+1;
Tres.Text:=Ecuacion;
Panel3.Visible:=True;
Memo1.Text:='Obtuvimos este resultado aplicando el Teorema 15
a e l t é r m i n o - A-B -E (-C+CD)';
end
else
if ((Cont_T=1) and (Ecuacion='X= -(A+B+ -C+ -D+E)+ - A- B- E( -
C+CD)+ABC(D -E+1)')) then
begin
ContB:=ContB+1;
Dos.Visible:=True;
Ecuacion:='X= -( A + B +-C+ -D+E)+ - A-B -E( -C+D)+ABC(D- E+1)';
Cont_T:=Cont_T+1;
Dos.Text:=Ecuacion;
Panel3.Visible:=True;
Memo1.Text:='Obtuvimos este resultado aplicando el Teorema 15
a e l t é r m i n o - A-B -E (-C+CD)';
end
else
if ((Cont_T=3) and (Ecuacion='X=- A- BCD- E+ - A- B- E( -
C+CD)+ABC(D -E+1)')) then
b e gin
ContB:=ContB+1;
Cuatro.Visible:=True;
Ecuacion:='X= - A- BCD -E+ - A-B -E( -C+D)+ABC(D- E+1)';
315
Cont_T:=Cont_T+1;
Cuatro.Text:=Ecuacion;
Panel3.Visible:=True;
Memo1.Text:='Obtuvimos este resultado aplicando el Teorema
1 5 a e l t é r m i n o - A- B-E (- C + C D ) ' ;
end
else
if ((Cont_T=3) and (Ecuacion='X=- A- B- -C- -D- E+ - A- B- E( -
C+CD)+ABC')) then
begin
ContB:=ContB+1;
Cuatro.Vis i b l e : = T r u e ;
Ecuacion:='X=- A- B- -C- -D- E+- A- B- E( -C+D)+ABC';
Cont_T:=Cont_T+1;
Cuatro.Text:=Ecuacion;
Panel3.Visible:=True;
Memo1.Text:='Obtuvimos este resultado aplicando el Teorema
15 a el térm ino - A- B-E (- C + C D ) ' ;
end
else
if ((Cont_T=2) and (Ecuacion='X=- A- B- -C- -D- E+ - A- B- E( -
C+CD)+ABC(D -E+1)')) then
begin
ContB:=ContB+1;
Tres.Visible:=True;
Ecuacion:='X= - A-B --C -- D-E +- A-B -E (-C+D)+ABC(D -E+1)';
Cont_T:=Cont_T+1;
Tres.Text:=Ecuacion;
Panel3.Visible:=True;
Memo1.Text:='Obtuvimos este resultado aplicando el Teorema
1 5 a e l t é r m i n o - A- B-E (- C + C D ) ' ;
end
else
if ((Cont_T=4) and (Ecuacion='X=- A- BCD- E+ - A- B- E( -
C+CD)+ABC')) then
begin
ContB:=ContB+1;
Cinco.Visible:=True;
Ecuacion:='X= - A-BCD -E+ - A-B -E( -C+D)+ABC';
Cont_T:=Cont_T+1;
Cinco.Text:=Ecuacion;
Panel3.Visible:=True;
Memo1.Text:='Obtuvimos este resultado aplicando el Teorema
1 5 a e l t é r m i n o - A- B-E (- C + C D ) ' ;
end
else
if ((Cont_T=4) and (Ecuacion='X=- A- BCD- E+ - A- B- E( -
C+CD)+ABC')) then
begin
ContB:=ContB+1;
Cinco.Visible:=True;
316
else
if (Cont_T=5) then
begin
ContB:=ContB+1;
Seis.Visible:=True;
Ecuacion:='X=CD(ABEF+- B- F( - A E + A-E ) ) ' ;
S e i s .Font.Color:=clWhite;
Seis.Text:=Ecuacion;
Cont_T:=0;
DeshBot(FEvaluarSA);
Panel3.Visible:=True;
Memo1.Text:='Obtuvimos este resultado aplicando el Teorema 7 al
término ABCDEF con ABCDEF';
Label29.Visible:=True;
B R e gresar.Visible:=True;
BRegresar.Enabled:=True;
end
else
begin
Panel4.Visible:=True;
Memo2.Text:='El Teorema 7 no es aplicable en este caso';
NError:=NError+1;
end
else
if (Ejercicio='X= -(A+B+C+D+E+F)+ - A- B-C -D -E -F+ - A-
BCDEF+ABCDEF+AB- CDE -F ' ) t h e n
if ((Cont_T=1) and (Ecuacion='X=- A- B-C -D- E- F+ - A- B-C -D -E -F+ - A-
BCDEF+ABCDEF+AB- CDE -F')) then
begin
ContB:=ContB+1;
Dos.Visible:=True;
Ecuacion:='X= - A-B -C-D -E -F +- A-BCDEF+ABCDEF+AB- CDE -F';
C o n t _T:=Cont_T+1;
Dos.Text:=Ecuacion;
Panel3.Visible:=True;
Memo1.Text:='Obtuvimos este resultado aplicando el Teorema 7 al
t é r m i n o - A- B-C -D- E- F ' ;
end
else
if ((Cont_T=3) and (Ecuacion='X=- C- F( - A-B- D- E+- A-B -D -
E+ABDE)+CDEF( - A-B + A B ) ' ) ) t h e n
begin
ContB:=ContB+1;
Cuatro.Visible:=True;
Ecuacion:='X= -C- F( - A-B -D- E+ABDE)+CDEF(- A-B + A B ) ' ;
Cuatro.Font.Color:=clWhite;
Cuatro.Text:=Ecuacion;
Cont_T:=0;
DeshBot(FEvaluarSA);
Panel3.Visible:=True;
319
else
begin
Panel4.Visible:=True;
Memo2.Text:='El Teorema 7 no es aplicable en este caso';
NError:=NError+1;
end
else
begin
if (Cont_T=0) then
MostL;
Panel4.Visible:=True;
Memo2.Text:='El Teorema 7 no es aplicable e n e s t e c a s o ' ;
NError:=NError+1;
end;
end;
Panel3.Visible:=True;
Memo1.Text:='Obtuvimos este resultado cancelando las inversiones
dobles en los término - A- B-- C-D -E -F y - - A- -B --C -- D- -E -- F ' ;
end
else
begin
Panel4.Visible:=True;
Memo2.Text:='Esta ecuación no tiene inversiones dobles que
cancelar';
NError:=NError+1;
end
else
if (Ejercicio='X= -(- A+ -B+ -C+- D+- E+- F)+ABCDEF+- A- BCDE -F + A- BCD -E -
F') then
if ((Cont_T=1) and (Ecuacion='X=- - A-- B- -C- -D- -E -- F+ABCDEF+ - A-
BCDE -F + A- BCD -E- F')) then
begin
ContB:=Cont B + 1 ;
Dos.Visible:=True;
Ecuacion:='X=ABCDEF+ABCDEF+ - A-B C D E- F + A-B C D- E- F ' ;
Cont_T:=Cont_T+1;
Dos.Text:=Ecuacion;
Panel3.Visible:=True;
Memo1.Text:='Obtuvimos este resultado cancelando las inversiones
d o b l e s e n e l t é r m i n o - - A-- B- -C- -D- -E -- F ' ;
end
else
if ((Cont_T=2) and (Ecuacion='X= -- A- -B --C --D -- E- -F+ABCDEF+- BCD -
F ( - AE+A- E)')) then
begin
ContB:=ContB+1;
Tres.Visible:=True;
Ecuacion:='X=ABCDEF+ABCDEF+- BCD -F (- A E + A-E ) ' ;
Cont_T:=Cont_T+1;
Tres.Text:=Ecuacion;
Panel3.Visible:=True;
Memo1.Text:='Obtuvimos este resultado cancelando las inversiones
d o b l e s e n e l t é r m i n o - - A-- B- -C- -D- -E -- F ' ;
end
else
if ((Cont_T=3) and (Ecuacion='X=- - A-- B-- C- -D- -E -- F+CD(ABEF+- B- F( -
A E + A-E))')) then
begin
ContB:=ContB+1;
Cuatro.Visible:=True;
Ecuacion:='X=ABCDEF+CD(ABEF+ -B- F (- A E + A-E))';
Cont_T:=Cont_T+1;
Cuatro.Text:=Ecuacion;
Panel3.Visible:=True;
Memo1.Text:='Obtuvimos este resultado cancelando las inversiones
d o b l e s e n e l t é r m i n o - - A-- B- -C- -D- -E -- F ' ;
322
end
else
begin
Panel4.Visible:=True;
Memo2.Text:='Esta ecuación no tiene inversiones dobles que
cancelar';
NError:=NError+1;
end
else
if (Ejercicio='X=A-BC -D+ -(A+B+C+ -D)+- A- B C D ' ) t h e n
i f ( ( C o n t _ T = 1 ) a n d ( E c u a c i o n = ' X = A- BC- D+- A- B-C --D +- A-B C D ' ) ) t h e n
begin
ContB:=ContB+1;
Dos.Visible:=True;
Ecuacion:='X=A- BC- D+- A-B -CD+ - A-B C D ' ;
Cont_T:=Cont_T+1;
Dos.Text:=Ecuacion;
Panel3.Visible:=True;
Memo1.Text:='Obtuvimos este resultado cancelando las inversiones
d o b l e s e n e l t é r m i n o - A- B-C --D ' ;
end
else
if ((Cont_T=2) and (Ecuacion='X= -B C ( A-D+- AD)+- A-B -C --D')) then
begin
ContB:=ContB+1;
Tres.Visible:=True;
Ec uacion:='X= -B C ( A- D+- A D ) +- A-B -CD';
Cont_T:=Cont_T+1;
Tres.Text:=Ecuacion;
Panel3.Visible:=True;
Memo1.Text:='Obtuvimos este resultado cancelando las inversiones
d o b l e s e n e l t é r m i n o - A- B-C --D ' ;
end
else
begin
P a n el4.Visible:=True;
Memo2.Text:='Esta ecuación no tiene inversiones dobles que
cancelar';
NError:=NError+1;
end
else
if (Ejercicio='X= -(A+B+ -C)+- A- BCD+ - AB -C D ' ) t h e n
if ((Cont_T=2) and (Ecuacion='X= - A-B- -C+ - AD(- BC+B -C ) ' ) ) t h e n
begin
ContB:=ContB+1;
Tres.Visible:=True;
Ecuacion:='X= - A- BC+ - AD(- BC+B -C ) ' ;
Cont_T:=Cont_T+1;
Tres.Text:=Ecuacion;
Panel3.Visible:=True;
323
Panel4.Visible:=True;
Memo2.Text:='Esta ecuación no tiene inversiones dobles que
cancelar';
NError:=NError+1;
end
else
if (Ejercicio='X=(B+-C)( -B+C)+ -( - A+B+- C ) ' ) t h e n
if ((Cont_T=3) and (Ecuacion='X=BC+ -B -C+- - A-B --C')) then
begin
C o n t B : = C o n t B + 1;
Cuatro.Visible:=True;
Ecuacion:='X=BC+ -B -C + A-BC';
Cont_T:=Cont_T+1;
Cuatro.Text:=Ecuacion;
Panel3.Visible:=True;
Memo1.Text:='Obtuvimos este resultado cancelando las
inversiones dobles en el término -- A- B- -C ' ;
end
else
if ((Cont_T=1) and (Ecuacion='X=(B+ -C ) (- B+C)+- - A-B --C ' ) ) t h e n
begin
ContB:=ContB+1;
Dos.Visible:=True;
Ecuacion:='X=(B+ -C ) (- B + C ) + A-BC';
Cont_T:=Cont_T+1;
Dos.Text:=Ecuacion;
Panel3.Visible:=True;
Memo1.Text:='Obtuvimos este resultado cancelando las
inversiones dobles en el término -- A- B- -C ' ;
end
else
i f ((Cont_T=2) and (Ecuacion='X=- BB+BC+ -B- C+-C C + - - A-B --C'))
then
begin
ContB:=ContB+1;
Tres.Visible:=True;
Ecuacion:='X=- BB+BC+- B- C+-C C + A-BC';
Cont_T:=Cont_T+1;
Tres.Text:=Ecuacion;
Panel3.Visible:=True;
Memo1.Text:='Obtuvimos este resultado cancelando las
inversiones dobles en el término -- A- B- -C ' ;
end
else
begin
Panel4.Visible:=True;
Memo2.Text:='Esta ecuación no tiene inversiones dobles que
cancelar';
NError:=NError+1;
end
else
325
Cuatro.Visible:=True;
Ecuacion:='X=- A- BC+ - AB -CD';
Cont_T:=Cont_T+1;
Cuatro.Text:=Ecuacion;
Panel3.Visible:=True;
Memo1.Text:='Obtuvimos este resultado aplicando el Teorema 6 a el
t é r m i n o - A- BC(1+D ) ' ;
end
else
if ((Cont_T=6) and (Ecuacion='X=- A( -BC(1+D)+B- CD)')) then
begin
ContB:=ContB+1;
Siete.Visible:=True;
Ecuacion:='X=- A( -B C + B-C D ) ' ;
Siete.Font.Color:=clWhite;
Siete.Text:=Ecuacion;
Cont_T:=0;
DeshBot(FEvaluar SA);
Panel3.Visible:=True;
Memo1.Text:='Obtuvimos este resultado aplicando el Teorema 6 a el
t é r m i n o - BC(1+D)';
Label29.Visible:=True;
BRegresar.Visible:=True;
BRegresar.Enabled:=True;
end
else
begin
Panel4.Visible:=True;
Memo2.Text:='ElTeorema 6 no es aplicable en este caso';
NError:=NError+1;
end
else
if (Ejercicio='X= -(A+B+ -C+- D+E)+- A- B-C -E + A B C D-E+ABC+- A-BCD- E')
then
if ((Cont_T=3) and (Ecuacion='X= - A- B- E(CD+-C)+ABC(D- E+1)+ - A-
BCD- E ' ) ) t h e n
begin
C on t B : = C o n t B + 1 ;
Cuatro.Visible:=True;
Ecuacion:='X=- A-B -E(CD+ -C)+ABC+- A- BCD- E ' ;
Cont_T:=Cont_T+1;
Cuatro.Text:=Ecuacion;
Panel3.Visible:=True;
Memo1.Text:='Obtuvimos este resultado aplicando el Teorema 6 a el
término ABC(D -E + 1 ) ' ;
e nd
else
if ((Cont_T=7) and (Ecuacion='X= - A-B -E (-C+D(1+C))+ABC')) then
begin
ContB:=ContB+1;
Ocho.Visible:=True;
328
else
if ((Cont_T=3) and (Ecuacion='X=- A- BCD- E+ - A- B- E( -
C+CD)+ABC(D -E+1)')) then
begin
ContB:=ContB+1;
Cuatro.Vis i b l e : = T r u e ;
Ecuacion:='X=- A- BCD- E+- A- B- E( -C+CD)+ABC';
Cont_T:=Cont_T+1;
Cuatro.Text:=Ecuacion;
Panel3.Visible:=True;
Memo1.Text:='Obtuvimos este resultado aplicando el Teorema
6 a el término ABC(D- E+1)';
end
else
begin
Panel4.Visible:=True;
Memo2.Text:='El Teorema 6 no es aplicable en este caso';
NError:=NError+1;
end
else
begin
if (Cont_T=0) then
MostL;
Panel4.Visible:=True;
Memo2.Text:='El Teorema 6 no es aplicable en este caso';
NError:=NError+1;
end;
end;
seleccionado el usuario.
Tres.Text:=Ecuacion;
Panel3.Visible:=True;
Memo1.Text:='Obtuvimos este resultado aplicando el Teorema 4 a el
térm ino - AA- D ' ;
end
else
if ((Cont_T=3) and (Ecuacion='X=- AA-D +- AB- D+- AC- D+AB -D + B-D+BC -
D')) then
begin
ContB:=ContB+1;
Cuatro.Visible:=True;
Ecuacion:='X=- AB- D+- AC- D+AB-D + B-D+BC -D ' ;
Cont_T:=Cont_T+1;
Cuatro.Text:=Ecuacion;
P a nel3.Visible:=True;
Memo1.Text:='Obtuvimos este resultado aplicando el Teorema 4 a el
t é r m i n o - AA- D ' ;
end
else
if ((Cont_T=1) and (Ecuacion='X=( - AA+- AB+ - AC+AB+BB+BC)-D'))
then
begin
ContB:=ContB+1;
Dos.Visible:=True;
E c u a c i o n:='X=(- AB+ - AC+AB+BB+BC) -D';
Cont_T:=Cont_T+1;
Dos.Text:=Ecuacion;
Panel3.Visible:=True;
Memo1.Text:='Obtuvimos este resultado aplicando el Teorema 4 a el
t é r m i n o - AA';
end
else
if ((Cont_T=2) and (Ecuacion='X=(- AA+ - AB+- AC+ AB+B+BC) -D ' ) ) t h e n
begin
ContB:=ContB+1;
Tres.Visible:=True;
E c u a c i o n : = ' X = (- AB+- AC+AB+B+BC)-D ' ;
Cont_T:=Cont_T+1;
Tres.Text:=Ecuacion;
Panel3.Visible:=True;
Memo1.Text:='Obtuvimos este resultado aplicando el Teorema 4 a el
t é r m i n o - AA';
end
else
begin
Panel4.Visible:=True;
Memo2.Text:='El Teorema 4 no es aplicable en este caso';
NError:=NError+1;
end
else
if (Ejercicio='X=(B+ -C ) (- B + C ) +- (- A+B+ -C ) ' ) t h e n
334
ContB:=ContB+1;
Seis.Visible:=True;
E c u a c ion:='X=C(A+B)+- B-C';
Seis.Font.Color:=clWhite;
Seis.Text:=Ecuacion;
Cont_T:=0;
DeshBot(FEvaluarSA);
Panel3.Visible:=True;
Memo1.Text:='Obtuvimos este resultado aplicando el Teorema 4 a
los términos - BB y -C C ' ;
Label29.Visible:=True;
BRegresar.Visible:=True;
BRegresar.Enabled:=True;
end
else
if ((Cont_T=4) and (Ecuacion='X= -B B + C ( B + A-B)+- B-C +-CC')) then
begin
ContB:=ContB+1;
Cinco.Visible:=T r u e ;
E c u a c i o n : = ' X = C ( B + A- B)+ -B -C ' ;
Cont_T:=Cont_T+1;
Cinco.Text:=Ecuacion;
Panel3.Visible:=True;
Memo1.Text:='Obtuvimos este resultado aplicando el Teorema 4 a
los términos - BB y -C C ' ;
end
else
begin
Panel4.Visible:=True;
Memo2.Text:='El Teorema 4 no es aplicable en este caso';
NError:=NError+1;
end
else
begin
if (Cont_T=0) then
MostL;
Panel4.Visible:=True;
Memo2.Text:='El Teorema 4 no es aplicabl e e n e s t e c a s o ' ;
NError:=NError+1;
end;
end;
begin
Panel4.Visible:=True;
Memo2.Text:='El Teorema 9 no es aplicable en este caso';
NError:=NError+1;
end
else
begin
if (Cont_T=0) then
MostL;
Panel4.Visible:=True;
Memo2.Text:='El Teorema 9 no es aplicable en este caso';
NError:=NError+1;
end;
end;
begin//3
P u n t : = ( ( 1 0 0- ((NError*100)/(2*(Contm+1))))*Punt)/100;
if (Leccion_Simplificacion.Fields[3].AsInteger=0) then
begin
Puntaje:=Punt;
Leccion_Simplificacion.Fields[2].AsFloat:=Leccion_Simplificacion.Fields[
2].AsFloat+Punt;
end
else
begin
D e s c : = P u n t- (Punt*0.05);
Puntaje:=Desc;
Leccion_Simplificacion. Fields[2].AsFloat:=Leccion_Simplificacion.Fields[
2].AsFloat+Desc;
end;
Leccion_Simplificacion.Fields[4].AsString:=EjerSiNo;
Leccion_Simplificacion.Post;
Leccion_Simplificacion.EnableControls;
Leccion_Simplificacion.Close;
Estudiantes.Open ;
Estudiantes.DisableControls;
Estudiantes.Setkey;
Estudiantes.FieldByName('Cod_Est').AsString:=Codigo1;
Estudiantes.GotoKey;
if (estudiantes.gotokey=true) then
begin//4
Estudiantes.Edit;
if (niv<4)then
Estudiantes.fields[6].AsInteger:=Estudiantes.fields[6].AsInteger+1;
Estudiantes.fields[3].Asfloat:=Estudiantes.fields[3].Asfloat+Punt;
PunT:=((Estudiantes.fields[3].AsFloat)/20);
Estrellas:=Trunc(PunT);
NEstr:=Estudiantes.fields[5].AsInteger;
if (Estrell as>Estudiantes.fields[5].AsInteger) then
begin
Estudiantes.fields[5].AsInteger:=Estrellas;
Panel3.Visible:=True;
FEstrella.Show;
end;
Estudiantes.Post;
Estudiantes.EnableControls;
Estudiantes.Close;
end;//4
NumEquiv: = 0 ;
FFelicit.Memo2.Text:=FormatFloat('0.00',Puntaje);
FFelicit.Show;
FEvaluarSA.Hide;
end//3
else
340
begin
PuntE:=(Leccion_Simplificacion.Fields[2].AsFloat)*0.1;
Leccion_Simplificacion.Fields[2].AsFloat:=Leccion_Simplificacion.Fields[
2 ] . AsFloat-PuntE;
Leccion_Simplificacion.Fields[5].AsString:=EjerSiNo;
Leccion_Simplificacion.Post;
Leccion_Simplificacion.EnableControls;
Leccion_Simplificacion.Close;
Estudiantes.Open;
Estudiantes.DisableControls;
Estudiantes.Setkey;
Estudiantes.FieldByName('Cod_Est').AsString:=Codigo1;
Estudiantes.GotoKey;
if (estudiantes.gotokey=true) then
begin
Estudiantes.Edit;
if (niv>1)then
Estudiantes.fields[6].AsInteger:=Estudiantes.fields[6].AsInteger- 1 ;
E s t u d i a n t e s .fields[3].Asfloat:=Estudiantes.fields[3].Asfloat- PuntE;
PunT:=((Estudiantes.fields[3].AsFloat)/20);
Estrellas:=Trunc(PunT);
Estudiantes.fields[5].AsInteger:=Estrellas;
Estudiantes.Post;
Estudiantes.EnableControls;
Estudiantes.Close;
end;
// FEvaluarSA.Hide;
NumEquiv:=NumEquiv+1;
FEquivoc.Memo6.Text:=FormatFloat('0.00',PuntE);
FEquivoc.Show;
FEvaluarSA.Hide;
end;
end;
end;
P R O C E D I M I E N T O I N I C I A R _ A P L I C A C I O N E S . Cuando un us u a r i o
form7.hide;
Estudiantes.Open;
Estudiantes.SetKey;
Estudiant es.FieldByName('Cod_Est').AsString:=Codigo1;
Estudiantes.GotoKey;
if (Estudiantes.GotoKey=True) then
begin
Estudiantes.Edit;
Estudiantes.Fields[4].AsString:='Aplicaciones del Algebra Booleana';
Estudiantes.Post;
Estudiantes.EnableControls;
Es t u d i a n t e s . C l o s e ;
end;
Leccion_Aplicaciones.Open;
Leccion_Aplicaciones.SetKey;
Leccion_Aplicaciones.FieldByName('Cod_Est').AsString:=Codigo1;
Leccion_Aplicaciones.GotoKey;
if (Leccion_Aplicaciones.GotoKey=True) then
begin
Leccion_Aplicaciones.Edit;
Leccion_Aplicaciones.Fields[1].AsInteger:=Leccion_Aplicaciones.Fields[
1].AsInteger+1;
Leccion_Aplicaciones.Post;
Leccion_Aplicaciones.EnableControls;
Leccion_Aplicaciones.Close;
end
else
begin
Leccion_Aplicaciones.DisableControls;
Leccion_Aplicaciones.Last;
Leccion_Aplicaciones.Insert;
Leccion_Aplicaciones.Edit;
Leccion_Aplicaciones.Fields[0].AsString:=Codigo1;
Leccion_Aplicaciones.Fields[1].AsInteger:=1;
Leccion_Aplicaciones.Fields[2].AsFloat:=0;
Leccion_Aplicaciones .Fields[3].AsInteger:=0;
Leccion_Aplicaciones.Fields[4].AsString:='0000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000';
Leccion_Aplicaciones.Fields[5].AsString:='0000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000';
Leccion_Aplicaciones.Fields[6].AsString:='0000000000000000000000000
342
000000000000000000000000000000000000000000000000000000000000
0000000 00000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000';
Leccion_Aplicaciones.post;
Leccion_Aplicaciones.EnableControls;
L e c c i o n _ A p l i c a c iones.Close;
end;
FAplicac.Show;
end;
4 . ARBOL DE DIRECTORIOS
s e l e c c i o n a l a c a r p e t a M r B o o l e é s t a c o n t i e n e l a c a r p e t a con el
MANUAL DE USUARIO
1. REQUERIMIENTOS
u n e q u i p o c o m p a t i b l e co n W i n d o w s c o n u n a m e m o r i a R A M m í n i m a
• Windows 95/98
• Delphi 3.0
• Corel Draw
• Ilustrador Cómico
• Photo Paint
346
• Gif Animator
• Office 2000
• Internet Explorer
2 . PROCESO DE INSTALACIÓN
2.1 INSTALACION
P a r a i n s t a l a r e l p r o g r a m a s e i n t r o d u c e e l C D - ROM en la unidad de
C D , d e s d e e l e x p l o r a d o r a c c e d a a l a u n i d a d d e C D , e scoja
0 MrBoole
0 Instaladores
0 Instructor
completamente.
In i c i o d e s u P C , e n l a l i s t a d e p r o g r a m a s b u s q ue el lugar donde se
0 Mr Boole
0 Instructor
0 Mr Boole o Ayuda
349
solicitando en la pantalla .
C r e a r T a b l a . C r e a l a s i g u i e n t e t a b l a d e r e d u c c i ó n.
• Lecciones: E n c u a l q u i e r i n s t a n t e p u e d e s d e s p l a z a r t e a u n a
a un C o n t e n i d o q u e i n t e g r a u n a s e r i e d e í t e m e s p e c í f i c o s .
• R e t o r n a r : T e p e r m i t e a b a n d o n a r a M r B o o l e e n c u a l q uier
instante.
351
abajo.
352
fo r m a m i n t e r m s o m a x t e r m s a p a r t i r d e u n a t a b l a d e v e r d a d , e l
t e r m i n o q u e v a a f o r m a r y d a r c l i c k e n e l b o t ó n A c e p t a r, al instante
a p a r e c e n l o s b o t o n e s A , B , C , -B ,- C ,-D , a l d a r c l i c s o b r e e l l o s s e
E n l a l e c c i ó n S i m p l i f i c a c i ó n d e Q u i n e M c C l u s k e y al usuario se le
pasos:
354
l e c c i ó n y h a c e s c l i c k e n e l b o t ó n A c e p ta r .
c o m p u e r t a e s . S e l e c c i o n a l a q u e d e s e e s d a n d o c l i c s o b r e e lla,
forma se iluminó.
4 . E l n ú m e r o d e e n t r a da s d e u n a c o m p u e r t a l o p u e d e s c a m b i a r
crear tu circuito.
7.
360