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 is the last index number in an array of 100 characters a) 100 b) 99 c) 101
When to use “const” reference arguments in a function?
If a round rectangle has straight edges and rounded corners, your roundrect class inherits both from rectangle and from circle, and they in turn both inherit from shape, how many shapes are created when you create a roundrect?
Is ca high or low level language?
Explain how overloading takes place in c++?
How does the copy constructor differ from the assignment operator (=)?
How does work in c++?
What are keywords in c++?
Define a nested class. Explain how it can be useful.
If you want to share several functions or variables in several files maitaining the consistency how would you share it?
How do you find out if a linked-list has an end?
What are friend classes?
Why namespace is used in c++?
What is vector processing?
In int main(int argc, char *argv[]) what is argv[0] a) The first argument passed into the program b) The program name c) You can't define main like that