(Solved):Consider the following class Grade: public class Grade { private char letterGrade; public Grade( char 1g ) { letterGrade = 1g; } public char getLetterGrade( ) { return letterGrade; } public void se… View Answer…

 

Question

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( ‘B’ ); g.letterGrade = ‘A’; When you compile, you get the following message: GradeClient.java:10:

Scroll to top