I have a question, I have a program created where I basically have a few text boxes and a button that, when clicked, calculates the averages from the test scores from the inputs in the text boxes.

My professor now wants us to create methods within our program. We are supposed to use a format of
public string variable
double (variable)

One of the things I need help creating a method for is this if structure. A method for getting the letterGrade.

if (courseAverage >= 90)
{
letterGrade = "A";
}
else if (courseAverage > 80)
{
letterGrade = "B";
}
else if (courseAverage > 70)
{
letterGrade = "C";
}
else if (courseAverage > 60)
{
letterGrade = "D";
}
else
{
letterGrade = "F";
}