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 do you mean by public protected and private in c++?
What are templates? where we should use it?
difference between c and c++?
38 Answers Cognizant, IBM, Infosys, Oracle, Sarva Shiksha Abhiyan, Wipro,
What is increment operator in c++?
How to implement flags?
Why is the function main() special?
What is the meaning of c++?
write program for palindrome
81 Answers Amazon, Aricent, CSC, GE, HCL, Infosys, Syntel, Temenos, Wipro,
What is private, public and protected inheritance?
Explain queue. How it can be implemented?
Carry out conversion of one object of user-defined type to another?
What is the type of 'this' pointer?