Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please Slove part a,b and c . Only correct answer will be rate. (28 pts) Book with Pages (Parts a -c). Let's say we need

Please Slove part a,b and c . Only correct answer will be rate.

image text in transcribed

image text in transcribed

image text in transcribed

(28 pts) Book with Pages (Parts a -c). Let's say we need to design two classes, one named Page and one named Book. Each Page consists of an integer page number and no more than 500 English characters. The sequence of characters on a Page is always terminated by the null character. A Book consists of a title with no more than 50 characters (terminated by a null character) and no more than 650 Pages. a. (10 pts) Declare the Page class based on the description above. There are many operations that we could define for a Page, but we are only going to look at a subset for this problem. All attributes should be private. The class should declare the following member operations/functions only: i, (2 pts) A constructor with one parameter for setting the page number ii. (2 pts) A const function called get PageNumber ( ) for getting the page number ifi. (2 pts) A const function called getIsCurrentPage ) for getting the status of the page, i.e if it is the current page being read (true) or not (false) (2 pts) A function called printPage () for displaying each character on the pag iv. e to the screen (should not be done by overloading the stream in sertion operator). This function should not accept any arguments and should not return a value. class Page Dublic:/ Should contain four prototvoes/derlaratin

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

Focus On Geodatabases In ArcGIS Pro

Authors: David W. Allen

1st Edition

1589484452, 978-1589484450

More Books

Students also viewed these Databases questions