document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. \' Gambas class file
  2.  
  3. Private vjug As New Intervalo
  4.  
  5. Private total_minutos_jugados As Integer = 360
  6.  
  7. Public Sub _new()
  8.  
  9. End
  10.  
  11. Public Sub Form_show()
  12.  
  13.   Dim j As Jugador
  14.  
  15.   j = New Delantero("Cristiano", 235, 14, 4)
  16.  
  17.   escribeValoracionJugador(j, total_minutos_jugados)
  18.  
  19.   j = New Portero("Iker", 360, 10, 2)
  20.  
  21.   escribeValoracionJugador(j, total_minutos_jugados)
  22.  
  23.   j = New Delantero("Mesi", 280, 13, 0)
  24.  
  25.   escribeValoracionJugador(j, total_minutos_jugados)
  26.  
  27.   j = New Portero("Victor Valdes", 360, 11, 6)
  28.  
  29.   escribeValoracionJugador(j, total_minutos_jugados)
  30.  
  31. End
  32.  
  33. Public Sub escribeValoracionJugador(j As Jugador, totalminutos As Integer)
  34.  
  35.   Print "El jugador " & j.getnombre() & " obtuvo una valoracion de " & j.calcularValoracion(total_minutos_jugados)
  36.  
  37. End
  38.  
  39. Public Sub Form_Open()
  40.  
  41. End
  42.  
  43. Public Sub ToolButton1_Click()
  44.  
  45.   Dim j As Jugador
  46.  
  47.   If RadioButtonDelantero.Value = True Then
  48.     j = New Delantero(TextBoxNombre.text, ValueBoxMinutosJugados.value, ValueBoxSalario.value, ValueBoxgolMarcado.value)
  49.   Else
  50.     j = New Portero(TextBoxNombre.text, ValueBoxMinutosJugados.value, ValueBoxSalario.value, ValueBoxgolEncajado.value)
  51.    
  52.   Endif
  53.  
  54.   Message.Info("El jugador " & j.getnombre() & " obtuvo una valoracion de " & j.calcularValoracion(total_minutos_jugados))
  55.  
  56. End
');