0

So I am supposed to write a class that converts fahrenheit to celsius (& vice versa), calculates the volume of a sphere after a radius is entered, and calculates the hypotenuse of a right triangle, all using nothing but static methods. Here is what I have so far;

```
class Fun {
static double myFahrenheit = fahrenheit;
static double myCelsius = celsius;
static double myVolume = volume;
static double myRadius = radius;
static double myA = a;
static double myB = b;
static double myC = c;
static void getFahrenheit(double celsius) {
myFahrenheit = ((9.0 / 5.0) * myCelsius) + 32;
}
static void getCelsius(double fahrenheit) {
myCelsius = (5.0 / 9.0) * (myFahrenheit - 32;)
}
static void getVolume(double radius) {
myVolume = (4.0 / 3.0) * (Math.PI) * (Math.pow(myRadius, 3));
}
static void getHypotenuse(double a, double b) {
myC = Math.sqrt(Math.pow(myA, 2) + Math.pow(myB, 2));
}
}
```

What I'm confused about is how to test this class. What exactly should I put in the tester class? Did I even do my original class above correctly? Please help! Any feedback is appreciated :D

*Edited 5 Years Ago by 5minutes*: n/a