subject
Computers and Technology, 04.06.2020 13:14 gacyber

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. (2pts)

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

(c) Implement constructor that takes required arguments (1.5 pts)

(d) Implement destructor. (1.5 pts)

(e) define a variable that can be used to store the number of active objects of the book class

(bonus 1 pt)

PART 2

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

(b) Implement setter and getter for data members. (3pts)

(c) Implement Constructors & Destructors. (1pts)

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

PART3

Write main program that do the following:

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

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

Print author first name using bptr using required functions (1.5pts)

Change employer name for a1 using required functions (1.5pts)

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

b1+=a1; (Bonus 2 pts)

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 03:30
Ihave a singular monitor that is a tv for my computer. recently, i took apart my computer and put it back together. when i put in the hdmi cord and booted the computer to see if it worked, the computer turned on fine but the screen was blue with "hdmi no signal." i've tried everything that doesn't require buying spare parts, any answer is appreciated!
Answers: 1
question
Computers and Technology, 23.06.2019 04:00
In a word processing program, such as microsoft word, which feature to you choose the desired picture enhancement?
Answers: 2
question
Computers and Technology, 23.06.2019 06:30
How do you write an argumentative essay about the importance of free enterprise ?
Answers: 1
question
Computers and Technology, 23.06.2019 07:30
What are ways to switch windows in excel? check all that apply. on the status bar, click the windows button, and then click the file name. on the task bar, click to display the excel jump list, and then click the file name. on the view tab, in the window group, click switch windows, and then click the file name. on the review tab, in the viewing group, click files, and then click the file name.
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: 13722360