public void InputFromFile(string pathToFile) { string data = File.ReadAllText(pathToFile); this.ParseComplex(data); MyComplexBase newComplex = new MyComplexBase(this["realValue"], this["imageValue"]); this.mySetFuncOutput("Варіант 7", newComplex); }
public void InputFromTerminal() { Console.WriteLine("Enter complex number in algebraic notation: "); string complexStuff = Console.ReadLine(); this.ParseComplex(complexStuff); MyComplexBase newComplex = new MyComplexBase(this["realValue"], this["imaginaryValue"]); this.mySetFuncOutput("Варіант 7", newComplex); }
public void SpecialFunction2(string message, MyComplexBase myObj) { Console.WriteLine($"2. {message}: {myObj.real} + {myObj.imaginary}*i"); }