this is probably very simple, but I have always just made one big class and never tried make clean
code. Now I am trying and experiencing errors..
So, this is the idea:
class1
{
method1 { value 1; value 2 }
method2 { value 3; value 4 }
method3 { uses method4 from class2 }
}
class2
{
method4 { uses values 1-4 from class1 }
}
I am doing it by calling: class1 c1 = new class1()
in method4 and class2 c2 = new class2
in method3.
So this is what happens:
method1
,method2
producevalues 1-4
- method3 calls
class2 c2 = new class2
- I get into
class2
, then intomethod4
and get null/0 values instead of what I made in first step.