(Function fun)
| 22 | |
| 23 | //void showValues(SuryonoParser fun){ // WC: this signature works |
| 24 | void showValues(Function fun){ // WC: this signature fails |
| 25 | for (int i=0; i<=10; i++) { |
| 26 | double x=2*Math.PI*i*0.1; |
| 27 | double val = fun.evaluate (x); // parse the function |
| 28 | System.out.println("f(x)="+val); |
| 29 | } |
| 30 | } |
| 31 | |
| 32 | public static void main(String[] args) { |
| 33 | new ParserTest(); |
no test coverage detected