From 1bec4b545a2630ed0621ef8e60239f038ae564c8 Mon Sep 17 00:00:00 2001 From: Sh18RW Date: Tue, 3 Dec 2024 18:41:04 +0300 Subject: [PATCH] Remove code from App.java. --- src/main/java/ru/corvinella/App.java | 29 ++-------------------------- 1 file changed, 2 insertions(+), 27 deletions(-) diff --git a/src/main/java/ru/corvinella/App.java b/src/main/java/ru/corvinella/App.java index f37f2aa..dd1b64c 100644 --- a/src/main/java/ru/corvinella/App.java +++ b/src/main/java/ru/corvinella/App.java @@ -1,35 +1,10 @@ package ru.corvinella; -import ru.corvinella.expressions.ExpressionsTree; -import ru.corvinella.expressions.entries.SequenceExpression; -import ru.corvinella.expressions.exceptions.ExpressionException; -import ru.corvinella.math.Calculator; -import ru.corvinella.math.exceptions.CalculatorException; -import ru.corvinella.parser.Parser; -import ru.corvinella.parser.exceptions.ParserIllegalTokenValueException; -import ru.corvinella.parser.exceptions.ParserUnknownEntityException; - -import java.util.Scanner; - public class App { /** * Main method for testing. */ - public static void main(String[] args) throws ParserIllegalTokenValueException, ParserUnknownEntityException, ExpressionException, CalculatorException { - Scanner scanner = new Scanner(System.in); - System.out.print("Please enter an expression: "); - - String expression = scanner.nextLine(); - - Parser parser = new Parser(expression); - parser.parse(); - - ExpressionsTree expressionsTree = new ExpressionsTree(parser.getResult()); - expressionsTree.build(); - - double result = Calculator.getInstance() - .calculate((SequenceExpression) expressionsTree.getRoot()); - - System.out.printf("%s = %f%n", expression, result); + public static void main(String[] args) { + // nothing here } }