Write a complete C++ program that implements the followings: A. A class called Books. The class Books private data members should include: 1. Title: array of 30 char variables. 2. ISBN: pointer to an int variable. 3. Orders: array of 7 double variables. The class Books also should include the following public member functions: 4. For each data member: Title, ISBN, and Orders provide a parametrized Set function to store the received parameters for each one of them. 5. For each data member: Title, ISBN, and Orders provide an empty Get function to return the value for each one of them. 6. Provide the parametrized function TotalCost that returns the Orders summation multiplied by Price. Price a double parameter received by this function. B. The main function should include: 1. Definition for the object OBJ from the class Books. 2. Calling statements for the Set functions of the object OBJ. Prompt to the user to enter arguments to be passed for the functions. 3. Print the information for the object OBJ by calling the Get functions, and the TotalCost function. Prompt to the user to enter the arguments Price.

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter12: Adding Functionality To Your Classes
Section12.2: Providing Class Conversion Capabilities
Problem 2E
icon
Related questions
Question
Write a complete C++ program that implements the followings: A. A class called Books. The class Books private data members should include: 1. Title: array of 30 char variables. 2. ISBN: pointer to an int variable. 3. Orders: array of 7 double variables. The class Books also should include the following public member functions: 4. For each data member: Title, ISBN, and Orders provide a parametrized Set function to store the received parameters for each one of them. 5. For each data member: Title, ISBN, and Orders provide an empty Get function to return the value for each one of them. 6. Provide the parametrized function TotalCost that returns the Orders summation multiplied by Price. Price a double parameter received by this function. B. The main function should include: 1. Definition for the object OBJ from the class Books. 2. Calling statements for the Set functions of the object OBJ. Prompt to the user to enter arguments to be passed for the functions. 3. Print the information for the object OBJ by calling the Get functions, and the TotalCost function. Prompt to the user to enter the arguments Price.
Expert Solution
steps

Step by step

Solved in 2 steps with 4 images

Blurred answer
Knowledge Booster
Reference Types in Function
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++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr