Consider a Note Book class which is the base class that holds Data fields named manufacturer ID (of integer type) and manufacturer Name (of string type). • A two-argument constructor to initialize data-fields with user-defined values • Appropriate accessor and mutator functions to set and get values of data fields . Derive two classes from the Note Book class: • ENotebook, which contains an attribute size of integer type and a setter member function to set size value. • PaperNoteBook, which contains an instance variable named total Pages along with a member function to set total number of pages in a certain paper notebook object. • Both derived classes have function display to show all data field values (including values inherited from the base class).  In the main() function, create objects of ENoteBook and PaperNoteBook classes and show the advantages of using protected access specifier. Both object display the all attributes and functionality of the respective cla

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter11: Inheritance And Composition
Section: Chapter Questions
Problem 1PE: In Chapter 10, the class clockType was designed to implement the time of day in a program. Certain...
icon
Related questions
Question

Consider a Note Book class which is the base class that holds Data fields named manufacturer ID (of integer type) and manufacturer Name (of string type). • A two-argument constructor to initialize data-fields with user-defined values • Appropriate accessor and mutator functions to set and get values of data fields

. Derive two classes from the Note Book class: • ENotebook, which contains an attribute size of integer type and a setter member function to set size value. • PaperNoteBook, which contains an instance variable named total Pages along with a member function to set total number of pages in a certain paper notebook object. • Both derived classes have function display to show all data field values (including values inherited from the base class).

 In the main() function, create objects of ENoteBook and PaperNoteBook classes and show the advantages of using protected access specifier. Both object display the all attributes and functionality of the respective class.

 

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Software Development
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,