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 are disadvantages of pointers?
Difference between struct and class in terms of access modifier.
What are advantages of C++ when comparing with C?
18 Answers HP, iGate, TCS,
What do you mean by storage classes?
How many bit combinations are there in a byte?
What is operators in c++?
Difference between Constructors and static constructors?
What are the various compound assignment operators in c++?
What is the benefit of learning c++?
What is the basic structure of a c++ program?
Is c++ a dying language?
Difference between inline functions and macros?