I have a class that has the duty of creating a simple method with two input parameters. The method needs to be used in the creation of other methods in other classes. My question is, does the way I wrote it seem correct? and when calling this method in another class, what would it look like?
public class IntlDensity {
static double p = PhysicalConst.pi;
public IntlDensity(double m, double r) {
}
public double irho (double mass, double rad) {
return(mass/(((4.0/3)*p*Math.pow(rad, 3))));
}
}