public Form1() { InitializeComponent(); mydinnerParty = new DinnerParty((int)numericUpDown1.Value, checkBox2.Checked, checkBox1.Checked); mybirthdayParty = new BirthdayParty((int)numberBirthday.Value, fancyBirthday.Checked, cakeWriting.Text); DisplayDinnerCost(mydinnerParty); DisplayBirthdayCost(mybirthdayParty); }
private void DisplayDinnerCost(DinnerParty dinnerParty) { dinnerPartyCost.Text = dinnerParty.CalculatePartyCost().ToString("c"); }