示例#1
0
        private void Report2_Load(object sender, EventArgs e)
        {
            Cow      c = new Cow();
            JersyCow j = new JersyCow();
            Sheep    s = new Sheep();
            Goat     g = new Goat();

            cowprofit.Text   = c.Profitability().ToString();
            jcowprofit.Text  = j.Profitability().ToString();
            goatprofit.Text  = g.Profitability().ToString();
            sheepprofit.Text = s.Profitability().ToString();
            totalprofit.Text = (c.Profitability() + j.Profitability() + g.Profitability() + s.Profitability()).ToString();
        }
示例#2
0
        private void Report6_Load(object sender, EventArgs e)
        {
            Cow   c = new Cow();
            Goat  g = new Goat();
            Sheep s = new Sheep();

            cowprofit.Text   = c.Profitability().ToString();
            goatprofit.Text  = g.Profitability().ToString();
            sheepprofit.Text = s.Profitability().ToString();
        }