package info.kalendra.matrix;
import java.text.DecimalFormat;
public abstract class MatrixAbstract implements Matrix{
public void show() {
for (int i = 0; i < this.getDimensionRows(); i++) {
for (int j = 0; j < this.getDimensionCols(); j++) {
System.out.printf("%9.4f ", this.getValue(i,j));
}
System.out.println();
}
}
public void show(DecimalFormat df,String format) {
for (int i = 0; i < this.getDimensionRows(); i++) {
for (int j = 0; j < this.getDimensionCols(); j++){
System.out.format(format,df.format(this.getValue(i,j)));
}
System.out.println();
}
}
}