Computers and Technology
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)

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 10:30, Twitches
This first part of the film shows the early history of motion pictures. how accurate do you think the portrayal of the early motion picture industry is? why? is historical accuracy important in films and theatre productions? explain. in the scene where don is going to the party (starting at time code 14: 51), we see a street scene as he first rides with cosmo and then with kathy. what aspects did the filmmaker include to make the scene look and feel like don, cosmo, and kathy are riding in a car on a street? think about elements such as scenery, sound, props, lighting, and so on. a "talkie" picture is shown starting around time code 21: 15. how does the audience in the film react to the "talkie"? what influence do audiences have on film and theatre performances? how do film and theatre actors influence audiences? in the musical scene with cosmo (starting at time code 27: 00), how does the actor use props? what is the result? do you think the use of props effectively fulfilled the artistic vision for this musical number? why or why not?
Answers: 1
image
Computers and Technology, 23.06.2019 00:30, lm18618
Which one of the following is considered a peripheral? a software b mouse c usb connector d motherboard
Answers: 2
image
Computers and Technology, 23.06.2019 12:40, melaniem50
Curriculum exam to process a resident's payment, you must click on onesite payments home page. from the a. reports b. my settings o c. transactions o d. rent tab
Answers: 1
image
Computers and Technology, 23.06.2019 22:30, cuki96
Lakendra finished working on her monthly report. in looking it over, she saw that it had large blocks of white space. what steps could lakendra take to reduce the amount of white space?
Answers: 3
Do you know the correct answer?
Class Book represents information about any textbook and has two attributes: Title and Author, where...

Questions in other subjects:

Konu
Mathematics, 22.04.2021 21:50