Explian following terms: Constraint Rules, Design by
contract.

Answer Posted / debalina

Design by contract :Design by contract, DBC or Programming
by contract is an approach to designing computer software.
It prescribes that software designers should define precise
verifiable interface specifications for software components
based upon the theory of abstract data types and the
conceptual metaphor of a business contract.Because "Design
by Contract" is a trademark of Eiffel Software, the
maintainers of Eiffel, many developers will refer to it
only as programming by contract or contract-first
development. The principal idea of Design by Contract (DBC)
is that a class and its clients have a contract with each
other: The client must guarantee certain conditions before
calling a method specialized on the class (the
preconditions), the class guarantees certain properties
after the call (the postconditions). If the pre- and
postconditions are included in a form that the compiler can
check, then any violation of the contract between caller
and class can be detected immediately.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the @functionalinterface annotation?

542


What is abstraction? How does it differ from encapsulation

532


Tell me something about abstract classes?

570


Write basic concepts of oops?

574


Why is java not fully objective oriented?

595






What is the use of destructive method?

547


Can an interface implement or extend another interface?

563


What is constructor and virtual function? Can we call virtual funciton in a constructor?

609


Can different parts of a partial class inherit from different interfaces?

567


What is the use of ‘finalize’?

621


What is the function of pure virtual functions?

522


What are all the operators that cannot be overloaded?

552


What is meant by “abstract interface”?

613


What is operator overloading?

725


Difference between encapsulation and data hiding ?

515