Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Computer Performance Engineering 10th European Workshop Epew 2013 Venice Italy September 17 2013 Proceedings

Authors: Maria Simonetta Balsamo ,William Knottenbelt ,Andrea Marin

2013 Edition

3642407242, 978-3642407246

More Books

Students also viewed these Programming questions

Question

3. What is international direct investment?

Answered: 1 week ago

Question

Name and summarize the goals of compensation professionals.

Answered: 1 week ago