I am confuse between the best way to organize dependency between multiple classes
assume i have the following classes
Employee,
Salary,
DataAccess
Should i go for: Option1
Employee emp = new Employee();
Salary sal = new Salary();
DataAccess data = new DataAccess();
sal.Calculate(emp);
data.Save(emp);
or Option2
Employee emp = new Employee();
Salary sal = new Salary();
sal.Calculate(emp); //once salary has been calculated salary object will initialize data access class to do the actual saving.
or Option 3
Employee emp = new Employee();
emp.Calculate(); // employee object will encapsulate both the salary and data access object