Postcondtions and return values
From: Ken (kk_oop_at_yahoo.com)
Date: 02/27/04
- Next message: Alan Gauld: "Re: Yourdon & Coad Object Model??"
- Previous message: Vladimir Levin: "Re: Association or Inheritance"
- Next in thread: H. S. Lahman: "Re: Postcondtions and return values"
- Reply: H. S. Lahman: "Re: Postcondtions and return values"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 27 Feb 2004 14:18:58 -0800
Hi.
When using Design by Contract, if a method returns a value that is not
the owning object's state, is the value returned still a
postcondition? For example, maybe some Calculator object has a sine
method that takes a parameter of x. Would the a postcondition be that
sine of x is returned, even though that has nothing to do with the
state of the calculator? I think the information is useful to the
client, so I would think it would be a postcondition, but I just
wanted to get the opinions of others.
Thanks,
Ken
- Next message: Alan Gauld: "Re: Yourdon & Coad Object Model??"
- Previous message: Vladimir Levin: "Re: Association or Inheritance"
- Next in thread: H. S. Lahman: "Re: Postcondtions and return values"
- Reply: H. S. Lahman: "Re: Postcondtions and return values"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]