[Tutor] cases with single if and an else clause
Alan Gauld
alan.gauld at yahoo.co.uk
Tue Oct 5 18:48:48 EDT 2021
On 05/10/2021 19:39, Dennis Lee Bieber wrote:
> (even in OOP, once one gets down to coding class methods, one should be
> back to structured programming)
Kind of, except...
Structured programming says to pass the state values in as
parameters.
In OOP we tend to rely on using instance attributes to hold
state and its perfectly OK for methods to access that state
directly. But that nuance aside, the structure of the methods
follows SP principles.
--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos
More information about the Tutor
mailing list