Skip to content

legacy - 2

prajakta bendre requested to merge Testbranch1 into main

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

Merge request reports