Ex1+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).

MessageBox.Show("" + ((Int32.Parse(textBox1.Text)) - 32 * (5/9)) );

o Centimeter to Feet (button2).

if (textBox1.TextLength < 0) { MessageBox.Show("Death to all stupids!"); } else { MessageBox.Show("" + ((Int32.Parse(textBox1.Text)) * 30.48) ); }

o Centimeter to inches (button3).

if (textBox1.TextLength < 0) { MessageBox.Show("Death to all stupids!"); } else { MessageBox.Show("" + ((Int32.Parse(textBox1.Text)) * 2.54) ); }

o From Pounds to Kilograms (button4).

if (textBox1.TextLength < 0) { MessageBox.Show("Death to all stupids!"); } else { MessageBox.Show("" + ((Int32.Parse(textBox1.Text)) / 0.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.