Skip to content

Instantly share code, notes, and snippets.

@yurii-litvinov
Created April 14, 2016 20:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yurii-litvinov/e8fc33144ebbe1a823c9197eaf754f7f to your computer and use it in GitHub Desktop.
Save yurii-litvinov/e8fc33144ebbe1a823c9197eaf754f7f to your computer and use it in GitHub Desktop.
code review example 4 - NodeOperand.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ParseTree
{
public class NodeOperand : Node
{
private double value;
/// <summary>
/// Initializes a new instance of the class.
/// </summary>
/// <param name="value"></param>
public NodeOperand(double value)
{
this.value = value;
}
public void Print()
{
Console.Write(string.Format(" {0} ", this.value));
}
public double Calculate()
{
return value;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment