コード例 #1
0
ファイル: Counter.cs プロジェクト: 0916174/INFDEV
 public static void PlusClass(Counter counter1, Counter counter2)
 {
     int newcount;
     newcount = counter1.count + counter2.count;
     Counter NewCounter = new Counter();
     NewCounter.count = newcount;
 }
コード例 #2
0
ファイル: Program.cs プロジェクト: 0916174/INFDEV
        static void Main(string[] args)
        {
            Console.BufferHeight = Int16.MaxValue - 1;
            while (true)
            {
                Exercise0.Pogchamp();
                Exercise1.YourBike();
                Exercise2.Yes();
                Exercise3.HeIsReady();

                Interval interval = new Interval(7, 10);
                interval.Sum();
                interval.Product();
                IntArrayOpperations intarrayopperations = new IntArrayOpperations(new int[] { 2, 4, 8, 16 });
                intarrayopperations.Sum();
                intarrayopperations.Product();

                Console.WriteLine("Exercise 7\n");
                UserStory US1 = new UserStory(7, "Story1");
                UserStory US2 = new UserStory(8, "Story2");
                UserStory US3 = new UserStory(9, "Story3");
                Console.WriteLine(US1);
                Console.WriteLine(US2);
                Console.WriteLine(US3);
                Sprint sprint = new Sprint(new UserStory[]{ US1, US2, US3 });
                //UserStory.MakeThree();
                Console.WriteLine(sprint);
                Next.Run();

                Console.WriteLine("[[counter]]");
                Counter counter = new Counter();
                Console.WriteLine("[[counter2]]");
                Counter counter2 = new Counter();
                Console.WriteLine("[[counter]]");
                counter.Tick();
                counter.Tick();
                counter.Tick();
                counter.Tick();
                Console.WriteLine("[[counter2]]");
                counter2.Tick();
                counter2.Tick();
                counter2.Tick();
                Console.WriteLine("[[Counter.Plus(counter, counter2;)]]");
                Console.WriteLine(Counter.Plus(counter, counter2));
                Console.WriteLine("[[counter]]");
                counter.Reset();

                //Sprint sprint = new Sprint(new UserStory[] {f,g,h});

                Console.Write("Done. Press any key to go to the first assignment.");
                Console.ReadKey();
                Console.Clear();
            }
        }
コード例 #3
0
ファイル: Counter.cs プロジェクト: 0916174/INFDEV
 public static int Plus(Counter counter1, Counter counter2)
 {
     int newcount = counter1.count + counter2.count;
     return newcount;
 }