static void Main(string[] args) { Console.WriteLine("FIBO: " + fibo(20)); // List<int> newList = new List<int>(); Console.WriteLine("=====PERSON====: "); Person <string> p = new Person <string>("somepersonname"); p.Name = "ne.name"; Console.WriteLine(p.child); p.child = 2; Console.WriteLine(p.child); Console.WriteLine("My age before: " + p.Age); p.Age = 2; Console.WriteLine("My age after: " + p.Age); Console.WriteLine("Person name from accessors: " + p.Name); p.Alert(); Console.WriteLine("=====Shapes Inheritance + Abstract ====: "); aShape as1 = new aCircle("myshape"); Shape s1 = new Circle(); s1.Draw(); as1.Draw(); Console.WriteLine("=====Houses interface ====: "); House h1 = new House(200, "Db"); h1.rent(0); }
static void Main() { aPoint aPt = new aPoint(0, 0, 0); aRectang aRct = new aRectang(1, 2); aCircle aCir = new aCircle(2.1); Console.WriteLine("Test start: "); aPt.display(); aPt.getArea(aPt); aRct.getArea(aRct); aCir.getArea(aCir); }
static void Main() { aPoint aPt = new aPoint(0,0,0); aRectang aRct = new aRectang(1,2); aCircle aCir = new aCircle(2.1); Console.WriteLine("Test start: "); aPt.display(); aPt.getArea(aPt); aRct.getArea(aRct); aCir.getArea(aCir); }