class Account {
int gamma (int val1, ...) {
//some computations
return c-2*a;
}
}
class Account {
int gamma (int val1, ...) {
Calculations calculations = new Calculations(val1, ...).invoke();
int c = calculations.getC();
int a = calculations.getA();
return c-2*a;
}
private class Calculations {
private int val1;
...
private int a;
private int c;
public Calculations(int val1, ...) {
this.val1 = val1;
...
}
public int getA() {return a;}
public int getC() {return c;}
public Calculations invoke() {
...//computations
return this;
}
}
}