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, 22.06.2019 11:00
The editing of digital photos us about the same level of difficulty as editing an analog photo
Answers: 2
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 11:00
What is the name of the sound effect that danny hears
Answers: 1
question
Computers and Technology, 23.06.2019 23:00
Lucas put a lot of thought into the design for his company's new white paper. he made sure to include repeating design elements such as color schemes and decorative images. his goal was to a.add symmetry b.create a unified publication c.provide consistency d.save money
Answers: 1
You know the right answer?
Class Book represents information about any textbook and has two attributes: Title and Author, where...
Questions
question
Mathematics, 27.08.2019 19:00
Questions on the website: 13722367