I C\Users\hp\Documents\example 4.exe enter Book Title visual Programming enter pages B00 enter price 500 Details of Object 1.. Book Title Pages Price = Visual Programming = 300 = 500 Details of Object...


Write a C++ Program in which a class name
Book
that has attributes
pages, price
and
title. It has the following member functions:





  • Input ( )
    function is used to initialize the data members i.e.
    pages, price
    and


  • Display ( )
    function is used to display all the values of data members.



Create three Objects of the class and by using
copy constructorto copy object 1 values to object 2 & 3 and print all the object’s data as shown in the Output below.



I C\Users\hp\Documents\example 4.exe<br>enter Book Title<br>visual Programming<br>enter pages<br>B00<br>enter price<br>500<br>Details of Object 1..<br>Book Title<br>Pages<br>Price<br>= Visual Programming<br>= 300<br>= 500<br>Details of Object 2..<br>Book Title<br>Pages<br>Price<br>= Visual Programming<br>= 300<br>= 500<br>Details of Object 3..<br>Book Title<br>Pages<br>Price<br>= Visual Programming<br>= 300<br>= 500<br>

Extracted text: I C\Users\hp\Documents\example 4.exe enter Book Title visual Programming enter pages B00 enter price 500 Details of Object 1.. Book Title Pages Price = Visual Programming = 300 = 500 Details of Object 2.. Book Title Pages Price = Visual Programming = 300 = 500 Details of Object 3.. Book Title Pages Price = Visual Programming = 300 = 500

Jun 06, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here