What is class invariant?
Answer / subham chaudhary
A class invariant is a condition that defines all valid states for an object. It is a logical condition to ensure the correct working of a class. Class invariants must hold when an object is created, and they must be preserved under all operations of the class. In particular all class invariants are both preconditions and post-conditions for all operations or member functions of the class.
Is This Answer Correct ? | 0 Yes | 0 No |
What is the difference between operator new and the new operator?
What is auto type c++?
Can we make copy constructor private in c++?
advantages and disadvantages of using Borland C++ / version 5.
Is c++ a high level language?
What does '\r' and '\b' mean? Please explain with example.
Please explain the reference variable in c++?
Why is c++ still used?
Is java easier than c++?
What do you mean by abstraction in C++?
What are the conditions that have to be met for a condition to be an invariant of the class?
Write a program which uses Command Line Arguments