Answer to Question #251735 in C++ for Gulli

Question #251735
Q2: Answer the questions (i) to (iv) based on the following:
class Publisher
{
char pub[12];
double turnover;
protected:
void register();
public:
Publisher();
void enter();
void display();
};

class Branch
{
char city[20];
protected:
float employees;
public:
Branch();
void haveit();
void giveit();
};

class Author : private Branch, public Publisher
{
int acode;
char aname[20];
float amount;
public:
Author();
void start();
void show();
};
i. Write the names of data members, which are accessible from objects belonging to class Author.
ii. Write the names of all the member functions which are accessible from objects belonging to class Branch.
iii. Write the names of all the members which are accessible from member functions of class Author.
iv. How many bytes will be required by an object belonging to class Author?
1
Expert's answer
2021-10-16T11:03:57-0400

i) No data members, objects can only access member functions enter(), display(), start(), show()

ii) haveit(), giveit()

iii) amount, aname, acode, employees

iv) 72


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS