Advertisement
jsbsan

tv

Jan 2nd, 2014
1,572
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
GAMBAS 1.19 KB | None | 0 0
  1. ' Gambas class file
  2.  
  3. Property marca As String
  4.  
  5. Private hmarca As String
  6.  
  7. Property pulgadas As Integer
  8. Private hpulgadas As Integer
  9.  
  10. Property colores As String
  11.  
  12. Private hcolores As String
  13.  
  14. Property precio As String
  15. Private hprecio As Float
  16.  
  17. Public Sub _new(m As String, pul As Integer, c As String, pre As Float)
  18.  
  19.   Me.marca = m
  20.   Me.pulgadas = pul
  21.   Me.precio = pre
  22.   Me.colores = c
  23.  
  24. End
  25.  
  26. Public Function clone() As Tv
  27.   'creo una copia de mi mismo con mis datos y la retorno
  28.  
  29.   Dim tvtemp As New Tv(hmarca, hpulgadas, hcolores, hprecio)
  30.  
  31.   Return tvtemp
  32.  
  33. End
  34.  
  35. Private Function marca_Read() As String
  36.  
  37.   Return hmarca
  38.  
  39. End
  40.  
  41. Private Sub marca_Write(Value As String)
  42.  
  43.   hmarca = value
  44.  
  45. End
  46.  
  47. Private Function pulgadas_Read() As Integer
  48.  
  49.   Return hpulgadas
  50.  
  51. End
  52.  
  53. Private Sub pulgadas_Write(Value As Integer)
  54.  
  55.   hpulgadas = value
  56.  
  57. End
  58.  
  59. Private Function precio_Read() As String
  60.  
  61.   Return hprecio
  62.  
  63. End
  64.  
  65. Private Sub precio_Write(Value As String)
  66.  
  67.   hprecio = value
  68.  
  69. End
  70.  
  71. Private Function colores_Read() As String
  72.  
  73.   Return hcolores
  74.  
  75. End
  76.  
  77. Private Sub colores_Write(Value As String)
  78.  
  79.   hcolores = value
  80.  
  81. End
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement