示例#1
0
        static void Main(string[] args)
        {
            Transaction t1 = new Transaction("001", "8/10/2012", 78900.00);
            Transaction t2 = new Transaction("002", "9/10/2012", 451900.00);

            t1.showTransaction();
            t2.showTransaction();

            #region Polymorphism using Interface

            System.Console.WriteLine(System.Environment.NewLine);

            IShape IShapeRec = new Rectangle();
            IShapeRec.Draw();

            IShape IShapeCir = new Circle();
            IShapeCir.Draw();

            IShape IShapeTri = new Triangle();
            IShapeTri.Draw();

            #endregion

            Console.ReadKey();
        }
示例#2
0
 static void Main(string[] args)
 {
     Transaction t1 = new Transaction("001", "8/10/2012", 78900.00);
     Transaction t2 = new Transaction("002", "9/10/2012", 451900.00);
     t1.showTransaction();
     t2.showTransaction();
     Console.ReadKey();
 }
示例#3
0
        static void Main(string[] args)
        {
            Transaction t1 = new Transaction("001", "2018/07/16", 200);
            Transaction t2 = new Transaction("004", "2018/07/20", 300);

            t1.showTransaction();
            t2.showTransaction();
            Console.ReadKey();
        }
示例#4
0
        static void Main(string[] args)
        {
            Transaction t1 = new Transaction("001", "8/10/2012", 78900.00);
            Transaction t2 = new Transaction("002", "9/10/2012", 451900.00);

            t1.showTransaction();
            t2.showTransaction();
            Console.ReadKey();
        }
示例#5
0
        static void Main(string[] args)
        {
            Transaction t1 = new Transaction("001", "8/10/2012", 78900.00);
             Transaction t2 = new Transaction("002", "9/10/2012", 451900.00);
             t1.showTransaction();
             t2.showTransaction();

             #region Polymorphism using Interface

              System.Console.WriteLine(System.Environment.NewLine);

              IShape IShapeRec = new Rectangle();
              IShapeRec.Draw();

              IShape IShapeCir = new Circle();
              IShapeCir.Draw();

              IShape IShapeTri = new Triangle();
              IShapeTri.Draw();

             #endregion

             Console.ReadKey();
        }