Question: Your Book class must have two member variable ( field ) , which is: a string, which holds a title a string, which holds an
Your Book class must have two member variable field which is:
a string, which holds a title
a string, which holds an author
You can name the field any name you want.
Your book will have a default constructor and an overloaded control. By default, the default constructor should:
Set the title to "MobyDick"
Set the author to "Herman Melville"
In addition, your book should have an overloaded constructor that accepts both an author and a title and sets the appropriate fields.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
