Zorbing

[Logik] DNF

Dec 6th, 2012
238
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.70 KB | None | 0 0
  1. package main;
  2.  
  3. public class DNF {
  4.  
  5.     /**
  6.      * @param args
  7.      */
  8.     public static void main(String[] args) {
  9.         if (args.length != 1) {
  10.             System.out.println("Falsche Anzahl an Parametern!");
  11.             return;
  12.         }
  13.  
  14.         String formel = args[0];
  15.         System.out.println(formel);
  16.        
  17.         // von der Formel die erste öffnende und die letze schließende Klammer entfernen
  18.         formel = formel.substring(1, formel.length() - 1);
  19.        
  20.         Formel ganzeFormel = new Formel(formel, false);
  21.        
  22.         System.out.println("Test:");
  23.         System.out.println(ganzeFormel.back());
  24.     }
  25.    
  26.     public static void wrongFormel() {
  27.         System.out.println("Die übergeben Formel entspricht nicht der vorgegebenen Grammatik!");
  28.         System.exit(0);
  29.     }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment