static void Main(string[] args) { int[] intArray = { 112, 344, 432, 555, 678 }; GenericMaximum <int> genericInteger = new GenericMaximum <int>(intArray); float[] floatArray = { 11.2f, 34.4f, 4.32f, 55.5f, 6.78f }; GenericMaximum <float> genericFloat = new GenericMaximum <float>(floatArray); string[] stringArray = { "a111", "b222", "c333", "d55", "e999" }; GenericMaximum <string> genericString = new GenericMaximum <string>(stringArray); genericInteger.PrintMax(); genericFloat.PrintMax(); genericString.PrintMax(); }
static void Main(string[] args) { Console.WriteLine("Welcome to test maximum program"); //Console.WriteLine("Enter 3 integers"); //int a = int.Parse(Console.ReadLine()); //int b = int.Parse(Console.ReadLine()); //int c = int.Parse(Console.ReadLine()); //int intMax = new FindMaximum().FindIntMax(a, b, c); //Console.WriteLine("Maximum integer number: "+ intMax); //float floatMax = new FindMaximum().FindFloatMax(a, b, c); //Console.WriteLine("Maximum Float number: " + floatMax); //string stringMax = new FindMaximum().FindStringMax("a", "b", "c"); //Console.WriteLine("Maximum string number: " + stringMax); //int[] arrayOfIntegers = new int[] { 10, 12, 13 }; //int maxValue = new FindMaximum<int>().GenericMax(arrayOfIntegers); //Console.WriteLine("Maximum integer number: " + maxValue); //double[] arrayOfDouble = new double[] { 10.1, 12.3, 13.4 }; //double maxDoubleValue = new FindMaximum<double>().GenericMax(arrayOfDouble); //Console.WriteLine("Maximum double number: " + maxDoubleValue); //string[] arrayOfString = new string[] { "10", "12", "13" }; //string maxStringValue = new FindMaximum<string>().GenericMax(arrayOfString); //Console.WriteLine("Maximum string number: " + maxStringValue); int[] arrayOfIntegers = new int[] { 10, 12, 13 }; GenericMaximum <int> integerNumbers = new GenericMaximum <int>(arrayOfIntegers); integerNumbers.PrintMaxValue(); double[] arrayOfDouble = new double[] { 10.2, 12.3, 13.4 }; GenericMaximum <double> doubleNumbers = new GenericMaximum <double>(arrayOfDouble); doubleNumbers.PrintMaxValue(); string[] arrayOfString = new string[] { "10", "12", "13" }; GenericMaximum <string> stringNumbers = new GenericMaximum <string>(arrayOfString); stringNumbers.PrintMaxValue(); }