isys 350 assignment 3.pdf - ISYS 350 HOMEWORK 2 PART 1 namespace Assignment_3 public partial class Form1 Form public Form1 InitializeComponent private

isys 350 assignment 3.pdf - ISYS 350 HOMEWORK 2 PART 1...

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

ISYS 350 HOMEWORK 2 PART 1: namespace Assignment_3 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { double hours, fees; hours = double.Parse(textBox1.Text); fees = 0; // Package A if (radioButton1.Checked) { if (hours <= 10) { fees = 12.95; } else { fees = 12.95 + (hours - 10) *4; } } if (radioButton2.Checked) { if (hours <= 20) { fees = 14.95; } else { fees = 14.95 + (hours - 20) * 2; } } if (radioButton3.Checked) { if (hours <= 30) { fees = 20; } else { fees = 20 + (hours - 30) * 1; } } else { if (hours >= 31) { fees = 35.95; } } if (checkBox1.Checked) { fees = fees - (fees * 0.2); }
Image of page 1
textBox2.Text = fees.ToString("c"); } } } PART 2: namespace Assignment_3 { public partial class Form2 : Form { public Form2() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e)
Image of page 2
Image of page 3

You've reached the end of your free preview.

Want to read all 3 pages?

  • Fall '10
  • LI
  • Harry Connick, Jr., FICA, private void button1

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture