if (m>1){ if (x1>=0 || x1<0) { System.out.println("Please enter the values of f(x1): \n"); for (int i = Koef.length-2; i >=0; i--) { // gives the length of my row (m) for (int j =Koef[0].length-1; j>=0;j--) { //gives the length of my column (n). Koef[0][j] = readInteger("Enter the values of your coeffecients: " +"f(x1), Coeffecient" +(j)+": "); // readInteger takes an input from the user } System.out.println(); } } //MY PROBLEM is here //I was trying to execute this code below too after the code above finishes, but somehow it never reaches to it if(x2>=0 || x2<0) { System.out.println("Now enter the value of f(x2): \n"); for (int i = Koef.length-2; i >=0; i--) { for (int j =Koef[0].length-1; j>=0;j--) { Koef[1][j] = readInteger("Enter the value of coefficients: " +"f(x2), Coefficient" +(j)+": "); } } } //==================================================================== //THis what happens in the testClass: int n = 1+readInteger("Which polynomial degree do you want to enter for f(x1)?"); int x1 = readInteger("please enter the value of x1:"); polynom pol1 = new polynom (m,n,x1,0); //m-2 = array 0 & n +1 = polynomial degree of array 0 // m is first array, n is second array, x1 is the value of 1st polynomial x2 value of 2nd int n = 1+readInteger("Which polynomial degree do you want to enter for f(x1)?"); int x2 = readInteger("Please enter the value of x2:"); polynom pol2 = new polynom (m,n,0,x2);
if (x1>=0 || x1<0) {
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)