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 18:10
Refrigerant 134a enters an insulated compressor operating at steady state as saturated vapor at -26°c with a volumetric flow rate of 0.18 m3/s. refrigerant exits at 9 bar, 70°c. changes in kinetic and potential energy from inlet to exit can be ignored. determine the volumetric flow rate at the exit, in m3/s, and the compressor power, in kw.
Answers: 1
question
Engineering, 04.07.2019 18:10
Afour cylinder four-stroke in-line engine has a stroke of 160mm, connecting rod length of 150mm, a reciprocating mass of 3kg and its firing order is 1-3-4-2. the spacing between cylinders is 100mm. i. show that the engine is in balance with regard to the primary inertia forces and primary 3. a and secondary inertia couples. li determine the out of balance secondary inertia force ii. propose ways of balancing this out of balance force and discuss the challenges that will arise
Answers: 3
question
Engineering, 04.07.2019 18:10
Ahot wire operates at a temperature of 200°c while the air temperature is 20°c. the hot wire element is a tungsten wire of 5 um diameter and 2 mm in length. plot using excel current, heat transfer and heat generated by the wire for air velocity varying from 1-10 m/s in steps of lm/s? matlab the sensor voltage output, resistance, or assume nu 0.989 re033pr13 take air properties at tr (200°c20°c)/2 = 110°c properties of tungsten: c 0.13 kj/kg.k 3 p 19250 kg/m k (thermal conductivity) = 174 w/m.k
Answers: 2
question
Engineering, 04.07.2019 18:10
Which one from below is not one of the reasons of planning failures? (clo3) a)-planner is careless. b-planner spend less time in the field but more time on the desk c)-planner is not qualified d)-planner does not have sufficient time to properly plan
Answers: 3
You know the right answer?
Class Book represents information about any textbook and has two attributes: Title and Author, where...
Questions
question
History, 12.09.2021 20:40
question
English, 12.09.2021 20:40
question
Biology, 12.09.2021 20:40
question
Mathematics, 12.09.2021 20:40
question
Physics, 12.09.2021 20:40
Questions on the website: 13722363