Created
October 26, 2016 02:18
-
-
Save toptensoftware/9a7a712d4e7571160696f38c15a8b730 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| 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