Write a class encapsualting the concept of a course grade, assuming a course grade
* has the following attributes: a course name and a letter grade. Include a constructor,
* the accessor and mutator, and methods toString and equals.Write a client class
* to test all the methods in your class.
Here is my code so far not sure how to test and finish the toString and equals method in this code ? Any help would be much appreciated.
package labmodule7num57;
import java.util.*;
public class LabModule7Num57 {
// Constructors//
private String name;
private String letterGrade;
public LabModule7Num57 (String name,String letterGrade) {
this.name = name;
this.name =letterGrade;
}
// Setting the name of course and letter grade//
public void setName(String name,String letterGrade) {
this.name = name;
this.name =letterGrade;
}
// Getting the name of the course//
public String getName() {
return name;
}
// Getting the name of the letter grade//
public String getletterGrade() {
return letterGrade;
}
// Returning the name of the course and the letter grade//
public String toString() {
return name+":"+letterGrade;
}
public static void main(String[] args) {
// TODO code application logic here
}
}