|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectmx.edu.ulsa.cib4132005.practica1.EcuacionLineal
public class EcuacionLineal
| Constructor Summary | |
|---|---|
EcuacionLineal(double a,
double b,
double c,
double d,
double e,
double f)
Construye el objeto, ingresando los coeficientes y los valores independientes del sistema. |
|
| Method Summary | |
|---|---|
double |
getX()
Retorna el valor de x, despues de aplicar el metodo resolver |
double |
getY()
Retorna el valor de y, despues de aplicar el metodo resolver |
void |
resolver()
Resuelve el sistema de ecuaciones lineales de segundo orden, de la siguiente forma: x= (ce - bf) / (ae - bd ) y= (af - cd) / (ae - bd ) Asigna el resulado a las propiedades x e y del objeto Ejemplo de uso: EcuacionLineal ecuacion= new EcuacionLineal(1,1,2,1,-1,0); ecuacion.resolver(); //resuelve con valores x=1 e y=1 |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public EcuacionLineal(double a,
double b,
double c,
double d,
double e,
double f)
a - El valor de axb - El valor de byc - El valor del termino indepediente cd - El valor de dxe - El valor de eyf - El valor del termino independiente f
EcuacionLineal ecuacion= new EcuacionLineal(1,1,2,1,-1,0);
| Method Detail |
|---|
public void resolver()
EcuacionLineal ecuacion= new EcuacionLineal(1,1,2,1,-1,0); ecuacion.resolver(); //resuelve con valores x=1 e y=1
public double getX()
EcuacionLineal ecuacion= new EcuacionLineal(1,1,2,1,-1,0); ecuacion.resolver(); double x= ecuacion.getX(); //valor de x despues de resolver, y es igual a 1
public double getY()
EcuacionLineal ecuacion= new EcuacionLineal(1,1,2,1,-1,0); ecuacion.resolver(); double y= ecuacion.getX(); //valor de x despues de resolver, y es igual a 1
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||