Design of Traffic Signal

I was recently asked this question in an interview .. as to how I would design a traffic signal mechanism , although I have some ideas I was wondering if I could invite some more thoughts from forum members . Surely the solution would involve application of design patterns .
[282 byte] By [insaneyogia] at [2007-11-27 6:55:10]
# 1
First you would have to decide what is meant by the words "traffic signal mechanism", wouldn't you?
DrClapa at 2007-7-12 18:30:31 > top of Java-index,Other Topics,Patterns & OO Design...
# 2
I guess he's talking about traffic lights.
BalusCa at 2007-7-12 18:30:31 > top of Java-index,Other Topics,Patterns & OO Design...
# 3
> First you would have to decide what is meant by the> words "traffic signal mechanism", wouldn't you?Then you'd have to figure out what they mean by "How would you design..." That's a very open-ended question.
jverda at 2007-7-12 18:30:31 > top of Java-index,Other Topics,Patterns & OO Design...
# 4
> Surely> the solution would involve application of design> patterns .Probably. But if the interviewer asks you how to design a traffic signal and expects the answer to include which design patterns you'd use, I would run away from that job as fast as I
jverda at 2007-7-12 18:30:31 > top of Java-index,Other Topics,Patterns & OO Design...
# 5
Perhaps something about semaphores and threads.
EqAfricaa at 2007-7-12 18:30:31 > top of Java-index,Other Topics,Patterns & OO Design...
# 6

> I was recently asked this question in an interview ..

> as to how I would design a traffic signal mechanism ,

> although I have some ideas I was wondering if I could

> invite some more thoughts from forum members . Surely

> the solution would involve application of design

> patterns .

What a "dumb" interview question!!! You can take that traffic signal and stick up your <0>. Just kidding of course.

There is no such "the" solution. There could be hundreds of solutions, some of them might involve object-oriented design patterns. Some of them might not involve any object-oriented design patterns. Depends, largely, on the person doing the designing. If the person knows how to use design patterns, it is possible that they might use them. If the person doesn't know design patterns, they might design the application without them.

GhostRadioTwoa at 2007-7-12 18:30:31 > top of Java-index,Other Topics,Patterns & OO Design...
# 7
> Perhaps something about semaphores and threads.I was thinking more of coloured lights and electrical cables myself.
jwentinga at 2007-7-12 18:30:31 > top of Java-index,Other Topics,Patterns & OO Design...
# 8
> > Perhaps something about semaphores and threads.> > I was thinking more of coloured lights and electrical cables myself.That was my impression too. That's why I thought the suggestion of "design patterns" was quite peculiar.
DrClapa at 2007-7-12 18:30:31 > top of Java-index,Other Topics,Patterns & OO Design...
# 9
> doesn't know design patterns, they might design the> application without them.Or, if he's a moderately competent developer, might use them without being aware he's using them.
jverda at 2007-7-12 18:30:31 > top of Java-index,Other Topics,Patterns & OO Design...