subject
Engineering, 01.06.2020 12:57 ayoismeisalex

Class Book represents information about any textbook and has two attributes: Title and Author, where Title [String] is the book title (e. g. “Computer Organization and Architecture”) and author is an object of class Author which includes author’s name (e. g. “William Stallings”), Author-ID, Employer Name. Author class inherits class Person which includes First Name, Last Name, SSN, Gender.

Note that any string variable is variable length. So you need to use dynamic memory.

PART1

(a) Define class Book including all necessary data members and access member functions.

(b) Implement setter and getter methods for title and author.

(c) Implement constructor that takes required arguments
(d) Implement destructor.
(e) define a variable that can be used to store the number of active objects of the book class

PART 2

(a) Define classes Author & Person including all necessary data members and access member functions. Also define the inheritance between both classes.

(b) Implement setter and getter for data members. ]]

(c) Implement Constructors & Destructors.

(e) define a data member that can be used to store the number of active objects of the author class.

PART3

Write main program that do the following:

Creates an object (b1) of Book and another object (a1) of Author class.

Create a pointer to anonymous object of class Book (bptr).

Print author first name using bptr using required functions

Change employer name for a1 using required functions

Implement and use the required function to insert object details of author inside object of book as follows:

b1+=a1;
c++ c++ c++ c++ c++ c++ c++ c++ c++ c++ c++ c++ c++ c++ c++ c++ c++ c++ c++ c++ c++

ansver
Answers: 1

Another question on Engineering

question
Engineering, 04.07.2019 12:10
On a average work day more than work place firs are reorted
Answers: 1
question
Engineering, 04.07.2019 18:10
Thermal stresses are developed in a metal when its a) initial temperature is changed b) final temperature is changed c) density is changed d) thermal deformation is prevented e) expansion is prevented f) contraction is prevented
Answers: 2
question
Engineering, 04.07.2019 19:10
How to increase the thermal officiency of an ideal simple rankino cycle? among these methods, which one is the best and why?
Answers: 2
question
Engineering, 04.07.2019 19:20
At steady state, air at 200 kpa, 325 k, and mass flow rate of 0.5 kg/s enters an insulated duct having differing inlet and exit cross-sectional areas. the inlet cross-sectional area is 6 cm2. at the duct exit, the pressure of the air is 100 kpa and the velocity is 250 m/s. neglecting potential energy effects and modeling air as an 1.008 kj/kg k, determine ideal gas with constant cp = (a) the velocity of the air at the inlet, in m/s. (b) the temperature of the air at the exit, in k. (c) the exit cross-sectional area, in cm2
Answers: 2
You know the right answer?
Class Book represents information about any textbook and has two attributes: Title and Author, where...
Questions
question
Mathematics, 18.03.2020 21:43
question
Spanish, 18.03.2020 21:43
question
Mathematics, 18.03.2020 21:43
Questions on the website: 13722360