Question
To write to C++ 1. To create an abstract class Page to describe the text on apage of a book. Private member variable: 1.a Content
To write to C++
1. To create an abstract class "Page" to describe the text on apage of a book.
Private member variable:
1.a Content (string)
Public functions:
1.2 Default constructor
1.3 Explicit constructor
1.4 To read and rewrite a member variable
1.5 Abstract method for obtaining a page number
1.6 Abstract method for exchanging the page with the reference to 1given as a parameter.
2. To create a "Book page" class, successor to 1.
Hidden member variable:
2.a page number (number)
Public constructors:
2.1 Default
2.2 Explicit
2.3 To read a member variable
2.4 To exchange the page with the page specified as a parameter
2.5 Redefining an operator 2.6 Redefining operator == depending onthe requirements of class 3.
2.7 Redefining a Streaming Operator <<
2.8 Redefining a stream reader operator >>
3. To create a class book, a hidden article variable
3.a vector of objects 2.
3.1 Default constructor
3.2 Explicit constructor with parameter number of pages and contentof the title page
(the title of the book is on page number zero). Numbers the pages,starting from 1 to the instructions
number inclusive. Public functions:
3.3 To add a page, parameter object II. Duplicate page numbersare not allowed, but
the content of an existing one can be changed
3.4 Check if there is a page with the specified page number in thevector
3.5 To change a page, parameter object 2. Changes the content ofthe page, if any
3.6 To delete a page. Parameter is the page number. Remove fromthe book if exists.
3.7 To exchange pages. Parameters are page numbers. If there arepage numbers,
submitted as the parameter they are exchanged
3.8 To calculate how many times the digit (int) given as aparameter occurs in everyone's numbers
pages of the book.
3.9. Redefine output operator <<
4. Main function:
4.1 Creates an object with 3.2 Outputs;
4.2. Removes objects with random numbers using 3.6 Displays;
4.3 Modify a page using 3.5 displays;
4.4. Calculates using 3.8 outputs the result
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started