|Subject:||Re: Programming it's a play|
|Date:||Sat, 20 Sep 2003 17:14:08 +0100|
|User-agent:||Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5b) Gecko/20030912 Thunderbird/0.3a|
I picked up working at the Objective-C programming guide. The last couple of weeks I have been working on the Guide and have been reading a lot of documentation. The more I read the less happy I was with the Wheel example off the current Guide for Classes and Objects.
So I need an new idea. The following is what I came up with to explain the OO programing terms. I would like people to review the following text to see if that can be used as an explanation of Objective-C programming.
Sorry for the docbook layout stuff, but I just cut everything from myVersion of the Programming Guide.
Thanks for any input/remarks etc.
<para>If we are a school for actors we have a written definition of what an actor is. From the <ulink url="" class="moz-txt-link-rfc2396E" href="http://dictionary.cambridge.org/">"http://dictionary.cambridge.org/">The cambridge dictionary</ulink> a description might be: <cite>someone who pretends to be someone else while performing in a film, theatrical performance, or television or radio programme</cite>.</para>
<para>With the above we have defined a class. In this case everyone that fits within the above description is an actor. The oposite is also true, everyone who wants to be an actor has to perform the above definition.</para>
<para>As soon as a person takes a course at our school we will educate her to be come an actor, which equals to our programming a class. When she finishes our lessons she is an actor, this is the compiling. As long as the compiling is not successful the lessons aren't finished. When the compiling succeeds we have created a class object, namely an actor, able to perform any role.</para>
<para>But as the above definition says she will only be a true actor, when she performs, she has to perform in e.g a play. Since every play is different she has to learn a role (get specific, play related, information: instance variables). When she plays the role she has then become our object.</para>
<para>The events happening on stage are the messages on which our actress acts.</para>
<para>Our actress of course is also female, so her root class is females. And she inherits from her female root class all methods that make her female.</para>
Discuss-gnustep mailing list
|[Prev in Thread]||Current Thread||[Next in Thread]|