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();
 }
 public RandomWordStream()
 {
     prime = new PrimeStream();
     rand  = new RandomStream();
 }
示例#4
0
 public RandomWordStream()
 {
     prime  = new PrimeStream();
     random = new RandomStream();
     napis  = new StringBuilder();
 }