예제 #1
0
        static void Main(string[] args)
        {
            RandomWordStream slowo = new RandomWordStream();

            Console.WriteLine("Randomowe slowa");

            Console.WriteLine(slowo.next());
            Console.WriteLine(slowo.next());
            Console.WriteLine(slowo.next());
            Console.WriteLine(slowo.next());

            PrimeStream prime = new PrimeStream();

            Console.WriteLine("\n\nPrimeStream:");
            Console.Write(prime.next() + " ");
            Console.Write(prime.next() + " ");
            Console.Write(prime.next() + " ");
            Console.Write(prime.next() + " \n\n");

            IntStream integers = new IntStream();

            Console.WriteLine("IntStream:");

            for (int i = 0; i < 20; i++)
            {
                Console.Write(integers.next() + ", ");
                if (i == 3)
                {
                    integers.reset();
                }
            }
        }
예제 #2
0
 public RandomWordStream()
 {
     primeStream   = new PrimeStream();
     randomStream  = new RandomStream();
     stringBuilder = new StringBuilder();
 }
예제 #3
0
 public RandomWordStream()
 {
     prime = new PrimeStream();
     rand  = new RandomStream();
 }
예제 #4
0
 public RandomWordStream()
 {
     prime  = new PrimeStream();
     random = new RandomStream();
     napis  = new StringBuilder();
 }