Respuesta :
Answer:
The program plan requires the design of the gui program form
Explanation:
The program plan will be as follows:
take 4 label and 4 text box and 1 button and modify the property of controls to design the gui form.
use 6 if statements and 1 else statement.
use or operator for comparison.
show message in textbox.
program code:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System. Data;
using System.Drawing;
using System.LINQ;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace...
Answer:
Explanation:
namespace Hurricane
{
public partial class Hurricane : Form
{
public Hurricane()
{
InitializeComponent();
}
private void btnSubmit_Click(object sender, EventArgs e)
{
//declare constants and variables
const int CAT5 = 157, CAT4 = 130, CAT3 = 111, CAT2 = 96, CAT1 = 74;
double WindSpeed = Convert.ToDouble(txtInput.Text);
string Category;
//determine hurricane category
if (WindSpeed >= CAT5)
Category = "a category 5 hurricane.";
else if (WindSpeed >= CAT4)
Category = "a category 4 hurricane.";
else if (WindSpeed >= CAT3)
Category = "a category 3 hurricane.";
else if (WindSpeed >= CAT2)
Category = "a category 2 hurricane.";
else if (WindSpeed >= CAT1)
Category = "a category 1 hurricane.";
else
Category = "not a hurricane.";
//output
lblOutput.Text = "A windspeed of " + WindSpeed + "mph is " + Category;
}
private void btnExit_Click(object sender, EventArgs e)
{
Application.Exit();
}
}
}