What is a protocol class?

Answer Posted / harendra pal

An abstract class is a protocol class if:
 it neither contains nor inherits from classes that contain member data, non-virtual functions, or private (or protected) members of any kind.
 it has a non-inline virtual destructor defined with an empty implementation,
 all member functions other than the destructor including inherited functions, are declared pure virtual functions and left undefined.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can I create my own functions in c++?

605


Is it legal in c++ to overload operator++ so that it decrements a value in your class?

613


Which should be more useful: the protected and public virtuals?

604


What is setfill c++?

683


Difference between inline functions and macros?

600






Differentiate between the message and method in c++?

612


Why is that unsafe to deal locate the memory using free( ) if it has been allocated using new?

633


What are multiple inheritances (virtual inheritance)? What are its advantages and disadvantages?

572


Comment on assignment operator in c++.

713


Explain the uses of static class data?

599


What is constructor and destructor in c++?

619


What is abstraction in c++ with example?

564


What is const pointer and const reference?

596


which of the following is not an secondary constant a) array b) real c) union

1271


What relational operators if statements in c++?

646