Esempio n. 1
0
        public static void Main(string[] args)
        {
            IntStream intS = new IntStream();

            Console.WriteLine("Int stream: ");
            Console.WriteLine(intS.next());
            Console.WriteLine(intS.next());
            Console.WriteLine(intS.next());
            Console.WriteLine(intS.eos());
            intS.reset();
            Console.WriteLine(intS.next());
            Console.WriteLine("Prime stream: ");
            PrimeStream primeS = new PrimeStream();

            Console.WriteLine(primeS.next());
            Console.WriteLine(primeS.next());
            Console.WriteLine(primeS.next());
            Console.WriteLine(primeS.eos());
            primeS.reset();
            Console.WriteLine(primeS.next());
            RandomStream randomS = new RandomStream();

            Console.WriteLine("Random stream: ");
            Console.WriteLine(randomS.next());
            Console.WriteLine(randomS.next());
            Console.WriteLine(randomS.next());
            Console.WriteLine(randomS.eos());
            primeS.reset();
            Console.WriteLine(randomS.next());
            RandomWordStream rws = new RandomWordStream();

            Console.WriteLine("Random Word Stream: ");
            Console.WriteLine(rws.next());
            Console.WriteLine(rws.next());
            Console.WriteLine(rws.next());
            Console.WriteLine(rws.next());
        }
Esempio n. 2
0
 public RandomWordStream()
 {
     length = new IntStream();
     length.next();
     rnd = new RandomStream();
 }
Esempio n. 3
0
 public RandomWordStream()
 {
     pStream = new PrimeStream();
     rand    = new RandomStream();
 }
Esempio n. 4
0
 public RandomWordStream()
 {
     prime   = new PrimeStream();
     random  = new RandomStream();
     current = "";
 }
Esempio n. 5
0
 public RandomWordStream()
 {
     liczba_pierwsza = new PrimeStream();
     liczba_losowa   = new RandomStream();
 }