Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class X2 implements Function {//implements the interface Function
- public double f(double x) {
- return x*x-0.6;//returns the value of the function f(x)
- }
- public String toString() {
- return "x^2 - 0.6";//returns the function as a string
- }
- }
Add Comment
Please, Sign In to add comment