예제 #1
0
      static void Main()
      {
          Computing computing = new Computing();

          Console.WriteLine("Addition:{0}", computing.Add(89, 67));
          Console.WriteLine(" Class Name:{0}", computing.GetName());
          IScientificCalculator s = new Computing();

          Console.WriteLine(s.CalcName());   // IScientificCalculator
          INormalCalculator r = new Computing();

          Console.WriteLine(r.CalcName());   // INormalCalculator
          Console.Read();
      }
예제 #2
0
        static void Main()
        {
            Computing computing = new Computing();

            Console.WriteLine("Addition:{0}", computing.Add(45, 99));
            Console.WriteLine("Class:{0}", computing.Getname());
            INormalCalculator N = new Computing();

            Console.WriteLine(N.CalcName());
            IScientificCalculator S = new Computing();

            Console.WriteLine(S.CalcName());
            Console.Read();
        }
        static void Main()
        {
            Computing computing = new Computing();

            Console.WriteLine("adition is {0}", computing.Add(9, 7));
            Console.WriteLine("class name {0}", computing.GetName());
            IscientificCalculator s = new Computing();

            Console.WriteLine(s.CalcName());
            INormalCalculator r = new Computing();

            Console.WriteLine(r.CalcName());

            Console.Read();
        }
예제 #4
0
        static void Main()
        {
            Computing computing = new Computing();

            Console.WriteLine("Addition {0}", computing.Add(75, 45));
            Console.WriteLine("classname {0}", computing.Getname());

            /// object creation through the interfaces to acces calcname which is present in both inormal and iscientific calculator
            IScientificcalculator objs = new Computing();

            Console.WriteLine(objs.CalcName());
            INormalCalculator objn = new Computing();

            Console.WriteLine(objn.CalcName());

            Console.Read();
        }