Advertisement
Guest User

asd

a guest
Apr 19th, 2019
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.68 KB | None | 0 0
  1. import java.io.BufferedReader;
  2. import java.io.FileReader;
  3. import java.io.IOException;
  4. import java.io.InputStreamReader;
  5. public class p2
  6. {
  7.     public static void main(String[] args) throws IOException
  8.     {
  9.         BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
  10.         String input = reader.readLine();
  11.         while(input!=null)
  12.         {
  13.             System.out.println("The input is: "+input);
  14.             input = reader.readLine;
  15.         }
  16.     }
  17.  
  18.     interface Eval_Postfix_Expr
  19.     {
  20.         public ExpressionTree build_expression_tree(String input);
  21.         public String[] evaluate_expression_tree(ExpressionTree tree);
  22.     }
  23.  
  24.     public class Eval_Postfix_Expr_Implementation implements Eval_Postfix_Expr
  25.     {
  26.         String[] input;
  27.  
  28.         Eval_Postfix_Expr_Implementation(String str){
  29.             input = str.split(" ");
  30.         }
  31.  
  32.         @Override
  33.         public ExpressionTree build_expression_tree(String input) {
  34.             return new ExpressionTree(input, input.length());
  35.         }
  36.  
  37.         @Override
  38.         public String[] evaluate_expression_tree(ExpressionTree tree) {
  39.             return new String[0];
  40.         }
  41.  
  42.     }
  43.  
  44.     public class Node
  45.     {
  46.         String value;
  47.         Node right;
  48.         Node left;
  49.  
  50.         Node(String val){
  51.             value = val;
  52.             right = null;
  53.             left  = null;
  54.         }
  55.  
  56.         Node(){
  57.             value = null;
  58.         }
  59.     }
  60.  
  61.     public class ExpressionTree
  62.     {
  63.         Node root;
  64.  
  65.         ExpressionTree(){
  66.             root = new Node();
  67.         }
  68.  
  69.         ExpressionTree(String value, int str_length){
  70.            
  71.         }
  72.     }
  73. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement