using System; namespace Calculator { public class CalculationResponse { public static CalculationResponse Ok = new CalculationResponse(Response.Ok, null); public static CalculationResponse ClearedMemory = new CalculationResponse(Response.ClearedMemory, null); public static CalculationResponse WrongInput = new CalculationResponse(Response.WrongInput, null); public Response Response { get; } public string Result { get; } public CalculationResponse(Response response, string result) { if (response == Response.Result && result == "") throw new ArgumentNullException("CalculationResponse cannot have Response = RESULT and result = null"); Response = response; Result = result; } } public enum Response { Ok, Result, ClearedMemory, WrongInput } }