public void ChangeStack(IStack <double> newStack) { double[] vals = terms.GetAll(); foreach (double i in vals) { newStack.Push(i); } terms = newStack; }
/// <summary> /// Haalt de oude stack in arrayform op. Pushed alle items van de oude stack in de nieuwe stack en /// stopt de nieuwe stack in de stack variabele. /// </summary> public void ChangeStack(Interfacestack <double> newStack) { double[] oldstack = stack.GetALL(); foreach (double i in oldstack) { newStack.Push(i); } stack = newStack; }
public Calculator(IStack <double> start) { this.terms = start; }
/// <summary> /// Constructor voor de Calculator class. /// </summary> public Calculator(Interfacestack <double> start) { this.stack = start; }