legacy - 2
Summary by Bito
This pull request adds a new Calculator class to the Java project, implementing basic arithmetic operations including an updated divide method with division by zero validation, and including a demonstration main method.
Detailed Changes
- Introduces a new Calculator class with add, subtract, multiply, and divide methods in test2.java.
- Adds a main method that creates a Calculator instance and performs sample calculations in test2.java.
- Adds input validation in the divide method to throw IllegalArgumentException when dividing by zero.
Edited by gitlab_custom_domain