[1848] in java-interest

home help back first fref pref prev next nref lref last post

Basic OOP question

daemon@ATHENA.MIT.EDU (Timothy Arnold)
Mon Sep 18 19:48:02 1995

Date: Fri, 15 Sep 1995 13:42:28 -0700
To: java-interest@java.Eng.Sun.COM
From: yimmit@well.com (Timothy Arnold)

Hello,

        Time for another freshmen question. This time about object oriented
philosophy. I'll try to make this quick. Looking at the code for the NervousText
class written by Daniel Wyszynski et. al., I noticed a couple of member
functions
referenced without the use of objects:

        public void run(){
          while(killme != null){
          Thread.sleep(100);
          setCoords();
          repaint();
        }
        killme=null;
        }

        Now I thought an object (in this case an individual letter) would want
to send itself a message e.g. :
                g.setCoords(); "set my coordinates"
                g.repaint(); "repaint me"
There were a couple other examples in this program but I dont want to eat up
space
and time. Do creating objects for smaller programs just create extra work thats
not nessesary? At the end of the program the letters are printed out as objects:
g.drawChars(....)

                        Curious in NY,
                        Tim Arnold 
-
Note to Sun employees: this is an EXTERNAL mailing list!
Info: send 'help' to java-interest-request@java.sun.com

home help back first fref pref prev next nref lref last post