Return Entire thread

Code

1 Name: Anonymous 2021-02-05 15:43


public class Parabola ()

{

private int a;

private int b;

private int c;

public Parabola (int myA, int myB, int c)

{

a = myA;

b = myB;

c = myC;

}

public double getAxis ()

{

int num = -1 * b;

int den = 2 * a;

double axis = (double) (num / den);

return axis;

}

public boolean isOnGraph (int x, int y)

{

int rightSide = a*x*x + b*x + c;

boolean onGraph = (y == rightSide);

return (onGraph);

}

}


Return Entire thread
Name:
Leave this field blank: