subject
English, 31.05.2020 03:57 glocurlsprinces

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: 2

Other questions on the subject: English

image
English, 21.06.2019 13:40, saja19
Which  two  sections of text in these excerpts from virginia woolf's  mrs. dalloway  deal with the motif of water?
Answers: 3
image
English, 22.06.2019 05:30, vett072804
Type the correct answer in the box. spell all words correctly. which fungus affects the american chestnut? fungus affects the american chestnut.
Answers: 1
image
English, 22.06.2019 06:30, laureleiolson
According to the article "clemente's impact wanes in puerto rico 40 years after his death," what happens in puerto rico in 2012 to celebrate the anniversary of clemente's 3000th hit?
Answers: 2
image
English, 22.06.2019 06:30, helo55
Which of the following would not be a good supporting sentence for an example paragraph with the following topic sentence?
Answers: 1
You know the right answer?
Class Book represents information about any textbook and has two attributes: Title and Author, where...

Questions in other subjects:

Konu
Mathematics, 04.09.2020 19:01
Konu
Biology, 04.09.2020 19:01