Advertisement
Fhernd

Rectangulo.cs

Nov 14th, 2017
1,106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.35 KB | None | 0 0
  1. public class Rectangulo : Figura
  2. {
  3.     private int ancho;
  4.     private int alto;
  5.    
  6.     public Rectangulo (int ancho, int alto, string idFigura) : base (idFigura)
  7.     {
  8.         this.ancho = ancho;
  9.         this.alto = alto;
  10.     }
  11.    
  12.     public override double Area
  13.     {
  14.         get
  15.         {
  16.             return ancho * alto;
  17.         }
  18.     }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement