Ejercicio
Clase Círculo de Color
Objetivo
Amplíe el ejercicio del 10 de enero (formas + cuadrado), para que también pueda almacenar datos sobre "Círculos de colores":
Código
Imports System
Namespace shapes
Class ColoredCircle
Inherits Circle
Protected color As Integer
Public Sub New()
End Sub
Public Sub New(ByVal dX As Double, ByVal dY As Double, ByVal dRadius As Double, ByVal color As Integer)
Me.dX = dX
Me.dY = dY
Me.dRadius = dRadius
Me.color = color
End Sub
Public Sub Move()
End Sub
Public Sub Scale()
End Sub
Public Function ToString() As String
Return ""
End Function
Public Function GetColor() As Integer
Return 0
End Function
Public Sub SetColor(ByVal newColor As Integer)
color = newColor
End Sub
Public Overrides Function Area() As Double
Return 0
End Function
Public Overrides Function Perimeter() As Double
Return 0
End Function
End Class
End Namespace