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)
Answers: 3
Computers and Technology, 23.06.2019 22:20, tagerryawilson6
If i uninstall nba 2k 19 from my ps4 will my career be gone forever?
Answers: 2
Computers and Technology, 24.06.2019 00:30, lovemusic4
Setting up a home network using wireless connections is creating a a. vpn b. lan c. wan d. mini-internet
Answers: 2
Computers and Technology, 24.06.2019 08:00, Maxxboogie
Can someone work out the answer as it comes up in one of my computer science exams and i don't understand the cryptovariables
Answers: 1
Class Book represents information about any textbook and has two attributes: Title and Author, where...
Computers and Technology, 05.10.2019 21:30
Social Studies, 05.10.2019 21:30
Social Studies, 05.10.2019 21:30
Mathematics, 05.10.2019 21:30