public static void Main(string[] args) { Console.WriteLine("\nIntStream"); IntStream inst = new IntStream(); Console.WriteLine(inst.next1()); Console.WriteLine(inst.next1()); Console.WriteLine(inst.next1()); Console.WriteLine(inst.next1()); Console.WriteLine(inst.eos()); inst.reset(); Console.WriteLine(inst.next1()); Console.WriteLine("\nPrimeStream"); PrimeStream ps = new PrimeStream(); Console.WriteLine(ps.next1()); Console.WriteLine(ps.next1()); Console.WriteLine(ps.next1()); Console.WriteLine(ps.next1()); Console.WriteLine(ps.eos()); ps.reset(); Console.WriteLine(ps.next1()); Console.WriteLine("\nRandomStream"); RandomStream rs = new RandomStream(); Console.WriteLine(rs.next1()); Console.WriteLine(rs.next1()); Console.WriteLine(rs.next1()); Console.WriteLine(rs.next1()); Console.WriteLine(rs.eos()); rs.reset(); Console.WriteLine(rs.next1()); Console.WriteLine("\nRandomWordStream"); RandomWordStream rws = new RandomWordStream(); Console.WriteLine(rws.next()); Console.WriteLine(rws.next()); Console.WriteLine(rws.next()); Console.WriteLine(rws.next()); Console.WriteLine(rws.eos()); rws.reset(); Console.WriteLine(rws.next()); Console.ReadKey(); }
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()); }