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

Explain about Overloading vs Overriding ?

733


If a method definition has been specified in the base class and the interface which the class is implementing, which definition will be picked if we try to access it using interface reference and class object?

698


what three "domains" are considered during analysis modeling?

6624


Is @functionalinterface annotation mandatory to define a functional interface? What is the use of @functionalinterface annotation? Why do we need functional interfaces in java?

921


Can you create an instance for an abstract class?

704


Can we reduce the visibility of the inherited or overridden method ?

776


If a method definition has been specified in class , its base class , and the interface which the class is implementing, which definition will be picked if we try to access it using interface reference and class object?

723


What are the interfaces you used in beans?

704


Why is OOP good?

743


What is the main difference between a class and an object?

750


Define Data Abstraction. What is its importance?

737


If a class inherits an interface, what are the 2 options available for that class?

715


What is the main difference between overloading and overriding?

770


Explain about a class in oop?

740


How many methods do u implement if implement the serializable interface?

708