Answer Posted / 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 |
Post New Answer View All Answers
Is there any difference between int [] a and int a [] in c++?
Why do we need function?
Do you know about C++ 11 standard?
Why main function is special in c++?
What is the difference between a reference and a pointer?
What is ios :: in in c++?
What do you mean by global variables?
Write a program to add three numbers in C++ utilizing classes.
What is void pointer in c++ with example?
How does class accomplish data hiding in c++?
What do you mean by a template?
Refer to a name of class or function that is defined within a namespace?
Define a pointer to a data member of the type pointer to pointer?
What are the advantages of inheritance in c++?
Do class declarations end with a semicolon? Do class method definitions?