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
What are the two types of comments?
How come you find out if a linked-list is a cycle or not?
What is the difference between strcpy() and strncpy()?
Give an example of run-time polymorphism/virtual functions.
Explain polymorphism?
What is c++ best used for?
Which compiler does turbo c++ use?
How does java differ from c and c++?
What do you know about near, far and huge pointer?
Is c++ fully object oriented?
Name the implicit member functions of a class.
What is while loops?
What is the meaning of c++?
Which should be more useful: the protected and public virtuals?
What is the difference between map and hashmap in c++?