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

Another question on English

question
English, 22.06.2019 06:30
You’ve taken your first step into the world development. write a paragraph describing your thoughts on html. write 150 words on what kind of website you would make in the future? what sides would you like to model yours after?
Answers: 3
question
English, 22.06.2019 09:20
2points how might kafka's relationship with his father have affected his writing? what’s the answer
Answers: 1
question
English, 22.06.2019 10:00
Where did madame loisel likely lose the necklace? a: at the ministers house b: in the taxi c: on the walk home d: the text gives no hint
Answers: 2
question
English, 22.06.2019 10:10
What is the most important point that the authors make in this paragraph? most enslaved people worked under fair to good conditions. enslaved workers had decent lives if they had fair overseers. plantations often were harsh because of the cruelty of those in charge. men with absolute power can lose the sense of what it means to be good.
Answers: 1
You know the right answer?
Class Book represents information about any textbook and has two attributes: Title and Author, where...
Questions
question
Chemistry, 03.02.2021 21:50
question
Spanish, 03.02.2021 21:50
question
Spanish, 03.02.2021 21:50
Questions on the website: 13722367