You're close...but not quite there. And it's pretty obvious when you see it written down.
public class MyClass
{
private string courseName;
...
public void setName(string name)
{
courseName = name;
}
}
Now look at the homework and you should see how each "bit" relates to the question.