Consider The Following Class Grade

Consider the following class Grade:

public class Grade

Connect with a professional writer in 5 simple steps

Please provide as many details about your writing struggle as possible

Academic level of your paper

Type of Paper

When is it due?

How many pages is this assigment?

{

   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. 

The post Consider The Following Class Grade appeared first on Nursing Wizards.

Looking for a Similar Assignment? Let us take care of your classwork while you enjoy your free time! All papers are written from scratch and are 100% Original. Try us today! Use Code FREE20