Last active
September 11, 2019 19:24
-
-
Save akshayKhot/10aab322943e34adaf0f6cd1f3761122 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Employee | |
{ | |
void ProcessData() | |
{ | |
var processor = new Processor(name, code, salary, ...); | |
processor.ProcessData(); | |
} | |
} | |
class Processor | |
{ | |
private string name; | |
private int code, salary; | |
// any other local variables, now as instance variables | |
public Processor (string name, int code, int salary, ...) | |
{ | |
// initialize instance variables | |
} | |
public void ProcessData () | |
{ | |
// Perform complex computations | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment