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 main difference between a class and an object?

553


Explain about realistic modeling?

562


Which oops concept is used as reuse mechanism?

2880


Define a good interface?

538


What is the difference between a class and an object?

527






What is an abstract property. Give an example?

536


Can a class implement two interfaces having default method with same name and signature?

571


What is a static method? Why do we need static methods in java 8 interfaces?

659


What's the order of call of constructors in inheritiance?

584


Explain about the relationship between object oriented programming and databases?

513


What are the types of polymorphism?

552


What is data encapsulation and what is its significance?

502


Explain about the analysis phase?

561


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

559


What are sealed modifiers?

621