Ex2+T1+Question+4

==** The next task is to do a convertor. This is a program that will enable students to convert from any Standard Value to a Metric Value and vice versa. You are only required to program inside each button. Here are some important points:**== · The convertor should allow students to convert both ways from: o Fahrenheit to Celsius (button1). Formule: C=(F-32)*5/9

private void button1_Click( object sender, EventArgs e) { int first; int first = Int32 .Parse (textBox1.Text) ; textBox2.Text = first + (-32*5/9);

o Centimeter to Feet (button2). Formula: feet = cm/30.48

private void button2_Click( object sender, EventArgs e) { int first = Int32 .Parse (textBox1.Text) ; int Second = Int32 .Parse(textBox2.Text); label2.Text = textBox2.Text + textBox1/30.48);

o Centimeter to inches (button3). Formula: inches = cm/2.54

private void button3_Click( object sender, EventArgs e) { int first = Int32 .Parse (textBox1.Text) ; int Second = Int32 .Parse(textBox2.Text); label2.Text = textBox2.Text + textBox1.Text/2.54;

o From Pounds to Kilograms (button4). Formula: lbs = kg/.45359

private void button4_Click( object sender, EventArgs e) { label1.Text = textBox1.Text; int first = Int32 .Parse (textBox1.Text) ; int Second = Int32 .Parse(textBox2.Text); label2.Text = textBox2.Text + textBox1/.45359;

· The user is will write the number to be converted into TextBox1. · You should tackle down any problem that the program may face because of misuse. · The only thing that shouldn’t be tackled down is if the user enters text data instead of a number.

Your final program should be designed in something like this in order for it to have sense: