Consider the following class Grade:
public class Grade
{
private char letterGrade;
public Grade( char 1g )
{
letterGrade = 1g;
}
public char getLetterGrade( )
{
return letterGrade;
}
public void setLetterGrade( char 1g)
{
letterGrade = 1g;
}
}
In the main method of the class GradeClient, you have coded: Grade g = new Grade ( “A” ); //line 10
When you compile, you get the following message:
GradeClient.java:10: error: incompatible types: String cannot be converted to char
Grade g = new Grade ( “A” ); // line 10
Note: Some messages have been simplified; recompile with -Xdiags: verbose to get full output
1 error
Explain what the problem is and how to fix it.
“Looking for a Similar Assignment? Get Expert Help at an Amazing Discount!”
What Students Are Saying About Us
.......... Customer ID: 12*** | Rating: ⭐⭐⭐⭐⭐"Honestly, I was afraid to send my paper to you, but splendidwritings.com proved they are a trustworthy service. My essay was done in less than a day, and I received a brilliant piece. I didn’t even believe it was my essay at first 🙂 Great job, thank you!"
.......... Customer ID: 14***| Rating: ⭐⭐⭐⭐⭐
"The company has some nice prices and good content. I ordered a term paper here and got a very good one. I'll keep ordering from this website."