SlideShare una empresa de Scribd logo
1 de 2
Laboratory Activity 3 (Batch 2)

Multiplication Program




Public Class Form1
    Private num1 As Integer
    Private num2 As Integer
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
        GenerateRandomQuestion()

    End Sub
    Sub GenerateRandomQuestion()
        Dim objRandom As Random = New Random()

         num1 = objRandom.Next(1, 10)
         num2 = objRandom.Next(1, 10)

        Label4.Text = "How much is " & num1 & " times " & num2 & "?"
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button2.Click
        GenerateRandomQuestion()
        Label3.Text = " "
        TextBox1.Clear()

         'disable New Question button
         Button2.Enabled = False

         'enable verify button
         Button1.Enabled = True

    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button1.Click
        Dim prod As Integer

         prod = TextBox1.Text

         If (num1 * num2) = prod Then
             Label3.Text = "You Got the correct answer!!"
'disable Verify button
            Button1.Enabled = False

            'enable Next Question button
            Button2.Enabled = True
        Else
            Label3.Text = "Please Try Again"


        End If
    End Sub
End Class

Más contenido relacionado

La actualidad más candente

PROGRAMA DE EJEMPLO
PROGRAMA DE EJEMPLOPROGRAMA DE EJEMPLO
PROGRAMA DE EJEMPLOmhormech
 
Latihan visual basic 2010/Looping/Perulangan
Latihan visual basic 2010/Looping/PerulanganLatihan visual basic 2010/Looping/Perulangan
Latihan visual basic 2010/Looping/PerulanganNurul Arhaiyyu
 
Ordenara los vectores
Ordenara los vectoresOrdenara los vectores
Ordenara los vectoresIsrael JD
 
Ordenar vector
Ordenar vectorOrdenar vector
Ordenar vectorecasteloc
 
Código Editor Net
Código Editor NetCódigo Editor Net
Código Editor Netcymbron
 
Java eventhandling
Java eventhandlingJava eventhandling
Java eventhandlingArati Gadgil
 
Código Opção Substituir
Código Opção SubstituirCódigo Opção Substituir
Código Opção Substituircymbron
 
Adding a action listener to button
Adding a action listener to buttonAdding a action listener to button
Adding a action listener to buttonyugandhar vadlamudi
 
Elementos del lenguaje
Elementos del lenguajeElementos del lenguaje
Elementos del lenguajeguest6473b8
 
Chapter 11.5
Chapter 11.5Chapter 11.5
Chapter 11.5sotlsoc
 
Java Event Handling
Java Event HandlingJava Event Handling
Java Event HandlingShraddha
 
JAVA GUI PART III
JAVA GUI PART IIIJAVA GUI PART III
JAVA GUI PART IIIOXUS 20
 
Event Handling in java
Event Handling in javaEvent Handling in java
Event Handling in javaGoogle
 
Advance Java Programming(CM5I) Event handling
Advance Java Programming(CM5I) Event handlingAdvance Java Programming(CM5I) Event handling
Advance Java Programming(CM5I) Event handlingPayal Dungarwal
 

La actualidad más candente (19)

PROGRAMA DE EJEMPLO
PROGRAMA DE EJEMPLOPROGRAMA DE EJEMPLO
PROGRAMA DE EJEMPLO
 
Latihan visual basic 2010/Looping/Perulangan
Latihan visual basic 2010/Looping/PerulanganLatihan visual basic 2010/Looping/Perulangan
Latihan visual basic 2010/Looping/Perulangan
 
Ordenara los vectores
Ordenara los vectoresOrdenara los vectores
Ordenara los vectores
 
Trabajo de case
Trabajo de caseTrabajo de case
Trabajo de case
 
Ordenar vector
Ordenar vectorOrdenar vector
Ordenar vector
 
Código Editor Net
Código Editor NetCódigo Editor Net
Código Editor Net
 
Java eventhandling
Java eventhandlingJava eventhandling
Java eventhandling
 
Event handling in Java(part 2)
Event handling in Java(part 2)Event handling in Java(part 2)
Event handling in Java(part 2)
 
Código Opção Substituir
Código Opção SubstituirCódigo Opção Substituir
Código Opção Substituir
 
Adding a action listener to button
Adding a action listener to buttonAdding a action listener to button
Adding a action listener to button
 
Event handling in Java(part 1)
Event handling in Java(part 1)Event handling in Java(part 1)
Event handling in Java(part 1)
 
Elementos del lenguaje
Elementos del lenguajeElementos del lenguaje
Elementos del lenguaje
 
Chapter 11.5
Chapter 11.5Chapter 11.5
Chapter 11.5
 
New features in 3.0
New features in 3.0New features in 3.0
New features in 3.0
 
Java Event Handling
Java Event HandlingJava Event Handling
Java Event Handling
 
JAVA GUI PART III
JAVA GUI PART IIIJAVA GUI PART III
JAVA GUI PART III
 
Event Handling in java
Event Handling in javaEvent Handling in java
Event Handling in java
 
Advance Java Programming(CM5I) Event handling
Advance Java Programming(CM5I) Event handlingAdvance Java Programming(CM5I) Event handling
Advance Java Programming(CM5I) Event handling
 
Event handling
Event handlingEvent handling
Event handling
 

Destacado

SE - Software Requirements
SE - Software RequirementsSE - Software Requirements
SE - Software RequirementsJomel Penalba
 
Introducing start mybusiness123 2011 09 05
Introducing start mybusiness123 2011 09 05Introducing start mybusiness123 2011 09 05
Introducing start mybusiness123 2011 09 05ValalkozasIndito
 
Escala salarial empleados de comercio Abril-Agosto 2014
Escala salarial empleados de comercio Abril-Agosto 2014Escala salarial empleados de comercio Abril-Agosto 2014
Escala salarial empleados de comercio Abril-Agosto 2014Ignacio Barrios
 
Enterprise Git Adoption Webinar - German
Enterprise Git Adoption Webinar - GermanEnterprise Git Adoption Webinar - German
Enterprise Git Adoption Webinar - GermanCollabNet
 
Water Junior sumitt Stresa
Water Junior sumitt StresaWater Junior sumitt Stresa
Water Junior sumitt StresaMaria Bostenaru
 
2010 FNA csiebert Urbanizacao de Risco
2010 FNA csiebert Urbanizacao de Risco2010 FNA csiebert Urbanizacao de Risco
2010 FNA csiebert Urbanizacao de RiscoClaudia Siebert
 
Augmented Reality: From Marketing Buzzword To A Better Consumer Experience
Augmented Reality: From Marketing Buzzword To A Better Consumer ExperienceAugmented Reality: From Marketing Buzzword To A Better Consumer Experience
Augmented Reality: From Marketing Buzzword To A Better Consumer ExperienceZugara
 
Architecture and urban planning (3 d) representation
Architecture and urban planning (3 d) representationArchitecture and urban planning (3 d) representation
Architecture and urban planning (3 d) representationMaria Bostenaru
 
Amexco kundenanlass 111122 version3
Amexco kundenanlass 111122 version3Amexco kundenanlass 111122 version3
Amexco kundenanlass 111122 version3Travelbrain GmbH
 
UrbanDenoiser Player (JA)
UrbanDenoiser Player (JA)UrbanDenoiser Player (JA)
UrbanDenoiser Player (JA)ITFORYOU CORP.
 
Games and Labour, Dr Gordon Fletcher
Games and Labour, Dr Gordon FletcherGames and Labour, Dr Gordon Fletcher
Games and Labour, Dr Gordon FletcherUniversity of Salford
 
Sec year in review 2012 fr
Sec year in review   2012 frSec year in review   2012 fr
Sec year in review 2012 frLesley Anderson
 
RVC 2012 : Les marchés principaux sont-ils à bout de souffle? France
RVC 2012 :  Les marchés principaux sont-ils à bout de souffle? FranceRVC 2012 :  Les marchés principaux sont-ils à bout de souffle? France
RVC 2012 : Les marchés principaux sont-ils à bout de souffle? FranceDestination Canada
 
Sainsbury Outdoor Lighting Project with GE - Sainsbury’s Великобритания, Нару...
Sainsbury Outdoor Lighting Project with GE - Sainsbury’s Великобритания, Нару...Sainsbury Outdoor Lighting Project with GE - Sainsbury’s Великобритания, Нару...
Sainsbury Outdoor Lighting Project with GE - Sainsbury’s Великобритания, Нару...GE Lighting Europe
 
Fotografia de animales
Fotografia de animalesFotografia de animales
Fotografia de animalessamasada
 

Destacado (20)

SE - Software Requirements
SE - Software RequirementsSE - Software Requirements
SE - Software Requirements
 
Introducing start mybusiness123 2011 09 05
Introducing start mybusiness123 2011 09 05Introducing start mybusiness123 2011 09 05
Introducing start mybusiness123 2011 09 05
 
Escala salarial empleados de comercio Abril-Agosto 2014
Escala salarial empleados de comercio Abril-Agosto 2014Escala salarial empleados de comercio Abril-Agosto 2014
Escala salarial empleados de comercio Abril-Agosto 2014
 
INTERNATIONAL INDEXED REFEREED RESEARCH PAPER
INTERNATIONAL INDEXED REFEREED RESEARCH PAPERINTERNATIONAL INDEXED REFEREED RESEARCH PAPER
INTERNATIONAL INDEXED REFEREED RESEARCH PAPER
 
Enterprise Git Adoption Webinar - German
Enterprise Git Adoption Webinar - GermanEnterprise Git Adoption Webinar - German
Enterprise Git Adoption Webinar - German
 
Water Junior sumitt Stresa
Water Junior sumitt StresaWater Junior sumitt Stresa
Water Junior sumitt Stresa
 
5-Cm11
5-Cm115-Cm11
5-Cm11
 
2010 FNA csiebert Urbanizacao de Risco
2010 FNA csiebert Urbanizacao de Risco2010 FNA csiebert Urbanizacao de Risco
2010 FNA csiebert Urbanizacao de Risco
 
Augmented Reality: From Marketing Buzzword To A Better Consumer Experience
Augmented Reality: From Marketing Buzzword To A Better Consumer ExperienceAugmented Reality: From Marketing Buzzword To A Better Consumer Experience
Augmented Reality: From Marketing Buzzword To A Better Consumer Experience
 
Architecture and urban planning (3 d) representation
Architecture and urban planning (3 d) representationArchitecture and urban planning (3 d) representation
Architecture and urban planning (3 d) representation
 
Amexco kundenanlass 111122 version3
Amexco kundenanlass 111122 version3Amexco kundenanlass 111122 version3
Amexco kundenanlass 111122 version3
 
UrbanDenoiser Player (JA)
UrbanDenoiser Player (JA)UrbanDenoiser Player (JA)
UrbanDenoiser Player (JA)
 
Games and Labour, Dr Gordon Fletcher
Games and Labour, Dr Gordon FletcherGames and Labour, Dr Gordon Fletcher
Games and Labour, Dr Gordon Fletcher
 
Sentencias Control Java
Sentencias Control JavaSentencias Control Java
Sentencias Control Java
 
Business hardware
Business hardwareBusiness hardware
Business hardware
 
Sec year in review 2012 fr
Sec year in review   2012 frSec year in review   2012 fr
Sec year in review 2012 fr
 
COST Madrid
COST MadridCOST Madrid
COST Madrid
 
RVC 2012 : Les marchés principaux sont-ils à bout de souffle? France
RVC 2012 :  Les marchés principaux sont-ils à bout de souffle? FranceRVC 2012 :  Les marchés principaux sont-ils à bout de souffle? France
RVC 2012 : Les marchés principaux sont-ils à bout de souffle? France
 
Sainsbury Outdoor Lighting Project with GE - Sainsbury’s Великобритания, Нару...
Sainsbury Outdoor Lighting Project with GE - Sainsbury’s Великобритания, Нару...Sainsbury Outdoor Lighting Project with GE - Sainsbury’s Великобритания, Нару...
Sainsbury Outdoor Lighting Project with GE - Sainsbury’s Великобритания, Нару...
 
Fotografia de animales
Fotografia de animalesFotografia de animales
Fotografia de animales
 

Similar a Laboratory activity 3 b2

Laboratory activity 3 b1
Laboratory activity 3 b1Laboratory activity 3 b1
Laboratory activity 3 b1Jomel Penalba
 
Ejercicio de Visual Basic IF THEN ELSE
Ejercicio de Visual Basic IF THEN ELSEEjercicio de Visual Basic IF THEN ELSE
Ejercicio de Visual Basic IF THEN ELSERicardoGuti50
 
Parra maxi IF THEN ELSE
Parra maxi IF THEN ELSEParra maxi IF THEN ELSE
Parra maxi IF THEN ELSEgabo2200
 
Christian rodriguez then else
Christian rodriguez then   elseChristian rodriguez then   else
Christian rodriguez then elsegabo2200
 
Federico landinez docx
Federico landinez docxFederico landinez docx
Federico landinez docxgabo2200
 
Federico landinez docx
Federico landinez docxFederico landinez docx
Federico landinez docxgabo2200
 
Guevara rene if then., else
Guevara rene  if then., elseGuevara rene  if then., else
Guevara rene if then., elsegabo2200
 
Federico landinez docx
Federico landinez docxFederico landinez docx
Federico landinez docxgabo2200
 
Inventory management
Inventory managementInventory management
Inventory managementRajeev Sharan
 
1. Determine the output displayed when the button is clicked.Priva.docx
1. Determine the output displayed when the button is clicked.Priva.docx1. Determine the output displayed when the button is clicked.Priva.docx
1. Determine the output displayed when the button is clicked.Priva.docxcorbing9ttj
 
1. Determine the output displayed when the button is clicked. Priv.docx
1. Determine the output displayed when the button is clicked. Priv.docx1. Determine the output displayed when the button is clicked. Priv.docx
1. Determine the output displayed when the button is clicked. Priv.docxcorbing9ttj
 
PROGRAMMING USING C#.NET SARASWATHI RAMALINGAM
PROGRAMMING USING C#.NET SARASWATHI RAMALINGAMPROGRAMMING USING C#.NET SARASWATHI RAMALINGAM
PROGRAMMING USING C#.NET SARASWATHI RAMALINGAMSaraswathiRamalingam
 
Practica porfe agustin eliminar y grabar
Practica porfe agustin eliminar y grabarPractica porfe agustin eliminar y grabar
Practica porfe agustin eliminar y grabarYosselin Marquez
 

Similar a Laboratory activity 3 b2 (20)

Trabajo de case
Trabajo de caseTrabajo de case
Trabajo de case
 
Laboratory activity 3 b1
Laboratory activity 3 b1Laboratory activity 3 b1
Laboratory activity 3 b1
 
Ejercicio de Visual Basic IF THEN ELSE
Ejercicio de Visual Basic IF THEN ELSEEjercicio de Visual Basic IF THEN ELSE
Ejercicio de Visual Basic IF THEN ELSE
 
.net progrmming part4
.net progrmming part4.net progrmming part4
.net progrmming part4
 
Colegio municipal
Colegio municipalColegio municipal
Colegio municipal
 
Parra maxi IF THEN ELSE
Parra maxi IF THEN ELSEParra maxi IF THEN ELSE
Parra maxi IF THEN ELSE
 
Christian rodriguez then else
Christian rodriguez then   elseChristian rodriguez then   else
Christian rodriguez then else
 
Federico landinez docx
Federico landinez docxFederico landinez docx
Federico landinez docx
 
Federico landinez docx
Federico landinez docxFederico landinez docx
Federico landinez docx
 
Guevara rene if then., else
Guevara rene  if then., elseGuevara rene  if then., else
Guevara rene if then., else
 
Federico landinez docx
Federico landinez docxFederico landinez docx
Federico landinez docx
 
Inventory management
Inventory managementInventory management
Inventory management
 
Ete programs
Ete programsEte programs
Ete programs
 
Calculator code
Calculator codeCalculator code
Calculator code
 
1. Determine the output displayed when the button is clicked.Priva.docx
1. Determine the output displayed when the button is clicked.Priva.docx1. Determine the output displayed when the button is clicked.Priva.docx
1. Determine the output displayed when the button is clicked.Priva.docx
 
1. Determine the output displayed when the button is clicked. Priv.docx
1. Determine the output displayed when the button is clicked. Priv.docx1. Determine the output displayed when the button is clicked. Priv.docx
1. Determine the output displayed when the button is clicked. Priv.docx
 
Database connectivity with data reader by varun tiwari
Database connectivity with data reader by varun tiwariDatabase connectivity with data reader by varun tiwari
Database connectivity with data reader by varun tiwari
 
Andres y keitleen
Andres y keitleenAndres y keitleen
Andres y keitleen
 
PROGRAMMING USING C#.NET SARASWATHI RAMALINGAM
PROGRAMMING USING C#.NET SARASWATHI RAMALINGAMPROGRAMMING USING C#.NET SARASWATHI RAMALINGAM
PROGRAMMING USING C#.NET SARASWATHI RAMALINGAM
 
Practica porfe agustin eliminar y grabar
Practica porfe agustin eliminar y grabarPractica porfe agustin eliminar y grabar
Practica porfe agustin eliminar y grabar
 

Más de Jomel Penalba

Requirements Engineering Process
Requirements Engineering ProcessRequirements Engineering Process
Requirements Engineering ProcessJomel Penalba
 
Copy of business hardware
Copy of business hardwareCopy of business hardware
Copy of business hardwareJomel Penalba
 
Business functions and supply chains
Business functions and supply chainsBusiness functions and supply chains
Business functions and supply chainsJomel Penalba
 
Ch5 - Project Management
Ch5 - Project ManagementCh5 - Project Management
Ch5 - Project ManagementJomel Penalba
 
Laboratory activity 3 b3
Laboratory activity 3 b3Laboratory activity 3 b3
Laboratory activity 3 b3Jomel Penalba
 
Software process models
Software process modelsSoftware process models
Software process modelsJomel Penalba
 
05 control structures 2
05 control structures 205 control structures 2
05 control structures 2Jomel Penalba
 
04 control structures 1
04 control structures 104 control structures 1
04 control structures 1Jomel Penalba
 
03 intro to vb programming
03 intro to vb programming03 intro to vb programming
03 intro to vb programmingJomel Penalba
 
02 intro to vb-net ide
02 intro to vb-net ide02 intro to vb-net ide
02 intro to vb-net ideJomel Penalba
 
Soft Eng - Software Process
Soft  Eng - Software ProcessSoft  Eng - Software Process
Soft Eng - Software ProcessJomel Penalba
 
Soft Eng - Introduction
Soft Eng - IntroductionSoft Eng - Introduction
Soft Eng - IntroductionJomel Penalba
 
Planning Your Multimedia Web Site
Planning Your Multimedia Web SitePlanning Your Multimedia Web Site
Planning Your Multimedia Web SiteJomel Penalba
 
Introduction To Multimedia
Introduction To MultimediaIntroduction To Multimedia
Introduction To MultimediaJomel Penalba
 

Más de Jomel Penalba (20)

SE - System Models
SE - System ModelsSE - System Models
SE - System Models
 
Requirements Engineering Process
Requirements Engineering ProcessRequirements Engineering Process
Requirements Engineering Process
 
Copy of business hardware
Copy of business hardwareCopy of business hardware
Copy of business hardware
 
Crm
CrmCrm
Crm
 
Chapter 1
Chapter 1Chapter 1
Chapter 1
 
Business functions and supply chains
Business functions and supply chainsBusiness functions and supply chains
Business functions and supply chains
 
12 gui concepts 1
12 gui concepts 112 gui concepts 1
12 gui concepts 1
 
Ch5 - Project Management
Ch5 - Project ManagementCh5 - Project Management
Ch5 - Project Management
 
Laboratory activity 3 b3
Laboratory activity 3 b3Laboratory activity 3 b3
Laboratory activity 3 b3
 
06 procedures
06 procedures06 procedures
06 procedures
 
Software process models
Software process modelsSoftware process models
Software process models
 
05 control structures 2
05 control structures 205 control structures 2
05 control structures 2
 
04 control structures 1
04 control structures 104 control structures 1
04 control structures 1
 
03 intro to vb programming
03 intro to vb programming03 intro to vb programming
03 intro to vb programming
 
02 intro to vb-net ide
02 intro to vb-net ide02 intro to vb-net ide
02 intro to vb-net ide
 
01 intro to vb-net
01 intro to vb-net01 intro to vb-net
01 intro to vb-net
 
Soft Eng - Software Process
Soft  Eng - Software ProcessSoft  Eng - Software Process
Soft Eng - Software Process
 
Soft Eng - Introduction
Soft Eng - IntroductionSoft Eng - Introduction
Soft Eng - Introduction
 
Planning Your Multimedia Web Site
Planning Your Multimedia Web SitePlanning Your Multimedia Web Site
Planning Your Multimedia Web Site
 
Introduction To Multimedia
Introduction To MultimediaIntroduction To Multimedia
Introduction To Multimedia
 

Laboratory activity 3 b2

  • 1. Laboratory Activity 3 (Batch 2) Multiplication Program Public Class Form1 Private num1 As Integer Private num2 As Integer Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load GenerateRandomQuestion() End Sub Sub GenerateRandomQuestion() Dim objRandom As Random = New Random() num1 = objRandom.Next(1, 10) num2 = objRandom.Next(1, 10) Label4.Text = "How much is " & num1 & " times " & num2 & "?" End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click GenerateRandomQuestion() Label3.Text = " " TextBox1.Clear() 'disable New Question button Button2.Enabled = False 'enable verify button Button1.Enabled = True End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim prod As Integer prod = TextBox1.Text If (num1 * num2) = prod Then Label3.Text = "You Got the correct answer!!"
  • 2. 'disable Verify button Button1.Enabled = False 'enable Next Question button Button2.Enabled = True Else Label3.Text = "Please Try Again" End If End Sub End Class