C O M P 2 4 2   A s s i g n m e n t   1   R E A D M E                                                     L a s t   R e v i s e d :   3   A u g u s t   2 0 0 7 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
     T h i s   r e p r e s e n t s   t h e   s t a t e   o f   t r u n k   a t   t h e   t i m e   o f   t a g g i n g   
 
     ( 0 2 : 0 0 ,   3   A u g u s t   2 0 0 7 ) .   A p a c h e   A n t   b u i l d   s c r i p t s   a r e   n o t   a v a i l a b l e   a t   t h i s 
 
     t i m e   -   c o m p i l i n g   m u s t   b e   d o n e   m a n u a l l y   o r   w i t h   a n   I D E   s u c h   a s   N e t B e a n s . 
 
 
 
     C o n t e n t s : 
 
         / s r c             - -   S o u r c e   c o d e 
 
         / b i n             - -   C o m p i l e d   J A R   f i l e 
 
         / t e s t           - -   J U n i t   u n i t   t e s t s   f o r   L T S ,   L T S N o d e   a n d   L T S T r a n s i t i o n   c l a s s e s . 
 
         / d o c             - -   T e s t   d o c u m e n t 
 
         / e x a m p l e s   - -   E x a m p l e   L T S .   1 - 4   a r e   f r o m   t h e   a s s i g n m e n t   s h e e t .   T w o   l a r g e 
 
                                   L T S   a r e   p r o v i d e d ,   l a r g e . t x t   a n d   h u g e . t x t . 
 
         
 
     R e q u i r e m e n t s : 
 
         S u n   J a v a   1 . 6   o r   b e t t e r 
 
 
 
     U s i n g   C o m p o s i t i o n : 
 
         1 )   L o a d   t h e   f i r s t   L T S   u s i n g   e i t h e r   F i l e > O p e n   o r   t h e   O p e n   t o o l b a r   b u t t o n . 
 
         2 )   S e l e c t   F i l e > C o m p o s e   W i t h 
 
         3 )   S e l e c t   t h e   f i l e   t o   c o m p o s e   t h e   c u r r e n t   L T S   w i t h 
 
         4 )   E n t e r   t h e   s y n c h r o n i z a t i o n   s e t   ( i f   a n y )   a s   a   c o m m a - s e p a r a t e d   l i s t   o f   n o d e s 
 
     
 
     R e n d e r i n g : 
 
         R e n d e r i n g   i s   c u r r e n t l y   i m p l e m e n t e d   u s i n g   a   f o r c e   b a s e d   a l g o r i t h m .   T h e 
 
         a l g o r i t h m   w i l l   a u t o m a t i c a l l y   s t o p   w h e n   t h e   t o t a l   k i n e t i c   e n e r g y   o f   t h e 
 
         s y s t e m   d r o p s   b e l o w   5 0 . 
 
         
 
         T o   s t a r t   r e n d e r i n g   p r e s s   t h e   R e d r a w   b u t t o n   o n   t h e   t o o l b a r   ( o r   s e l e c t 
 
         F i l e > R e f r e s h   ( F 5 ) ) .   I f   t h e   s y s t e m   d o e s   n o t   b e c o m e   s t a b l e   y o u   c a n   p r e s s   t h e 
 
         b u t t o n   a   s e c o n d   t i m e   t o   s t o p   r e n d e r i n g . 
 
         
 
         T h e   I t e r a t e   b u t t o n   d o e s   o n e   s t e p   o f   t h e   l a y o u t   a l g o r i t h m . 
 
         
 
     K n o w n   I s s u e s : 
 
         -   L o o p - b a c k   t r a n s i t i o n s   r e s u l t   i n   c r a s h   ( i e ,   N o d e 1 / a / N o d e 2 ) 
 
         -   S y n c   S e t   i n p u t   d i a l o g   w i l l   n o t   a l l o w   n o d e   n a m e s   i n c l u d i n g   a   c o m m a 
 
         -   A n c h o r   p o i n t   m a y   c a u s e   r e n d e r i n g   o f   l a r g e   L T S   t o   b e c o m e   d i s t o r t e d 
 
         -   F i l e   c h e c k i n g   i s n t   i m p l e m e n t e d   y e t .   I f   y o u   t r y   t o   o p e n   s o m e   r a n d o m   t e x t 
 
             f i l e   a s   a n   L T S   t h e   p r o g r a m   w i l l   l i k e l y   d i e . 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
                                                                                                                                       D a v i d   G o o d w i n 