Skip to content

Instantly share code, notes, and snippets.

@akshayKhot
Last active September 11, 2019 19:24
Show Gist options
  • Save akshayKhot/10aab322943e34adaf0f6cd1f3761122 to your computer and use it in GitHub Desktop.
Save akshayKhot/10aab322943e34adaf0f6cd1f3761122 to your computer and use it in GitHub Desktop.
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