Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.io.BufferedReader;
- import java.io.FileReader;
- import java.io.IOException;
- import java.io.InputStreamReader;
- public class p2
- {
- public static void main(String[] args) throws IOException
- {
- BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
- String input = reader.readLine();
- while(input!=null)
- {
- System.out.println("The input is: "+input);
- input = reader.readLine;
- }
- }
- interface Eval_Postfix_Expr
- {
- public ExpressionTree build_expression_tree(String input);
- public String[] evaluate_expression_tree(ExpressionTree tree);
- }
- public class Eval_Postfix_Expr_Implementation implements Eval_Postfix_Expr
- {
- String[] input;
- Eval_Postfix_Expr_Implementation(String str){
- input = str.split(" ");
- }
- @Override
- public ExpressionTree build_expression_tree(String input) {
- return new ExpressionTree(input, input.length());
- }
- @Override
- public String[] evaluate_expression_tree(ExpressionTree tree) {
- return new String[0];
- }
- }
- public class Node
- {
- String value;
- Node right;
- Node left;
- Node(String val){
- value = val;
- right = null;
- left = null;
- }
- Node(){
- value = null;
- }
- }
- public class ExpressionTree
- {
- Node root;
- ExpressionTree(){
- root = new Node();
- }
- ExpressionTree(String value, int str_length){
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement