-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.vb
More file actions
54 lines (47 loc) · 1.88 KB
/
main.vb
File metadata and controls
54 lines (47 loc) · 1.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
Module VBModule
Public Class Pessoa
Public Cpf As String
Public Nome As String
Public Sobrenome As String
Public Idade As Short
Public Sexo As Char
Public Camiseta As String
Public Sub New()
End Sub
Public Sub New(ByVal _cpf As String, ByVal _nome As String, ByVal _sobrenome As String, ByVal _idade As Short, ByVal _sexo As Char, ByVal _camiseta As String)
Me.Cpf = _cpf
Me.Nome = _nome
Me.Sobrenome = _sobrenome
Me.Idade = _idade
Me.Sexo = _sexo
Me.Camiseta = _camiseta
End Sub
End Class
Public Dim listaPessoas As New System.Collections.Generic.List(Of Pessoa)
Public Dim Tot_Inscricoes As Double
Public Dim Tot_Mensalidades As Double
Public Sub Cadastra_Nadador(ByVal _pessoa As Pessoa)
listaPessoas.Add(_pessoa)
Tot_Inscricoes += 15.00
Tot_Mensalidades += 100.00
End Sub
Public Sub Exibe_Nadadores()
For Each p As Pessoa In listaPessoas
Console.WriteLine("-----------------------------")
Console.WriteLine("Nome Cpl: " + p.Nome + " " + p.Sobrenome)
Console.WriteLine("CPF: " + p.Cpf)
Console.WriteLine("Idade: " & p.Idade)
Console.WriteLine("Sexo: " + p.Sexo)
Console.WriteLine("Tam. Camiseta: " + p.Camiseta)
Console.WriteLine("-----------------------------")
Next
End Sub
Sub Main()
Cadastra_Nadador(New Pessoa("04606668199", "Dorcilio", "Neto", 23, "M", "P"))
Cadastra_Nadador(New Pessoa("05994594952", "Jefferson", "Zandona", 31, "M", "GG"))
Cadastra_Nadador(New Pessoa("04985959598", "Raissa", "Gyus", 18, "F", "BLP"))
Exibe_Nadadores()
Console.WriteLine(Tot_Inscricoes)
Console.WriteLine(Tot_Mensalidades)
End Sub
End Module