A Book has a title, author, and publishing company (all Strings). Code two constructors (a no-argument constructor
Fantastic news! We've Found the answer you've been seeking!
Question:
A Book has a title, author, and publishing company (all Strings). Code two constructors (a no-argument constructor and an argument constructor). See page 160 for an example with a no-argument constructor, and page 156 Lines 14-18 for an example of a consructor with arguments.
Note": In this program, instance variables are strings, so the no-argument constructor will initialize the instance variables to empty ("") strings.
e.g. title = ""; Add set and get methods.
Add a demo class with the main method and create two book objects using two different constructors (no-argument and argument).
Display the book's information.
Submit Book.java, BookDemo.java, output screenshot.
Posted Date: