What is class invariant in c++, Computer Engineering

A class invariant is a condition that describes all valid states for an object. It is a logical condition to make sure the correct working of a class. Class invariants must hold when an object is formed, 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.

 

 

Posted Date: 4/8/2013 3:36:31 AM | Location : United States







Related Discussions:- What is class invariant in c++, Assignment Help, Ask Question on What is class invariant in c++, Get Answer, Expert's Help, What is class invariant in c++ Discussions

Write discussion on What is class invariant in c++
Your posts are moderated
Related Questions
What is library? A library is a collection of classes that are useful in most of the contexts. Classes must have accurate and thorough explanations to help users.

Difference between relocatable and self relocatable programs. A relocatable program is one which can be processed to relocate it to a selected area of memory. For illustratio

Explain Remote Procedure Call. RPC (Remote Procedure Call) : The facility which was created to help the programmers write client -server software is termed as Remote Procedu

An 8086 interrupt can take placedue to the following reasons: 1.  Hardware interrupts caused by some external hardware device. 2.  Software interrupts that can be invoked wit

Explain about the e-commerce over extranets. Extranets are regarding “joining up” the supply chain-suppliers, distributors, resellers and customers are enabling business-to bus

Message passing is possible the most widely used parallel programming paradigm these days. It is the most portable, natural and efficient scheme for distributed memory systems. It

What are the process states in Unix? As a process implements it changes state according to its circumstances. Unix processes have the following states: Running : The process

E-mail system is mostly used for sending message electronically to group or individuals of individuals in inter and intra office environment. It needs networks to connect them. In

Make a file "parts_inv.dat" that stores on each line a part number, cost, and quantity in inventory, e.g.: 123 5.99 52 456 3.97 100 333 2.22 567 Use fscanf to read this infor

Q. How to add CSS style to your page? Step 1: Click on Window Menu Step 2: Select CSS Styles Or Click on CSS Styles in the "Launcher" Step 3: Click on New to create a