Estoy tratando de interiorizarme en las clases y la programación orientada a objetos.
El tanteador es un programa interesante de iniciación, pero es un desastre su código y muy enredado.
quiero hacer algo mas profesional y correcto
entonces bien lo que necesito es manejar casi todo con clases pero necesito un esquema general de como funcionaria.
algunas cosas que se me ocurren es:
un jugador seria una clase u objeto:
nombre, apellido, país, etc
otra clase seria partido que se encargaría de todos los datos de un partido.
con dos clases jugadores
otra clase la organización de un grupo con 3,4 o 5 clases jugadores.
me podrían ayudar a esquematizar y armar un esquema por donde empezar?
estoy razonando bien?
que otras clases podría necesitar?
editado1:
la clase jugador seria esta:
Export
Property Nombre As String
Property Apellido As String
Private XNombre As String
Private XApellido As String
Private Function Nombre_Read() As String
Return XNombre
End
Private Sub Nombre_Write(Value As String)
XNombre = Value
End
Private Function Apellido_Read() As String
Return XApellido
End
Private Sub Apellido_Write(Value As String)
XApellido = Value
End
Property Nombre As String
Property Apellido As String
Private XNombre As String
Private XApellido As String
Private Function Nombre_Read() As String
Return XNombre
End
Private Sub Nombre_Write(Value As String)
XNombre = Value
End
Private Function Apellido_Read() As String
Return XApellido
End
Private Sub Apellido_Write(Value As String)
XApellido = Value
End
y la clase partido esta aunque no entiendo como leo en la clase partido las clases jugadores
' gambas class file
Export
Property J1 As Jugador
Property J2 As Jugador
Private byServicioInicio As Byte
Public Sub _new(ServInicio As Byte)
byServicioInicio = ServInicio
End
Private Function J1_Read() As Jugador
End
Private Sub J1_Write(Value As Jugador)
End
Private Function J2_Read() As Jugador
End
Private Sub J2_Write(Value As Jugador)
End
Property J1 As Jugador
Property J2 As Jugador
Private byServicioInicio As Byte
Public Sub _new(ServInicio As Byte)
byServicioInicio = ServInicio
End
Private Function J1_Read() As Jugador
End
Private Sub J1_Write(Value As Jugador)
End
Private Function J2_Read() As Jugador
End
Private Sub J2_Write(Value As Jugador)
End