PASCAL:
program HelloWorld
begin
write ('Hello World')
end.
JAVA:
class Message
{
public static void main (String args[ ])
{
Message helloWorld = new Message ( );
helloWorld.printMessage ( );
}
void printMessage ( )
{
System.out.print ("Hello World");
}
}
These two programs perform exactly the same function. It is not difficult to see that the early generation Pascal program is very simple and easy to understand, most students and even most ordinary adults would have no problem understanding what is going on.
The Java program on the other hand is much longer, uses a range of complex programming words, many of which have difficult concepts associated with their use, and is much more difficult to understand. Faced with this as their first exposure to the simplest of introductory programs it is not surprising that many students are overwhelmed and confused.
http://www.bcs.org/c...ConWebDoc/18854
Whether it's good or not to teach OOP from the beginning is a bit debatable, but such an example is ridiculous...

New Topic/Question
Reply



MultiQuote








|