java - Can Find the error -
Then my Java online class, I must include the variable and provide the set and of course get the name of the instructor's course. Welcome to the grade book for: How to get the methods, and to display the message: And this course has been presented by:
Class gradebook:
< Code> public class gradebook {personal string string name; Public String Course Teacher; Public gradebook (string name, string teacher) {courseName = name; Course Teacher = Teacher; } Public ZeroServer Name (string name) {courseName = name; } Public string getCourseName () {return courseName; } Public Zero Setchers Teacher (String Teacher) {Course Teacher = Teacher; } Receive public stringTeker () {return course teacher; } Public Zero Display Message () {System.out.printf ("Welcome to the Book of Grade: / n% s! \ N", getCourseName (), "This course is presented as: \ n % S \ n! ", GetCourseTeacher ()); }}Main category:
import java.util.Scanner; Public grade gradebook {public static zero main (string [] args) {scanner input = new scanner (System.in); Gradebook myGradeBook = New Gradebook ("CS 101", "Sero"); System.out.println ("Please enter the course name:"); String theName = input.nextLine (); MyGradeBook.setCourseName (theName); System.out.println ("Please enter trainer name:"); String theTeacher = input.nextLine (); MyGradeBook.setCourseTeacher (teacher); Println (); MyGradeBook.displayMessage (); }}
error:
can not retrieve the symbol method GetCourseTeacher () Gradebook line 38
getCourseTeacher (with a capital
C ) in the definition of the method:
public string received taxation () ^ THIS
Comments
Post a Comment