Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6528891
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T09:34:38+00:00 2026-05-25T09:34:38+00:00

I am quite new to java and programming. I´m using the textbook Java how

  • 0

I am quite new to java and programming. I´m using the textbook “Java how to program”. I am solving an excercise (3.11 p. 136). In this excercise i am trying to get an application with two classes to print out information about a gradebook. It is supposed to print out two strings for each of the two objects of the class, with the information: “gradeBook1 course name is:CS101 Introduction to Java Programming, instructor is Donald Duck”. Some other informations for gradebook 2. I am supposed to use get and set-methods, and to use a constructor. I have worked quite a lot now without managing to compile the “gradeBookTest class” which contains the main method. I get the following error message:

aGradeBookTest.java:8: cannot find symbol
symbol  : variable gradebook1
location: class aGradeBookTest
    System.out.printf( "gradeBook1 course name is: emphasized text%s,\n instructor is %s\n", gradeBook1.getCourseName(), gradebook1.getInstructorName() );
                                                                                                          ^
aGradeBookTest.java:9: cannot find symbol
symbol  : method getInstructorname()
location: class aGradeBook
    System.out.printf( "gradebook2 course name is: %s\n, instructor name is: ", gradeBook2.getCourseName(), gradeBook2.getInstructorname() );**

The code for the two classes are the following:

public class aGradeBook
{
    private String courseName;
    private String instructorName;

    public aGradeBook( String name, String iName )
    {
        courseName = name;
        instructorName = iName;
    }

    public void setCourseName( String name )
    {
        courseName = name;
    }

    public String getCourseName()
    {
        return courseName;
    }

    public void setInstructorName(String iName)
    {
        iName = instructorName;
    }

    public String getInstructorName()
    {
        return instructorName;
    }

    public void displayMessage()
    {
        System.out.printf ("Welcome to the gradebook for\n%s!\n", getCourseName() );
    }
}

and:

public class aGradeBookTest
{
    public static void main( String[]args )
    {
        aGradeBook gradeBook1 = new aGradeBook( "CS101 Introduction to Java Programming", "Donald Duck" );
        aGradeBook gradeBook2 = new aGradeBook( "CS102 Data structures in Java", "Tom & Jerry" );

        System.out.printf( "gradeBook1 course name is: %s,\n instructor is %s\n", gradeBook1.getCourseName(), gradebook1.getInstructorName() );
        System.out.printf( "gradebook2 course name is: %s\n, instructor name is: ", gradeBook2.getCourseName(), gradeBook2.getInstructorname() );
    }
}

Can anyone please help me, I am stuck here?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T09:34:39+00:00Added an answer on May 25, 2026 at 9:34 am

    You wrote gradebook1 in your code instead of gradeBook1.

    The gradebook1 variable does not exist and that is what the compiler is telling you: cannot find symbol symbol : variable gradebook1.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm quite new to Scala programming language, and was trying something out stucked in
I've been using the Java Service wrapper in a custom application for quite a
I'm still quite new to Android and Java programming and even newer to draw
I am quite new to programming in Java, but I have some experience in
I'm beginning to work with Eclipse for some Java development. I'm quite new to
Quite new to maven here so let me explain first what I am trying
I'm quite new to programming, and I was wondering if there is a good
I'm trying out several exercises from a Java programming book. I have the code
I am quite new to Java. I am still developing with a simple text
I'm quite new to Java and having an issue checking null element in integer

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.