This is a simple console-based calculator application written in Java that supports:
- Addition, Subtraction, Multiplication, and Division
- Operations on two or more numbers
- Looped user interaction until the user exits
- Clean separation of logic using two classes
- Add, Subtract, Multiply, Divide any number of inputs (2 or more)
- Validates input to avoid divide-by-zero
- Uses a loop to keep the calculator running until the user exits
- Modular code with reusable methods
- Clean separation using OOP (Object-Oriented Programming)
This is the entry point of the application:
- Displays a menu to the user.
- Accepts the number of operands.
- Reads each number and stores it in an array.
- Passes the array to the corresponding method in Calculator.
- Shows the result.
- Repeats until the user chooses to exit.