Two Laptop Bag*
The moose likes OO, Patterns, UML and Refactoring and the fly likes Design by contract Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » OO, Patterns, UML and Refactoring
Bookmark "Design by contract" Watch "Design by contract" New topic
Author

Design by contract

Ritika Saxena
Ranch Hand

Joined: Jul 02, 2006
Posts: 51
What does "Design by Contract" mean in Java?
Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
What have you learned about Design By Contract outside Java? Describe what you think it means, and then think about whether Java can do those things.


A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
Tanveer Ahmad
Ranch Hand

Joined: Sep 20, 2005
Posts: 33
"Design by Contract" in Java means assert().
Actually Design by Contract has nothing to do with JAVA as such. It is a design methodology.
Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
To be picky, Wikipedia claims "Design by Contract" is a trademark of Eiffel Software, the maintainers of Eiffel. For this reason, many developers will refer to it only as programming by contract or contract-first development. They also list a number of 3rd party libraries that help use the DBC method in Java.

But back to the original poster ... what makes you interested in it? What problems do you think it solves? I'm trying to prod you into some research and explaining your findings. Frankly I don't know much about it, and your answers will be interesting.
Peer Reynders
Bartender

Joined: Aug 19, 2005
Posts: 2921
    
    5
Originally posted by Stan James:
"Design by Contract" is a trademark of Eiffel Software, the maintainers of Eiffel.


Design By Contract -> Bertrand Meyer: Object-Oriented Software Construction -> Eiffel.
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
Originally posted by Tanveer Ahmad:
"Design by Contract" in Java means assert().


Where do you get that from? To me, DBC means much more than just using the assert statement.


The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Design by contract
 
Similar Threads
Design by Contract
Difference between object and instance
about parameter check
WA #1.....word association
Post-Condition for "Change Itinerary"