posted by
bugshaw at 06:24pm on 05/11/2005
Typing up my student's lecture notes this evening (Java objects and classes), I found the following come out onto the page:
mum is an object of the Parent class; son is an object of the Child class.
The mum object sends a message “Pull up your socks” to the son object, who performs the pullUpSox() method. son’s socks are private to him – mum cannot access his socks directly.
Well, it made me laugh.
mum is an object of the Parent class; son is an object of the Child class.
The mum object sends a message “Pull up your socks” to the son object, who performs the pullUpSox() method. son’s socks are private to him – mum cannot access his socks directly.
Well, it made me laugh.
(no subject)
I automatically assumed that the Child class was a child class of the Parent class whereas you didnt actually say that it was.
Oh, ok, it made me laugh too.
(no subject)
I've just realised what my first LJ entry should have been -
"Hello, world"
(no subject)
That's when I laughed. Anyone who's been around younger kids knows that socks are quite public.
(no subject)
The tutor went on to discuss the potential problem whereby if there were multiple parents and children, anyparent could tell any child to pull their socks up - and how we must implement the code carefully to ensure that parents cannot talk to other people's children like that!