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
Different types of steels contain different elements that alter the characteristics of the steel. for each of the following elements, explain what the element does when alloyed with steel.
Answers: 2
question
Engineering, 04.07.2019 18:10
Which of the following components of a pid controlled accumulates the error over time and responds to system error after the error has been accumulated? a)- proportional b)- derivative c)- integral d)- on/off.
Answers: 2
question
Engineering, 04.07.2019 18:10
Ifa component is made of two or more materials with different modulus of elasticity (e), it is called a composite member and we calculate the factor·n". mention the formula for calculating n". also, ifn> 1, explain what will happen to the 1. transformed.gi) ifn 1, what will happen to the material when transformed material when
Answers: 1
You know the right answer?
Class Book represents information about any textbook and has two attributes: Title and Author, where...
Questions
Questions on the website: 13722363