1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Naily [24]
3 years ago
9

Create a winform application that lets the user enter a temperature. With a ComboBox object offer the user three choices for inp

ut type: Farenheit, Celsius, and Kelvin. Offer the same three choices for the output type. Now when the user clicks the Calculate button, convert them temp and show the user the results.

Computers and Technology
1 answer:
Molodets [167]3 years ago
5 0

Answer:

See explaination

Explanation:

//namespace

using System;

using System.Windows.Forms;

//application namespace

namespace TemperatureConversionApp

{

public partial class Form1 : Form

{

public Form1()

{

InitializeComponent();

}

//calculate button click

private void btnCalculate_Click(object sender, EventArgs e)

{

//taking temperature type

string temperatureType = cmbTemperatureType.SelectedItem.ToString();

//taking temperature entered by user

double temperature = double.Parse(txtTemperature.Text);

//taking conversion temperature type

string conversionType = cmbConversionType.SelectedItem.ToString();

//checking temperature type and conversion type

if(temperatureType == "Farenheit" && conversionType == "Celsius")

{

//if Farenheit to Celsius temperature then

double temp = (temperature - 32) * 5 / 9;

//display on the label

lblDetails.Text = temperature.ToString("0.00") + " Farenheit is " + temp.ToString("0.00") + " Celsius";

}

else if (temperatureType == "Farenheit" && conversionType == "Kelvin")

{

//if Farenheit to Kelvin temperature then

double temp = (temperature - 32) * 5 / 9+273.15;

//display on the label

lblDetails.Text = temperature.ToString("0.00") + " Farenheit is " + temp.ToString("0.00") + " Kelvin";

}

else if (temperatureType == "Celsius" && conversionType == "Kelvin")

{

//if Celsius to Kelvin temperature then

double temp = temperature + 273.15;

//display on the label

lblDetails.Text = temperature.ToString("0.00") + " Celsius is " + temp.ToString("0.00") + " Kelvin";

}

else if (temperatureType == "Celsius" && conversionType == "Farenheit")

{

//if Celsius to Farenheit temperature then

double temp = (temperature*9/5) +32;

//display on the label

lblDetails.Text = temperature.ToString("0.00") + " Celsius is " + temp.ToString("0.00") + " Farenheit";

}

else if (temperatureType == "Kelvin" && conversionType == "Farenheit")

{

//if Kelvin to Farenheit temperature then

double temp = (temperature-273.15) * 9 / 5 + 32;

//display on the label

lblDetails.Text = temperature.ToString("0.00") + " Kelvin is " + temp.ToString("0.00") + " Farenheit";

}

else if (temperatureType == "Kelvin" && conversionType == "Celsius")

{

//if Kelvin to Celsius temperature then

double temp = temperature - 273.15;

//display on the label

lblDetails.Text = temperature.ToString("0.00") + " Kelvin is " + temp.ToString("0.00") + " Celsius";

}

else

{

lblDetails.Text = "Select valid temperature conversion unit";

}

}

//Exit button click

private void btnExit_Click(object sender, EventArgs e)

{

this.Close();//close application

}

}

}

check attachment for the windows application

You might be interested in
In two to three sentences, describe how you would move a file.
Nina [5.8K]
<span />


You can move the file one of two ways. Your first option is to click and drag the file to another folder in the Folders pane on the left side of the window. Your second option is to right-click the file and choose Send To. Then choose from the options shown in the submenu that appears.



3 0
4 years ago
Read 2 more answers
How to disappear completely from the internet pc magazine
GREYUIT [131]

In order to disappear completely from the internet, one needs to delete their social media accounts, delete their emails, etc.

The internet is a network of interconnected computer systems. Despite its numerous advantages, it also has several disadvantages and there are some moments when we want to disappear from the internet.

The steps that are needed to disappear from the internet include:

  • Delete your social network accounts.
  • Delete your email accounts.
  • Use search engines to track your old activities online and delete them.
  • Falsify the accounts that can't be deleted.
  • Unsubscribe from mailing lists.

Read related link on:

brainly.com/question/24902823

4 0
3 years ago
Dir, attrib, cd, and rem are all examples of:
konstantin123 [22]
Dir, attrib, cd, and rem are all examples of DOS Commands. dir command is used to display a list of files and folders contained inside your current folder. Attrib changes or views the attributes of one or more files. CD id for changing directory.  rem<span> command is used to record comments in a script file.</span>
3 0
3 years ago
Read 2 more answers
personalization allows customers to modify the standard offering, such as selecting a different home page to be displayed each t
shusha [124]
True, personalization is definitely part of this.
6 0
2 years ago
What is the IP address and TCP port number used by the client computer (source) that is transferring the file to gaia.cs.umass.e
lesya692 [45]

Answer:

Explanation:

ae

5 0
3 years ago
Other questions:
  • Jason is computer professional who has access to sensitive information. He shares this information with another organization in
    7·2 answers
  • 5) [4 points] Suppose you have a simple computer that is capable of storing only the months of the year. The number of bits avai
    12·1 answer
  • Three batch jobs, A through E, arrive at a computer center at almost the same time. They have estimated running times of 10, 6,
    6·1 answer
  • All NATE specialties are offered at two levels, A. journeyman and master. B. installation and service. C. apprentice and journey
    7·1 answer
  • Write a Python Program that:
    9·1 answer
  • 5. The image file format most suited for photographs is what? *
    8·2 answers
  • PC GAMER HELP!<br><br> What is -everything- I need to have a -GOOD- gaming area for a pc gamer?
    7·1 answer
  • PLS FAST DONT EXPLAIN
    13·1 answer
  • Which federal legislation requires lending companies to notify consumers of changes in rates and fees?
    12·1 answer
  • ____ is concerned with the security of computers or devices that are part of a network infrastructure.
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!