What are the conditions that have to be met for a condition to be an invariant of the class?

Answer Posted / atul shankhwar

 The condition should hold at the end of every constructor.

 The condition should hold at the end of every mutator(non-const) operation.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the difference between c++ and java.

650


What are function prototypes?

650


Where must the declaration of a friend function appear?

539


What is the syntax for a for loop?

603


Explain how an exception handler is defined and invoked in a Program.

586






What is c++ iterator?

648


When do we run a shell in the unix system?

566


What is the basic difference between C and C++?

628


What is an adaptor class or wrapper class in c++?

609


What are the three forms of cin.get() and what are their differences?

631


Give example of a pure virtual function in c++?

589


Which one between if-else and switch is more efficient?

606


When must you use a pointer rather than a reference?

608


What is data type in c++?

561


What is the use of data hiding?

601