I write class Mone has two instance variables dollars and cent. I write nconstructor , setter and getter methods.In the question I must make add and subtraction method both static and non-static version of two methods.I try to make them but have a problem both static and non - static version of add method I try to calling object with this.getDollars() + m.getDollars on static version , compiler does not give error but calculate only make m.getDollars() + m.getDollars ,it can't make truely.How to solve this problem?

public int add(Mone x)
{
int d1 = this.getDollars();
int d2 = x.getDollars();
int tod = d1 + d2;
int c1 = this.getCents();
int c2 = x.getCents();
int tod = d1 + d2;
int toc = c1 + c2;
double totalC = toc / 100;

return tod + totalC;
}