sexta-feira, 1 de março de 2013

Reflexão global

Neste módulo 9 abordamos o tema no que diz respeito ao "Ambiente de programação orientada por objectos", e foi trabalhado no programa"visual basic".

Contudo, neste módulo demos um grande avanço na programação, pois não só trabalhamos com o código em si, mas também com o “designer gráfico”, o que fez com que tudo se torna-se mais interessante para mim.
Eu gostei muito deste modulo.




Neste módulo 9 abordamos o tema no que diz respeito ao “Ambiente de Programação Orientada por Objetos)”, e foi trabalhado no programa “Visual Basic”.
Reflexão da ficha ->5

Eu escolhi este programa porque aprendi funções novas como por exemplo mathround, int(roun) entre outras, e foi por isso por causa das funções que eu meti este  programa
Ficha ->7
Parte Gráfica


Código

Public Class Form1

    Private Sub Label8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label8.Click

    End Sub

    Private Sub TextBox9_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox9.TextChanged

    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        TextBox9.Text = (Val(TextBox6.Text) + Val(TextBox7.Text) + Val(TextBox8.Text))
        TextBox14.Text = (Val(TextBox15.Text) + Val(TextBox16.Text) + Val(TextBox17.Text))
    End Sub

    Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click
        Dim x As Integer
        x = MsgBox("Quer mesmo sair?", MsgBoxStyle.Question + MsgBoxStyle.YesNo, "Exames")
        If x = vbYes Then
            Close()
        End If
    End Sub

    Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
        TextBox1.Text = ""
        TextBox2.Text = ""
        TextBox3.Text = ""
        TextBox4.Text = ""
        TextBox5.Text = ""
        TextBox6.Text = ""
        TextBox7.Text = ""
        TextBox8.Text = ""
        TextBox9.Text = ""
        TextBox10.Text = ""
        TextBox11.Text = ""
        TextBox12.Text = ""
        TextBox13.Text = ""
        TextBox14.Text = ""
        TextBox15.Text = ""
        TextBox16.Text = ""
        TextBox17.Text = ""
        TextBox6.Focus()

    End Sub

    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
        Dim maior, maior1 As Integer
        maior = Val(TextBox6.Text)

        If Val(TextBox7.Text) > maior Then
            maior = Val(TextBox7.Text)
        End If
        If Val(TextBox8.Text) > maior Then
            maior = Val(TextBox8.Text)
        End If
        TextBox10.Text = maior

        maior1 = Val(TextBox17.Text)
        If Val(TextBox16.Text) > maior1 Then
            maior1 = Val(TextBox16.Text)

        End If
        If Val(TextBox15.Text) > maior1 Then
            maior1 = Val(TextBox15.Text)
        End If
        TextBox13.Text = maior1

    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        Dim menor, menor1 As Integer
        menor = Val(TextBox6.Text)

        If Val(TextBox7.Text) < menor Then
            menor = Val(TextBox7.Text)
        End If
        If Val(TextBox8.Text) < menor Then
            menor = Val(TextBox8.Text)
        End If
        TextBox11.Text = menor

        menor1 = Val(TextBox17.Text)
        If Val(TextBox16.Text) < menor1 Then
            menor1 = Val(TextBox16.Text)

        End If
        If Val(TextBox15.Text) < menor1 Then
            menor1 = Val(TextBox15.Text)
        End If
        TextBox12.Text = menor1

    End Sub

    Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
        If TextBox9.Text >= 10 Then
            Label17.Text = "Aprovado"
        Else
            Label17.Text = "Reprovado"
        End If
        If TextBox14.Text >= 10 Then
            Label18.Text = "Aprovado"
        Else
            Label18.Text = "Reprovado"
        End If
        If TextBox9.Text >= 10 And TextBox11.Text >= 10 Then
            MsgBox("Parabéns!!! Está aprovado.", MsgBoxStyle.Exclamation + MsgBoxStyle.OkOnly, "Exames")
        End If
    End Sub

End Class



Ficha -> 6
Parte Gráfica


Código

Public Class Form1

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Label18.Text = (Val(TextBox1.Text) + Val(TextBox2.Text) + Val(TextBox3.Text) + Val(TextBox4.Text) + Val(TextBox5.Text) + Val(TextBox6.Text) + Val(TextBox7.Text) + Val(TextBox8.Text) + Val(TextBox9.Text) + Val(TextBox10.Text) + Val(TextBox11.Text) + Val(TextBox12.Text))
        Label19.Text = (Val(TextBox1.Text) + Val(TextBox2.Text) + Val(TextBox3.Text) + Val(TextBox4.Text) + Val(TextBox5.Text) + Val(TextBox6.Text) + Val(TextBox7.Text) + Val(TextBox8.Text) + Val(TextBox9.Text) + Val(TextBox10.Text) + Val(TextBox11.Text) + Val(TextBox12.Text)) / 12
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        Close()
    End Sub

    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
        Label18.Text = ""
        Label19.Text = ""
        TextBox1.Text = ""
        TextBox2.Text = ""
        TextBox3.Text = ""
        TextBox4.Text = ""
        TextBox5.Text = ""
        TextBox6.Text = ""
        TextBox7.Text = ""
        TextBox8.Text = ""
        TextBox9.Text = ""
        TextBox10.Text = ""
        TextBox11.Text = ""
        TextBox12.Text = ""
    End Sub
End Class