Question: public class Book { private String author; private String title; public Book(String the_author, String the_title) { author = the_author; title = the_title; } } public

public class Book

{

private String author;

private String title;

public Book(String the_author, String the_title)

{

author = the_author;

title = the_title;

}

}

public class Textbook extends Book

{

private String subject;

public Textbook(String the_author, String the_title, String the_subject)

{

/* missing implementation */

}

}

Which of the following can be used to replace /* missing implementation */ so that the Textbook constructor compiles without error?

  • A) author = the_author;

    title = the_title;

    subject = the_subject;

  • B) super(the_author, the_title);

  • super(the_subject);

  • C) subject = the_subject;

    super(the_author, the_title);

  • D) super(the_author, the_title);

    subject = the_subject;

  • E) super(the_author, the_title, the_subject);

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!