Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

What is class invariant?

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


Please Help Members By Posting Answers For Below Questions

Is there any difference between int [] a and int a [] in c++?

1014


Why do we need function?

1049


Do you know about C++ 11 standard?

1084


Why main function is special in c++?

1117


What is the difference between a reference and a pointer?

1105


What is ios :: in in c++?

1068


What do you mean by global variables?

1074


Write a program to add three numbers in C++ utilizing classes.

1111


What is void pointer in c++ with example?

1088


How does class accomplish data hiding in c++?

1167


What do you mean by a template?

1066


Refer to a name of class or function that is defined within a namespace?

1111


Define a pointer to a data member of the type pointer to pointer?

980


What are the advantages of inheritance in c++?

1099


Do class declarations end with a semicolon? Do class method definitions?

1146