package integral3; public class Funcion2 extends Fourier { private double h; public Funcion2(double[] discont, int nDiscont, double h) { super(discont, nDiscont); if(h>0){ this.h=h; }else{ this.h=-h; } } public double funcion(double t){ if(iDiscont==0) return 0.0; if(iDiscont==1) return 1.0; if(iDiscont==2) return -h; return 0.0; } }