isys350homework.docx - Part 1 code public Form1 cfw InitializeComponent private void button1_Click(object sender EventArgs e cfw double hours nonprofit

isys350homework.docx - Part 1 code public Form1 cfw...

This preview shows page 1 - 6 out of 6 pages.

Image of page 1
Part 1 code: public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { double hours, nonprofit, package, pbase, precost, cost; hours = double.Parse(textBox1.Text); if (radioButton1.Checked)
Image of page 2
{ if (hours>10) { package = (hours - 10) * 4; pbase = 12.95; } else { package = 0; pbase = 12.95; } } else if (radioButton2.Checked) { if (hours > 20) { package = (hours - 20) * 2; pbase = 14.95; } else { package = 0; pbase = 14.95; } } else if (radioButton3.Checked) { if (hours > 30) { package = (hours - 30) * 1; pbase = 20; } else { package = 0; pbase = 20; } } else { package = 0; pbase = 35.95; } if (checkBox1.Checked)
Image of page 3
{ nonprofit = .20; } else { nonprofit = 0; } precost = (package + pbase) * nonprofit; cost = (package + pbase) - precost; textBox2.Text = cost.ToString("c"); } private void textbox1_validating(object sender, CancelEventArgs e)
Image of page 4
Image of page 5
Image of page 6

You've reached the end of your free preview.

Want to read all 6 pages?

  • Fall '10
  • LI

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

Stuck? We have tutors online 24/7 who can help you get unstuck.
A+ icon
Ask Expert Tutors You can ask You can ask You can ask (will expire )
Answers in as fast as 15 minutes