Ejercicio
Clase Formas
Objetivo
Con Visual Studio, cree un proyecto y las clases correspondientes (con varios archivos) para este diagrama de clases.
Código
Imports System
Namespace shapes
Class Circle
Inherits Shape
Protected radius As Double
End Class
End Namespace
Namespace shapes
Class Location
Private x, y As Double
End Class
End Namespace
Namespace shapes
Class Rectangle
Inherits Shape
Protected side1, side2 As Double
End Class
End Namespace
Namespace shapes
Class Shape
Protected c As Location
Public Function ToString() As String
Return ""
End Function
Public Function Area() As Double
Return 0.000
End Function
Public Function Perimeter() As Double
Return 0.000
End Function
End Class
End Namespace
Namespace shapes
Class TestShape
Private Shared Sub Main(ByVal args As String())
End Sub
End Class
End Namespace