/** Die Klasse "TestInfixToPostfix" demonstriert die Konvertierung von
Infix-Strings in Postfix-Strings unter Verwendung der Klasse "INFIX"
**/

class TestInfixToPostfix {
	public static void main( String [] args ) {
		
		Infix infix = new Infix();
		
		// Ein paar Zeilen schreiben ...
		System.out.println( "Diese Klasse demonstriert die Konvertierung von mathematischen Ausdrücken" );
		System.out.println( "in Infix-Notation in Postfix-Notation." );
		System.out.println( );
		System.out.println( "Fabian Wleklinski 1999" );
		System.out.println( );
		
		String example_i = new String ();
		String example_p = new String ();
		
		example_i = ("(2 + 4) * (6 + 8)");
		example_p = infix.toPostfix( example_i );
		System.out.println( "  Beispiel 1: " + example_i + "\n     wird zu:     " + example_p );
		
		example_i = ("((2 + 4) * (6 + 8)) / 10");
		example_p = infix.toPostfix( example_i );
		System.out.println( "  Beispiel 2: " + example_i + "\n     wird zu:     " + example_p );
		
		example_i = ("2 / ((4 * 6) + 8)");
		example_p = infix.toPostfix( example_i );
		System.out.println( "  Beispiel 2: " + example_i + "\n     wird zu:     " + example_p );

				
	}
}