/** * */ package de.fhswf.in.inf.java1.aufgabe12; /** * A class that provides a main. * * @author $Author: $ * @version $Revision: $, $Date: $ UTC */ public final class UpnMain { /** * Private constructor for utility class. * */ private UpnMain() { } /** * Main entry point for the exercise 11. * * @param args * Command line arguments. */ public static void main(String[] args) { UPN test = new UPN(); try { test.calculate("5 3 - 2 * 10 9 - / 10 6 - 8 6 - 2 * / -"); System.out.println(test.getResult()); test.calculate("-3.1415 abs cos"); System.out.println(test.getResult()); } catch (IllegalArgumentException e) { System.err .println("UPN string encountered error: " + e.getMessage()); } } }