unit-test-env / Calculator.java
Vidhikoul's picture
Upload folder using huggingface_hub
5916e92 verified
raw
history blame contribute delete
580 Bytes
// public class Calculator {
// public int add(int a, int b) {
// return a + b;
// }
// public boolean isPalindrome(String s) {
// String clean = s.toLowerCase().replace(" ", "");
// String reversed = new StringBuilder(clean).reverse().toString();
// return clean.equals(reversed);
// }
// public double celsiusToFahrenheit(double c) {
// return c * 9.0 / 5.0 + 32;
// }
// }
// // Write me a sample test class for the Calculator class using JUnit.
// import org.junit.Test;
// import static org.junit.Assert.*;