I am getting the following syntax messages:

illegal start of expression public void display_menu()
(with arrow pointing to the 'p')

and also

';' expected } (with arrow also pointing to the })

This is my code for the first error:

public class InsyStudent extends Student
    {

        public InsyStudent( String fName, String lName, String ssn )
        {

            int midTerm;
            int finalExam;
            int researchProject;
            int presentationScore;


                public void display_menu()
                {
                System.out.println( "1) INSY 3305\n2) INSY 3305\n3) INSY 4304");
                System.out.println("4) INSY 4305\n5) INSY 4310\n6) INSY 4320\n" );

                }

This is my code for the second error:

public String toString()
            {
                return String.format( "%s %s\t%s", super.toString(), selectCourse() );
            }

                }

What is the problem?

first: You're not closing your constructor, check your braces!

second: count the arguments to String.format(). Your template string takes 3 arguments, you supply only 2.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.