Skip to content

Instantly share code, notes, and snippets.

@toptensoftware
Created October 26, 2016 02:18
Show Gist options
  • Select an option

  • Save toptensoftware/9a7a712d4e7571160696f38c15a8b730 to your computer and use it in GitHub Desktop.

Select an option

Save toptensoftware/9a7a712d4e7571160696f38c15a8b730 to your computer and use it in GitHub Desktop.
public abstract class Node
{
public abstract double Eval();
}
class NodeNumber : Node
{
public NodeNumber(double number)
{
_number = number;
}
double _number; // The number
public override double Eval()
{
// Just return it. Too easy.
return _number;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment