This is the university project for the Advanced Object Oriented Programming course at UFAZ. The project consist of Calculator client (GUI) and the server that communicate with Remote Method Invocation. All the processing is done on the server, the commands will be entered and submited by the client. The calculator can handle complex expressions containing brackets, plus, minus, multiplication and division operations. The expression calculation is implemented usign stacks and so called infix to postfix conversion. The GUI is implemented with Swing library.
RMI implements multithreading, thus many clients can simultaneously connect to the server.
JDK Version 8 or higher (can download here)
- Run
rmiregistry
- From main folder compile with following command :
javac server/Server.java
- Run via :
java server.Server
- Be sure that server is running
- Compile :
javac client/Client.java
- Run via :
java client.Client
User can face 5 types of errors depending on the input or output.
- Division by zero: where the divider is equal to 0.
- Negative result: where the final result is less than 0.
- Malformed expression: where there is the syntax problem in the expression.
- Integer overflow: where the operand or the result is bigger than the max capacity of integer type ( 2,147,483,647)
- Connection refused: if the server is down.