Example #1
0
 private void btncalcola_Click(object sender, RoutedEventArgs e)
 {
     txtmassimo.Text = Metodi_MaxMinMedia.Max(int.Parse(txtn1.Text), int.Parse(txtn2.Text)).ToString();
     txtminimo.Text  = Metodi_MaxMinMedia.Min(int.Parse(txtn1.Text), int.Parse(txtn2.Text)).ToString();
     txtmedia.Text   = Metodi_MaxMinMedia.Media(double.Parse(txtn1.Text), double.Parse(txtn2.Text)).ToString();
 }
Example #2
0
        public void TestMax(int n1, int n2, int aspettato)
        {
            int max = Metodi_MaxMinMedia.Max(n1, n2);

            Assert.AreEqual(aspettato, max);
        }