/// <summary> /// organizarea instructiunilor de comutare, functiile de apel Plus /// </summary> /// <param name="ch">cheie apasata de utilizator</param> /// <returns>returneaza rezultatul functiei plus</returns> public double Switcher(ConsoleKey ch) { Plus a = new Plus(); switch (ch) { case ConsoleKey.D1: case ConsoleKey.NumPad1: return(a.Plus1(ReadArguments())); case ConsoleKey.D2: case ConsoleKey.NumPad2: return(a.Plus2(ReadArguments())); case ConsoleKey.D3: case ConsoleKey.NumPad3: return(a.Plus3(ReadArguments())); case ConsoleKey.D4: case ConsoleKey.NumPad4: return(a.Plus4(ReadArguments())); case ConsoleKey.D5: case ConsoleKey.NumPad5: return(a.Plus5(ReadArguments())); default: throw new ArgumentException("niciun element de meniu"); } }