package org.josast.TLM;


public class AxBEqx implements ICalculData {
	private double A;
	private double B;
	/**
	 * Constructor with two parameters of the equation A & B
	 * @param a
	 * @param b
	 */
	public AxBEqx(double a, double b ) {
		A=a;
		B=b;
	}
/**
 * Equation is : y= A x + B
 * @param x x value
 * @return computed value 
 * @see org.josast.TLM.ICalculData#calcul(int)
 */
	
	@Override
	public double calcul(int x) {
		// TODO Auto-generated method stub
		return (double)x*A+B;
	}
	
	public String toString ()
	{
		return "" + A + " x + "+ B ;
		
	}
}
