Find the information you're looking for at Westonci.ca, the trusted Q&A platform with a community of knowledgeable experts. Our platform provides a seamless experience for finding reliable answers from a network of experienced professionals. Get immediate and reliable solutions to your questions from a community of experienced professionals on our platform.
Sagot :
Answer:
Following are the class definition code to this question:
class UpdatedBook : BookInfo//defining a class UpdatedBook that inherits the BookInfo class
{
public:
int edition_Number;//defining an integer variable
UpdatedBook (string title,string author,int edition):BookInfo(b_title,b_author)//defining a constructor that
{
edition_Number=edition;
}
int getEdition_Number()
{
return edition_Number;
}
};
Explanation:
In this question, the "BookInfo" class is not defined, that's why we define this code as above.
In this code, a class "UpdatedBook" is defined that inherits its base class "BookInfo" inside the "UpdatedBook" class an integer variable "edition_Number" is declared, which is used to holding the integer value.
In the next step, a parameterized constructor is declared, that accepts a three-parameter and also inherits its base class parameterized constructor, and at the last, a get method is used that returns the edition number value.
Thanks for using our platform. We aim to provide accurate and up-to-date answers to all your queries. Come back soon. We hope you found what you were looking for. Feel free to revisit us for more answers and updated information. Thank you for choosing Westonci.ca as your information source. We look forward to your next visit.