Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1/ 4 linen 13 public class GrndeBook 14 15 16 17 18 19 private Sering cour selam

ID: 3725586 • Letter: 1

Question

1/ 4 linen 13 public class GrndeBook 14 15 16 17 18 19 private Sering cour selame private String instructorame public OeadeBook (Sering CSCLLO, Sering A1L) 21 courselame CSC110 23 24 25+ 29 30 31 “ 4 line,'/! public void setCoutselame (String CSC11O courselane CSC110 13 35 5 lines public Sering getContseame (Steing CSC110) return courseXanez 47 + 51 52 53 ...4 lines public void setinstructoriane (Sering Ali) 56 .5lines public Secing get Instructolane (Sering Ali) 67 public void displayflessage 74

Explanation / Answer

public class GradeBook {

  

   private String courseName;

   private String instructorName;

  

   public GradeBook(String courseName, String instructorName) {

       this.courseName = courseName;

       this.instructorName = instructorName;

   }

  

   public String getCourseName() {

       return courseName;

   }

   public String getInstructorName() {

       return instructorName;

   }

   public void setCourseName(String courseName) {

       this.courseName = courseName;

   }

   public void setInstructorName(String instructorName) {

       this.instructorName = instructorName;

   }

  

   public void displayMessage() {

       System.out.println("Welcome to the grade book for "+getCourseName());

       System.out.println("The course is presented by "+getInstructorName());

   }

  

   public static void main(String[] args) {

      

       GradeBook obj = new GradeBook("CS101", "Pravesh");

       obj.displayMessage();

   }

}

/*

Sample run:

Welcome to the grade book for CS101

The course is presented by Pravesh

*/