Professional Documents
Culture Documents
TAF ABAGHOUGH Brahim
TAF ABAGHOUGH Brahim
Sous l’encadrement :
Mr.S.ELMADANI
Réaliser par :
ABAGHOUGH Brahim
EXERCICE 2 : application de gestion de météo
Module Module1
Structure saisie
Dim dat As Date
Dim température As Integer
Dim pluviométrie As Integer
End Structure
Public enrg(365) As saisie
Public col As New Collection
End Module
With enrg(j)
.dat = TextBox1.Text
.température = TextBox2.Text
.pluviométrie = TextBox3.Text
End With
Form2.ListBox1.Items.Clear()
col.Add(enrg)
j = j + 1
For i = 0 To j - 1
Form2.ListBox1.Items.Add(" date " & enrg(i).dat & " T(°C) " &
enrg(i).température & " Pulviométrie=" & enrg(i).pluviométrie)
Next
End Sub
BRAHIM ABAGHOUGH 2
Dim max As Integer = enrg(0).température
Dim datmax As Date = enrg(0).dat
For i = 0 To j - 1
If max < enrg(i).température Then
max = enrg(i).température
datmax = enrg(i).dat
End If
Next
Form3.TextBox2.Text = max
Form3.TextBox4.Text = datmax
For i = 0 To j - 1
s = s + Val(enrg(i).température)
If enrg(i).température < min Then
min = enrg(i).température
datmin = enrg(i).dat
End If
Next
Form3.TextBox1.Text = min
Form3.TextBox5.Text = datmin
Form3.TextBox3.Text = s / j
Form3.Show()
End Sub
BRAHIM ABAGHOUGH 3
Public Class Form2
BRAHIM ABAGHOUGH 4
EXERCICE 3 : Enregistrement des étudiants
Module Module1
Public Structure Etudiant
Dim nom As String
Dim prenom As String
Dim dateN As String
Dim sexe As String
Dim annébac As String
Dim specialité As String
Dim langues As String
End Structure
Public enrg(100) As Etudiant
Public col1 As New Collection
End Module
Public i As Integer = 0
Button: ajouter
BRAHIM ABAGHOUGH 5
Button: Nouveau
Button: quitter
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
End
End Sub
End Class
BRAHIM ABAGHOUGH 6