# Java translation into Ruby

**URL:** <https://www.ruby-forum.com/t/java-translation-into-ruby/93171>\
**Category:** Ruby\
**Created:** [April 28, 2007, 5:21pm UTC](https://www.ruby-forum.com/t/java-translation-into-ruby/93171 "2007-04-28T17:21:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![vanderkerkoff](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/7feea3/32.png) [@vanderkerkoff](https://www.ruby-forum.com/u/vanderkerkoff)\
**Post date:** [April 28, 2007, 5:21pm UTC](https://www.ruby-forum.com/t/java-translation-into-ruby/93171/1 "2007-04-28T17:21:14Z")

</div>

hi friends ;  
i have recenlty started Ruby;

I have a java source code and it has two interface ;

which are  
+widget ,+observer  
anologuetimer and digital timer implements both interface

i also have generator class  
secondgenerator and minutegenerator are derived from that class

how could you design this structure in Ruby ?

observer{abstract class} ----------------------Generator   
\<\>—second generator  
\<\>---- minutegenerator

widget  
\<\>----ana;loguetimer  
\<\>----digitaltimer

============================================  
The way this program operates is thus. Generators are objects that  
generate messages. These messages are then broadcast out into the world.  
For example, the SecondGenerator will send out a message every second  
while the MinuteGenerator will send out one every minute

thanks in advance guys

byeee
