Monday, March 20, 2006

is it??

Objects Implement Roles
A convenient way to illustrate the difference between class inheritance and interface inheritance is to consider roles object may take on. The role of "The Terminator" may be described via:

interface Terminator {
public void doRandomViolence();
}

This role may be "played" by any number of objects such as:
class Arnold extends Actor implements Terminator {
public void doRandomViolence() {...}
...
}

and

class Dilbert extends Geek implements Terminator {
public void doRandomViolence() {...}
...
}
Arnold and Dilbert have totally different identities (Actor versus Geek,
respectively), but both may play the role of "The Terminator."
A single object may play multiple roles; e.g., Dilbert is also able to play the role
of an engineer (it is not true that all geeks are engineers so we cannot rely on class
Geek having the necessary engineer interface):
class Dilbert extends Geek
implements Terminator, Engineer {
public void doRandomViolence() {...}
public void borePeople() {...}
}
where Engineer is defined as:
interface Engineer {
public void borePeople();
}

I was reading the java tutorial and found out this!!
do we really bore ppl and all the engineers are geeks!!!...:O..:P
check the picture.

8 comments:

Dipu Nobody said...

all the engineers are not geeks ...

but it proves that all the engineers bore people .. f**k man !! what u mean !! na na its not fair .. its not true... ... the definition should be like this :

interface Engineer {
public void doNotBorePeople();
public void smartAndIntelligent();

Fun funLoving = new Fun();

Vector vc = funLoving.getGroups();
String funny = "";

for(int i = 0; i< vc.size(); i++){
funny = (String) vc.elementAt(i);
System.out.println("Engineers always love fun in the mentioned groups: "+funny);
}

:D :D :D :D :D

hudai fapor nilam .. never mind :P (all copy paste program)

aragorn said...

hahahaha... dipu, im sure anybody who came to knw us(the grp) will say we r not geeks, not boring, and funloving fokra polapan.:P

Shakia said...

I totally agree, you guys are some boring geeks!! :-P

aragorn said...

hay hay... eki holo!!.. :P

Dipu Nobody said...

:O
:-S
:P

shit man !!

aragorn said...

ahare khaleda ki lau bibiya..:P

Mohamed said...

I will be flattered if someone calls me a "Geek".
If someone calls me Boring, i'd be really happy, but i probably won't talk to him/her anymore....

See. Fun is like an old fashio. Everyone wants to be fun...it's really outdated....

Heehee...Proudly, I'm the most Boring guy on earth...

aragorn said...

geeks rules..:D

About Me

the most common nick i got from my friends is angry-kid or anger management(needed). i normally see the glass half empty. the ideas i believe in are mostly laughed at by people. as much irritated, saddist pessimistic as a human being can be....X-(