• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Design by contract

 
Ritika Saxena
Ranch Hand
Posts: 51
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What does "Design by Contract" mean in Java?
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Tanveer Ahmad
Ranch Hand
Posts: 33
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"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
Posts: 8791
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2940
5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 14112
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic