You are on page 1of 374

 

    



     
 


   
    
    
 
  
 
 
 

      
 
 
 
   
  
       



    Æ

 ! 
 
 
  


   
   
"

 
  



  
 
 

 

  
 
!   #
  $ %&
  

    
      

  
 

        '

   
  !  

 (" )  "

* !     

 
 
 
 

  
 
 

  

 

 !   
 !    
+  '



         
 
$ %&  

  
 

  $ 
 
        

("   
 ! 

   

  

     $ ,  -  .  /0 



   
   . -
 1  2  
- 

      
      

 
3 -   
  .%00 .   
 -4",
3-( 
 
0  3",
 - 
 3 1 , 3  5



" 
  $ 
  
       6( 


 $/-(-

  

 ("   
 $%3
 

 
    
  $  
 
0   
   
 
+   


 !


    
   


" 

   - 
" 

'!   

 
"  

 



 

7 "
   (  6 !  ,  7  



 
  
  
  
 ! / .  


  

    
     
   

.!  
 

 /
 48(   "  


  
  - 
/0
  
    



78 6    
      !     
 
   
 
 


 

 

  
99 -
    
9
9% -
    

 :
9: -
    

 ;
   
  
%9 

 9<
%% $       9=
%: 6    9>
%< 4'
   :9
%= 6
 
 
 :%
   
   
:9 46  
 <?
:%  
    <>
:: @ 
 =%
:< " 
 
 
=:
:= /  ==
:? 




 =>
:; " 
   ?9
:>  
  

 ?%
:A 
    

 
 ?:
:9& , !   - 
   ??
:99 4
     
?>
   ! 
 "
 
 #
<9 -

 
;:
<% 
 
    >%
<:  -  
   
 ><
<< 6 
   
 !  $  A&
<= $
 A<


$ %
!&'(   )*
=9     A>
=% 
  
 AA
=: ( 

 9&9
=< -
   
   99<
== (
   99?
=? 6

   

 99>
=; $ 
    99A
=> (
  
   9%%
=A 0
   9%?
=9&    , 
 ,- 9%?
+ ,
! %
!& ( 

-.  
 
?9 ,
  .  

 9::
?% -
   .  9:?
?: -
   
      
 9:A
?< -
   
 
    9<:
?= -
   
  


    9<?
?? (
  
  

   
  9<A
?; ,
    
  
 9<A
# '  !   $)
;9 1 
  


 9=A
;% (   


 9?<
;: (    


 %&;
* / 0  
>9 (
     %9:
>% .%00 %9=
>: 
%%&
>< 6
 
    %%9
>= 0       %%:
>? 3      %:%
>;  
      .%00 %::
>>    , 
 %:;
>A  - 
 3 %<9
>9&   
   %<%
>99 -  %<=
) '!(!   
&0 1   *
A9 ("
 %<>
A% 
  
 %=9
A: $  %=A
A<   
  


 %?&
A=  
 
  
 %?%
A? ("
 %?=

    2 %
(  ! +*
9&9 , 
 
 
 %?>
9&% 3 
 
 %;&
9&: 
   
%;%
9&< - 
%>&
9&= (
  %>?
9&? -  %A9
 


 
! 
 )
999 @ 
   

  
 %A:
99% 0 
 :&?
99: /
:&;
99< ( 

 :9?
1  3
  4 
"9  
  -  :%&
"% 4Æ  -   :%&
5 / 1(( 
 0
(! ((
 %6 

     +


69 3   46"B :%A
 -. 
 
 

- '. +
 


   
   


 
   
   
  


 
   
  
    
       

 
  

  
   
    
 
 
    

      

  

 

 
 C
 
 
   

 


   



     
 ½  
 
  


  
 
 
 9A<& 
 


 
       
 
  2 
 
 
 
      
 
     
  
+  
 

 
      
     
!  

 D  8
  

    ) 
 
D   8* 
             
 
 
 
!    

      

          
       
  
   
  

 
  
  
    

 
 
!     
    

   
   
  
        
 
    
  
, 
+       
  



 9A<& 

            
 

"      14/ /" 6 6EE   .  6  
  
  
 



   
      

 
 
 
        '



       
  
 
 
½   
   
    
    
  


   
    
 
   

 
  ! 
"#$%

9
%    

 
 
     
   4'

      

  

  
    
        
 14/ /" 5"- 6  6454    
 
 '


  
 
 
    

 
 
!   
   
    
    
  
  
    

 
  
    8 
   
  

   
 
    
 

   


 
 

   
      
   
  
    
    
    

   
 
 
  
   
  
 

 
   
      
1    
 '! 
   
  6
 > 

       
   

  

  

  
 
     
  


"
  
        
 
  

 
   
         
  "



   
  
 
        


   
  

 


  
  
! 
    
+     


 
 


             + 
    
 
 
      
1    

!      '



  
     
 
 
    
  
      
 
  F=:G   
   

  
       
      

   
 
   
   
    
    
    
 
       

     
  



 
      
 
 
 
     
  )("* F%>G 
  


        C



    
 
 

 
         ),  *     

 
  

 
 
 H      

 

         ),- *   


    

 ! 

 
    
  
      !   

  
  

 

    
 


   
 
 
 
  
 
 
 ("   )1 99*     

 



  
 
 
        
  
 D 
 8  


!  

      
 $ 
 
 

    0
   
 
 


  
  
  
  
 !         !
     
 
      :
Platform−Independent
Model

Transformations

Platform−Specific Model Platform−Specific Model


(Platform A) (Platform B)

Code Generation

Implemented System Implemented System


(Platform A) (Platform B)

   1 (





   
   
 
   
 
    


    

 
 ! 
 
    

      
  


 ("

   



 
"    
  

      
 
  
 
  

 '
 " 
    



    

     
  
 
 
   
  $ F=9G     
   +
      
 
"   
 + 

!
 

 


 

 


  

 


-      



 
    
    

            

77  /   !





 
   F<9G

    
 +


     

   
 
  

! 

    
 D  C8 
 

!   


)1 9%* 0 
     )  
 +


  
 
  *   

 
 

   
<    

 
Requirements
Definition

System and
Software Design

Implementation &
unit testing

Integration &
system testing

Operation and
maintenance
Feedback

   /   !
 (


77  ( !




    F=G      

  
   


)1 9:* 0  

 ) 
  *     
   
   
     

   

   

  
    

 !


   

  
 


    

 +
 $!

 
  
       
    

  

    
 

 

77  4 
  %
 84%9

 /
  $ , F<:G     
   

 
9    
  '
    
 
  
 

 
    

  '


 " 

 
   

 
 ! 
 '
      

    +

  
      



   
%   +
    
  

   
       
 

 

 


   
    

 
 

:        



   



   
 
    
  
 


  
 
<   

 
  


     
 
  
 
     
 
      =
DETERMINE OBJECTIVES, Cumulative cost EVALUATE ALTERNATIVES,
ALTERNATIVES, CONSTRAINTS IDENTIFY & RESOLVE RISKS

Risk Analysis

Risk Analysis

Operational
Prototype
Risk Analysis
Prototype 3

Risk Prototype 2
Anal Proto−
REVIEW type 1
Requirements Plan Emulations Models
Life Cycle Plan Concept of Benchmarks
Operation
Software
Requirements Software
Product Detailed
Development Design
Plan Requirements Design
Validation

Code
Integration
and Test Plan Design Validation and Unit
Verification Test
Integration
and Test
Acceptance
Imple− Test
mentation DEVELOP, VERIFY
NEXT LEVEL PRODUCT

PLAN NEXT PHASES

Progress through steps

 
 ( !
 (


  ' 
    

      



  
 


 '

   


   
 
   
 +





       
  

   
  
             
 

    
 
        
  
   
  

77 -. ! %
!! 8:%9

0
  

  
  
   
 
  
 F<G 
      
   


 
  
        
     
  !
     



     !

     ,     
    
      
 +!     


+

  

        
 
   
  

 
 
    
?    

 
       

      
    
  
  

   
 
    


  
 
 +



    
 
   

    

  
   
  

!      
 

       

 
   

   
       
   
  
      
!   
   


 

 




"#
 $ 8
! 
 


  
   
  
%    
  
 
 
    


 
     
   
 

,  

  
   
 


  

 

  
 
  6    


 
 
 
      )

 


    
   *     
   
  


 
  Æ
  
   



77$ / ! 



;

 
    
  
   
    

!

 
     
         

!  
 
 
    
 4
 
  

   
   
    
  
   
 D 
8 
!  
      

 
  

    
       
  


    
  
   !   
 

 
 
 
  
 /
  $ ,  !
 
         
    
  
 

   


- 
    

  

  
    
      '

   
      
  
  
   

  
   

 
      1    
   
 

    

 
 
  ,    

 

  

   
 
 
    
     

       ("
  
 

  

     ,  
,   ,-  
   
  3

 ("
  


     ;
 

      
  

    



       C

  

   
+ 
  
,   / 

  
   

 
 
   
 
  
     
      
 , 
 ,     , 
 ,-    
 =

   


 
"  
 
    
  
    
'

  
   
  
   3  



 
 
 C
'
 )* 

   -   

      )* 




      
 






77 ,   


  


  
   

 
 

  
  
  

    
  
C
 
 

 5 !       
  

  



  
  
    
   



 + 
 
    

H 

     
  
  

  

 )   
  

  
+
*

      


  !      
  



 
    
 

 
 
   

       !
  
 
 
 
  


 

  
!
1    
   
 -    


 
 


   -  
 "
+    
  F<?G 
  
  C

   ! 
 
  
1
 .! '


      





    
 
     
    
2 )

HH 
! H*  !


   


+ 
 
 
 


77 4<!  




, 


  



      

C
     


 

   
    

 
 

 + 
 
 
 


 

  
 +



 
) * 

 
    
 
 
 
   
 
  

>    

 




 +
  
 
  
 !  
 
1
 -  

 
 +
 
9  
 
  
  
    
  


 

  
  
% -
  -      
 
     

:  
  !           


    
     

 
<  
  ! 
          



  
      
  
  
1
 .!
 +
 
9        
 9&&
 ! 
%      
 !

    6(   

 6(


  
     

 
 

:    
       
  

    $
    
 !   
 

 !    ! 

)  
  
  *
$     $       
 

  !   

   
  
        
  +
 1
9<       
 -  
  1 9=
  

'!

add player

Human start game Computer


Player Player

select letters

generate move

make move

end game

      
  ( 


     A

view/edit playlists
User
play track

upload track

      
   6
.

77 1 


     
 
   
    


  


   



      
 


 
   
  
      

   



    
  +  

    

1
 -  
  

        1
9? "  
  
 




   

 
   
  9&&
     

 

  8  ! 
   

   2
 

 

  
   
1
 .!
  
     )1 9;* 
    
   
 

 
    
 
  
 


77  


   

 

 
  

 



     

  
       

    
 
 

 
     

 

  
 
    
9 
   
   

 
 
 

  '  
   

   


1    

 
 
 I$  
    

  
  I$   
     
 !  


  
      
 I$ ) 
 ! I$
 

   
  
  

     *  
  
   
      
 
  - 
9&    

 

Board
game Square
Board placeMove(m: x: 1..15 1
isOccupied():
Game 1 Move) y: 1..15 boardSquare Boolean
turn: 1..4 getSquare(i: 1..15,
getLetterScore():
moveNumber: j: 1..15): Square
1 Integer
Integer = 1 0..1
startGame()
gameEnded(): 1
Boolean
endMove(m: Move) 1
addPlayer(p: Player) Bag OrdinarySquare DoubleLetter TripleLetter
game
1 1 Bag /bagSize: 0..100 Square Square
isEmpty(): Boolean
giveLetters(x: DoubleWord TripleWord
Integer) : Set Square Square
players 0..1 squareLetter
{ordered}
2..4 bag 0..100 0..1
Player Letters Letter 100
name: String symbol: char
{identity} rackLetters score: Integer
score: Integer {ordered} {readOnly}
0..7 setSymbol(c: char)
playerRack
1 1 0..1
1 1
Rack
HumanPlayer
/rackSize: 0..7
addLetters(l:
ComputerPlayer Set)
removeLetters(l:
* history {ordered} Set)

Move 0..1
*
score: Integer LetterMove
1 *
validateMove( x: 1..15
n: Integer): letterMoves y: 1..15
Boolean
calculateScore(
b: Board):
Integer

   -.  
!   !

 ( 

PlayState <<enumeration>>
stopped Player
play setting: Play
rewind 1 State
fastForward

PlayForm
requested * *
Title: String
playTrack()
1
1 Controller
Playlist
1
name: String
1
description:
* *
String
UploadForm 0..1 playing
uploadTo: * Track
String title: String
uploadItem: *
artist: String
String
upload()

  1  !



6
.


     99


 
 
   
  1 9>  
  

 
 -  

GUI

Player GUI Administrator


GUI

Functional Core

Move Game Strategy


Management

Data Repository

Move History Dictionary


Data

  1  


 !

("     



 
    
 


    
 
 
 
    

 
 
    
%       
 
     
 
  
 
         
 
  

    
 
   
   


 

 
  
   " 
    

  

      
 

    
 

 
  

 
:        
   
 
) *
 

 
 #  



 

  


 J
)*
  
 )  
 
 
* 
      

 )   


 
     

 
  *J
)*
  
 
  )
    * # 
     

 


  
     
    

 
< &        
 
  


 

 
9%    

 
-             
  
   
 +     
    
  
   

 
    
 


  
  


  
+ H 
 
!    

,
      
       
 

  
  
 
 
  
       

     
      !
 !  !   


    

 
     
     

 

  
 
       
   


    
  
  C
)

     C



 
  
          


 
  *
1
 -       


 
 
 I$

  
    
     ! )   
 
 




  ! 
 

      * 
 !

 
      )
 

   * 


   

       
  
 

  
  
   
 
)1 9>*
1
 '!    

 
      

+
  

  
 
 
  
  
  
  
    
    
+

     
 
 
  
 ! 
 

   
 !  $  
     !



     

 
     
 



      '! )1 9A*

Playlists
Display Create
Edit

  '    


6
.


     9:
77$ '!(!  



   
   
 
 
  


   
      
 

   
       

 

 
D
 
8  D   
8 
   
  



1
 -     

 
 
    

  
 

  


 
        

 
 



 

  

  
   
 

 !   
   
  
 )
   
  

 
 D8 D8 D!8  D8
 
 
         
  

   *
1
 '! 
 
      
 


     
 
  
  
    
   
   
 - 
F<<G  .-, F%:G
  






 
          
   
 C


    
 
      
    
 
   
  
  

 $ 

 
  
    

  

 
 

    


 
  

 $         
+
          
 
 

   
 $ F=9G 
  
   
 
   '


       

    
 9A>&8  9AA&8 
 9AA< !    
   4 F<%G  5 F?G 

 
 
  $ 
 44-0 F%%G   

  9AA= 1
  99 $    
 4'
  
I )4I*  
 
       
 
   '


       
  
   

 
 
"  '     $
   %&     %&&< $  

     C
 

 
$  6     J
6    J
4'
   J
-

 
J
6 
    J
-+    J
"
 
    J
( 
   
 

 
 4'
6
 
   )46*   
  

    

 
  $  
"
  

  C
  
  
  


   
   


   
 - 


    
  
     
     

   


 +


    
   
 
 
 
 
 
  
 
 
  


9<
     9=
    

 
    
   

  
                
  



  

 !         

 

 

    $ 



        
 46 

 

      

"      F%%G   )9*
 

  

 )%*
  
#   
        
 




 




  ):*
   #        
 

  
 
   
 
 "       
 

      
 

        
   
1 %9           
  



      
      

 
 

 
 #
  

 Æ  $     

 
  
   

 

 
     1 %%  
  
Actor A

System

Use case 1

Actor B
Use case 2

  !(     !



       

      



 
!   

   
 
    

 
        

 
 
     
 

    
$          
 

   
  "  


 
 
       
9  #  
 
    
    
9?       
Share System

notify price
changes

send alarms

Trader
Stock sell shares
Exchange

    !    

%   
   #

  
 K
       
 L
:   
   #


  
 K  
    


 L
<     
    
   #
 
 


 
    
 
   

= 
      # 


   

  

 
 
 
? 
        # 
 
 
 
+ 
   
  
   
 

;     
 
> %     # 
  
 
 
    
C
  

    
A   #   

 
    




    
  
"    
 -  '
 
       
   !     


  
 
 


 ' "  
          
 




 

      
      
!  
  
  
 
     

 
  
  
  8  

    ' ,    D

 8 

  




    
 
   ' ,    D  8 


  ' ,  !     

 

 
  ! 

   
+  
  
  
 

 
  !


 +    ! 

 

 
 +  

   

 
 
 

   
 +  



     '  
 
   
  
   
  
 
  
     

     9;
  '    

     

   
  

%    ' 
   '
  
 

  
 
   
   )
 
 *
   


 
 +   ) 
   *  
 
 
+  ' 

 + 

      

 

    
  ' 9

$             
        

     
 $                       
   
   
        
!

                

 
 
   
    
   

1    
 '! 
  
   


   
  

  

    
 - 
          
  
  
  
    !   
 
  )1 %: 

 

     
  
  
     *
 $                  
  

 


    
   
  
    1   
 
    -     
    

     )1 %:*
User
edit <<include>>
playlist

retrieve playlist
<<include>>
view
playlist

Human generate move


Player

validate move <<include>> <<include>>

lookup word Computer


Player

calculate move <<extend>>


score calculate bonus
score

 
 ' 
  .  

   
 
 
  
 

 

   


    
 $ 

      
 

9>       

 
 


           
   !  
     
 

 
    
 
    

  
    
 
 


    



 1  
 
    

 
    
  


     

 )
    




*
"            
        

  
      
   
 
 
    

    


          )  
  

 *
4       

  
     
 

4 
     
 
 

  


   

   

  
      

    
 
     1 %<       
 

 


    
    


   
 
   

 


Staff
Create Property

Delete Property

Edit Property

Administrator

Create Staff

Delete Staff

Edit Staff

   ' 


    


   



6      

   )

   '
*  




 
 




 6        


   9A
C

    

6
   
       




 
 

      
 



 

 

"        
 

 

 
  +

 

(   

  

 
 
  
 
    

I   
  

         
           

 
    
 

 
 
 
  
  
 
 
1 %=     
 

     
 - 

  
 
      
   
 

  

   

  



 &
 9&& 


   
 
 -   
 

    
Bag
Letter
/ bagSize: Integer 0..1 symbol: char
0..100
score: Integer
bagLetters

bagSize = bagLetters.size

    !


   
  !  
 
½ 
   
 
 

   
 




 
 1     
6      

      


  
 


  
 
 

    
  
  
 
 
 
 

 
    
 



    


  1       


     


   
 
 

   

  

"


   


   


 
   
  
     $
 

     
        " 

       
 
!

       

   
  

  
 
 0   

 
    
½    
  
   &' 

        
 &'  
 %
%&       

 " 
 
 
     '

 



 
 
    
 
 


 
 
  '

 

 
 
 "     
     
 
 
'


  
 
  '


 
  
  

    
    
 

  
  
   
 
  )   


  
 
  

 
#  
 
   #   #  
   *
     

 
     
 
  )      
 

 &  9&& 

 *    
     
 

  

 
 

 
  

  

  D 8  



 


 
       6
 
  
  




   


 

   
 
 
 
 


  

  
   
   

 
  
 

 D 


8    
   
 
 

   
 
 
  -


  

  
   
  
 

! 

         

 
 '
 1 %=     
 
 
 
 
 '

 -  
  
  '


  

 1 %? 

     
 '


 

      
 
 '
    
 
l1
k
5
b1 l3 l2
l e
5 1 1
l5
d
2
l6
x l4
8
Bag l7 q
10
a Letter
1
l8
b2 c
3
3
l9
e
1
l10
t
1

   -.!(
    !


'
 1  

  
 
  
 
   

 

   %9


           

 '
 


 
 
 M     

  

"


   '
  


  



 

  
   -   

 '
        


    K
    L 
     
 " 
  

 '
    
          
 


      
 )  ! +   -     
   

  
   
    
 * 
 


 
        


  "


  

! 
 
  
    '
    
   



   
    
  


 
    
    
  
  
 


    
      


    
   '
 
  
   
   

"


         


    

 
   
 
 
   1   

  


  
  
   
   
 
 

 
   ( 


  

 
     

  
1        

  



     





      



  
    
!"    

 #
  1 9?   



  


  

 
  
   '

      


 
   
"
  


   
 
       1
%?
 
 
 
         " 
   

 
    $  '

  

  
 


      
  
 
            
   
    

$ 
 ! 
 $   
 
  
 
 
 
 
 
 
 

     

  
 
 M     ) 

  


 
   *       
 


9&& 

 )  

 
   *
!


        
  

      
'


 
  
 
 
 '


   #

 
 
  '


 


 '


   

%%       

 1   


        

   
  

     
    
 
 
 



 



  
   +
     
   

 
   $ %&

  
 
          
   
  

  
    '

       
  '
 
 
 


 
  9     
    '

   ! " !  " #  $
  %"&    "   "  #"
' $   "   '  ( 
    "      "  $ #""
   !!&
 
 
 
 
    
   
   )  
 
    *  
  

   

 
  
)  %9*
()    
N    '
 ) M*
9N

 '

9  
  '

  
  '







%'   ( 
 

 
   
    
 
 

 

    
 


 
 -  


! 
 
 

    

   


     
 
 

 
 1 %; 

           

   
 
  
  
     

    

  )  
 
 

 
 
 *  


     

  
 !      

 

   
1 %>        




 
   

             
           
          !     
 
 !   
    

 
 
 9
 
 
  

   %:

boss 1
*
Person subordinates Company
name: String
* 1
employees employer

  -!(


!  !

p1

c1
p2

p3

Person p4
Company

p5
c2

  -.!(


%
&
!(   

%<       

" 
        
  
    
 

  

 
  KHL 
    
" 
           

 
 

 
   
  

  
   
 


   
  
 
     


)1 %A*   

 
  
   
   
Board
Square
placeMove(m: x: 1..15 1
isOccupied():
Move) y: 1..15 boardSquare Boolean

OrdinarySquare DoubleLetter TripleLetter


Square Square

DoubleWord TripleWord
Square Square

  "0 


 .!(


  
  
+   



 +   
 


 
H ! 
 
   "       

  
    + )
       

 
 
 * " 
 

  
   
 

 
 
 
     )    

 

!   

 * 0 
   

 
             
 
 
 
  
 
        
        
  

  
  
            

77 ( 


 




           
  



   
 H


  ! 
  
 
  4 
   
 
    '
   

  
  
  
   



4 
  
  
 
  
 





 )1 %9&* 4 
       

 
  
 
  

 4 
   
  %   
  



 

 
 '
  
  
  @  
  

 

 
 %   
 
 
      " +
 
 
   
 
 '


   +
  

) *


 
  
    #
 '
 1 %9&


   %=

Game
turn: Integer
moveNumber: Integer
gameEnded(): Boolean {query}
startGame()
startMove()
endMove(m : Move)
addPlayer(p: Player)

 ) ( 


 .!(


 
        
 

 
#
    
  
   




   
 
 
 


     
 
 

 
  

 
"  
      
 
     

 

"    
 
    
 
 
    
 



  
  &!   &!     
   
 
  
 
 
      


 
  

     
  

 

 

          
 

  $      +  
       '

     
   
     

 

   
  $      
  
       '

      
   
      


 
   
  
    
 C
   
 
 
 

   '
   
      
 
    -
 : 
3  

  
       
 





 
 
 

    
 

    
 

     
  
C
   

 
4 
      

 
  
 
  
    
      -
 %:: 

77 -! 


" 
    

       
 



  

   
 
      

%?       



 ¾  
   
 
 
 1 %99 
       
        
 

    

   


   
       
'    

    
  (   1 %99

Direction <<enumeration>>
vertical
horizontal
Word
orientation: Direction

  -! 


 .!(

77 ' 

   
   
   

 
 '


 

   
 
       
 


      1 %9%       


 
    
  

  !   

 
      
 

  

   

  
  
  K  L 
 
 '
 



  
       
K  L 
 - 

 
 
 '
 

     

   
 

Player
name: String
score: Integer

HumanPlayer

   %   3! % 



   
    


   
  

    

  
 
   
    
 )

¾  
 
              
(
 




     



 
% )
 
   

 
      
%

   %;


  
  
*  
     
 
 


    
   

    
 
   

 
 
  
   !  $ $ !   '*

1 %9:       




  1 %9% 
  
 '
              

 
Player

HumanPlayer

0
1
1
0
0 p1
1 1
0 0
1
0 p4
1 1
0
0 p2
1
11
00
00 p3
11

 
 %   3! %  .!(
6                 1 %9<
 
%
       

   C

   +  
-       


  

   


 
 " 
      

 
 
  %
 

 
  

  
   
Square
isOccupied():
Boolean

OrdinarySquare DoubleLetter TripleLetter


Square Square

DoubleWord TripleWord
Square Square

    
<
5    +  
  
    ! 
   %

%>       


   

 )  

  
    
 
) 
%
  '  %
  
* %
 
   
   
   

  
H  
 

    



  " 
 
  
  

 
  
)
 .  *   
 
   
 
*  
 
 

  
! 
   
    !  
   
 
   

 &9
 9 
 )1 %9=* 
  
 
 
  )
 *   
 

  )
 D  8 !  . *      
  
 
 )    *  
 
  

Superclass

0..1
Subclass

      


 


"
 
       
 
 
   
  
 
  
   
    
 
   
    
  
  1       
    
 
 

     


!  

    
    &
  +


  
       
 
 


 
 
  
    


  
  

 
 

   
   
     
 

  
 "
 
 
  

 
 
 
)1 %9?*
6  
      
  
   



  
  
  
    

   
 
 
 
 
    
 
 ,  (

  $


  
      .  



   

           

 
   

   %A
Person
alcoholLimit(): Integer

Male Female
alcoholLimit(): Integer alcoholLimit(): Integer

post: result = 28 post: result = 21

    ! 
   

77   < 


 


    
      

       
) 
1 %9;* 
 
 


   
     


Rack Letter
/rackSize: Integer symbol: char
rackLetters
0..1 {ordered} score: Integer
0..7

   


 

 


 
 '


       
 

  *  


     
 ( 
  
 
   +  
 !   
  +
 
   '



 

"  
    

     

 


 +   
      
 

 
   
 
   
    !  
+
 

     





  ! 4 


  
 

 +  
   
   

  

" 
      *     


 
! 
 
 
 
  

 
  '

 


 
  '
 
 '


 
  1     
+  
   
 -     + $   
 

           '

 
 +  1 %9>

 

 
  I      $     
 + 


  
  
  
%
 $   
 +  
     

+   
  
:&       
Board
Square
placeMove(m: x: 1..15 1
isOccupied():
Move) y: 1..15 boardSquare Boolean

OrdinarySquare DoubleLetter TripleLetter


Square Square

DoubleWord TripleWord
Square Square

  = 


 


'



    
      
 
%
 
 
  +  
    -   

 

77$ 1 
  
!(
 


"   


   

 
 D 8 
 

  K  
 
 &  9&& 

 L K     L  


  


 
 D 8 K       L K   + 
 + L 
 $    
  
    

 
  '
 D 
8 
 1    K 
 
  L  K +   
  L  

 


   
              

 


   H  
 '
  
 '
 
 
   
 
   
    
    

 D8 )* 
 

 

 
 
 ! '

 
 




      1    -     


+  

 

 
  
$     ! 
   
   
    
 

 D8     
 
   


  
 $ 
 

     
+ "


    
     
    

"   
 
   )*
  ) 
*  
9
  
  ) 
 
   

 *
% O  )  '
 8
 
 
*
:   )    

 C
 *
< 
  
  
   
  
  


1 %9A 
 

 
   
   

    
  C 
 )*  ) * 

 ) * 
    :9
'

       
  
 

   

C
  
    
  )* %
  
 

C
  
 
 
 

   
 
 

 

  

(a) (b) (c)
Person Car Board

1 owner 1 1

* * *
Cat Wheel Square

  1 


  
!(
 


  !  



" '
     
          
       
 
 
  '
 
 
   5
 
 
         




     
 
          
    
 
     
 

   
        #
   
 

  


       + 
  1 %%&        
'
     

 I$ 
 -  
  

+
  +
 '
 
   

    !


  "  
 
 
   
 
  
    


  !    '

 

/    
 
  
 
 


 ! 

1   
 '

  
&! 



  
     
  K-

 L  
$



  

 



 
   
   
 '
 


  !


 '
 !  


 '

 
 
        
   

   H'
 
  1      

  
 
&! 

 &!  &!
 
 



'

   

    
       !

     

  


 
 $   &!  
:%       
mainFrame: boardPanel: Button Icon
1 text: String * 1
Panel i: 1..15
Frame icon
j: 1..15 enabled:
board
Buttons Boolean
visible:
Boolean
press()
1 rackButtons
g: Game rackPanel:
Panel i:1..7 startMoveButton:
Button
text = "Start Move"

resultsPanel:
i: 1..4 cancelMoveButton:
Panel
Button
text = "Cancel Move"
1 playerLabel
Label endMoveButton:
text: String bagLabel: Label Button
visible: Boolean
text = "Bag size: " + text = "End Move"
g.gameBag.bagSize
visible = true

  )  !


 >'

&!    
 
 
  
    


 
   

 &! 
  

  !  

          
   
    

   $ '# '+  , 
'+     -'+  & '
 !  $ !. '+ $ , " 
  "/   ' $ '+  #"" 
 $ , , " '  $ '+   
" $& "   !!
1 %?  %9:    
 
'
  


 

     %=  %9%  
 

"     


#

   
   
   
 

  

 #   
 

      

 
   



 
  
 
 -   B

7$7     

 

 
 
 
 


   


+

 
  

  D
! 8 )   

   

      
 
*  !
 

 

     
 

   

     
   ::
 
 + 
 
        
 


 
  

 
 
 
  
 
1
 -  
     
 
 ! 
  
)     "  "*

 
  
       


 



       
 
( !& "    


  
   
  
+  
0  1         

 
   
  

   
  


 ) !   D 8* 


 
 

  
 

  


  
"  
      
    

 )  


  
   
     


 
  
* 
   
 
 ! M  
 

   

  !
1  / 
   


 
  !   


       !  
  




    
  8    

  4 
    
   
     

 !   


            
   
  
 

   
  ! #
  
   
  ! 

     
 

 

 
   
1 %%9 
      3    
  !       


 
   
     
       +

C

add player

Human start game Computer


Player Player

select letters

generate move

make move

end game

      
  ( 
:<       

7$7      


 


1
 

 

 
 

 

 
 
 #
     
 
 

  
 +




  
 

  

 
 1
 -  


!   
 
    !  
  

    !
 !    +   
   

 + 

 +     + 
   + 
  + 
 
  
   
  
 !    
 

  

  
 
  - 
 


 


  

 
  
)          
  *     !  +  
 
  



    
  
 
2  

    
  

    


 




   

    

 
  

   

2 6 
 9=  9= +   
 
  
 
 
 +    ! )1 %%%* 
   



 %
 

  
 
 %%=

 %
   


 
 
03 -   !      

  


 



   0   C
    ) 


  

  %
 *      

 )  
 
%
  &9

   *
% 0    ! 
 

 D 8

 DM8   !  

 )
 &9&*    



 
  
 
 9&&
  

     

  ) 9% D8 


0  - *
  4      "  !    
  
 )
  


    
 
 &;

   *  

  

  


  !
2 
  
  9&&
 

    

   


  
 

  

4 2 


            ) 

 #


  

 *   

   

  

 )  

 
 *
5& 2  ! ) 
*   )


* 6   

    
  
6& 6
 
      
     
  #  

   *  (    
  

,

 
   


       
      )1
%%:*
     
   :=

000
111 111
000
000
111 000
111
TW 111
000
DL
111
000
TW
111
000
000
111
DL TW
000
111 000
111
000
111 000
111
DW TL
000
111
000
111 000
111 000
111 TL
000
111
111
000
DW
111
000
000
111 000
111 111
000

111
000 DW 000
111
DL
000
111000
111
DL DW
111
000
000
111 000
111 000
111
000
111
DL DW 000
111
DL DW 000
111
DL

DW DW
111
000 111
000 111
000 111
000
000
111 000
111 000
111 000
111
000
111 000
111 000
111 000
111
111
000
TL
000
111
000
111
TL
000
111
000
111
000
111 000
111 000
111TL
000
111
000
111
TL
000
111
111
000
000
111
111
000
000
111
111
000
000
111 000
111000
111 111
000
000
111
DL
000
111 000 111
111
DL 000
DL
111
000000
111
DL
000
111 000
111
TW
000
111 000
111
DL
000
111 DW
000
111 000111
111
DL
000 TW
000
111 000
111 000
111 000
111
000
111
000
111
DL 000 111
111
000
111
DL 000111
DL
000
000111
111
DL
000
000
111 000
111 111
000 111
000
000
111
TL 000
111
TL 000
111
TL 000
111
TL
000
111 000
111 000
111 000
111
000
111 000
111 111
000 000
111
111
000 111
000 111
000 000
111

111
000 111
000 DW DW
000
111
000
111 000
111 000
111
000
111
DL DW
000
111000
111
DL
000
111 DW 000
111
DL
000
111 000
111
DW
000
111
000 111
111
DL 000111
DL
000
DW
000
111 000
111
000
111 000
111
DW
111
000 TL
000
111
000
111
TL
000
111
111
000 000
111 DW
000
111 111
000 111
000
000
111
TW 000
111
DL TW 000
111
DL TW

    


Board
game Square
Board 1 225
x: 1..15
1 boardSquare y: 1..15
Game isOccupied():
1 Boolean
0..1
moveNumber: getTileScore():
Integer = 1 Integer
1

1
Bag OrdinarySquare DoubleLetter TripleLetter
game
0..1 1 Bag /bagSize: 0..100 Square Square
isEmpty(): Boolean
{subset} giveTiles(x: DoubleWord TripleWord
Integer) : Set Square Square
0..1 squareTile
players
2..4 bag 0..100 0..1
Player Tiles Tile 100 Word
score: Integer symbol: char * allWords
current
score: Integer
Player 1 rackTiles
*
0..7 setSymbol(c: char)
playerRack Dictionary
1 0..1
1
Rack
HumanPlayer
/rackSize: 0..7 lookup(w: Word):
addTiles(l: Boolean
ComputerPlayer Set)
removeTiles(l:
Set)

 
 '    !
:?       

 
     

 
   
 
  
 
  
 )   
 

   


       * 1    


        
 
    
        
 
 I$   

 
 +



      !
 


    
 
  #
  "



  
         
  
 
 
 & 
9&    
     
          
   
  
     0    
-    
  9&     
3    
 

  
 
 
 
            
    

        

 
   

   #
     
!

 # 
  

 2  
    
 
  
 

    

  
    

 
  +
4
- 
 
         
 
         

  '  
9
 
   
 '  
  
      
    
      



 $   

 

  $ 
!
      

- 
   
   +     
   
 
 

  

     

     
       
      
 
 

      
 
  
    
    
D
8 
 
 

      
    
  
 

 
     

   D

8
1 %%< 
     

  
 
 

$% 
+ (             
   

   



4 
      


  !    

   

  


     

   
  
 
  !  
 


  





   
 



    

    
     
   :;
Board
game Square
Board placeMove(m: x: 1..15 1
isOccupied():
Game 1 Move) y: 1..15 boardSquare Boolean
turn: 1..4 getSquare(i: 1..15,
getLetterScore():
moveNumber: j: 1..15): Square
1 Integer
Integer = 1 0..1
startGame()
gameEnded(): 1
Boolean
endMove(m: Move) 1
addPlayer(p: Player) Bag OrdinarySquare DoubleLetter TripleLetter
game
1 1 Bag /bagSize: 0..100 Square Square
isEmpty(): Boolean
giveLetters(x: DoubleWord TripleWord
Integer) : Set Square Square
players 0..1 squareLetter
{ordered}
2..4 bag 0..100 0..1
Player Letters Letter 100
Word
name: String symbol: char
{identity} rackLetters score: Integer
score: Integer {ordered} {readOnly}
0..7 setSymbol(c: char) * allWords
playerRack
1 1 0..1
1 1
Rack
HumanPlayer *
/rackSize: 0..7
Dictionary
addLetters(l:
ComputerPlayer Set) lookup(w: Word):
removeLetters(l: Boolean
* history {ordered} Set)

Move 0..1
*
score: Integer LetterMove
1 *
validateMove( x: 1..15
n: Integer): letterMoves y: 1..15
Boolean
calculateScore(
b: Board):
Integer

   4   !

, 
 
 
  '
    1 %%=B I   

 '
   

r1 1
A

5
r2

    
 


-  1 %%? 

      

    
    

         B
" (        
   

 
  

        
 
 
   )


  
   
 *
 )P
   6
  * 

  )     M*      0   


  
:>       

User UserName 100


0..1 alias text: String
5

       



          
   
         
 
 
  

  )   
 *
. (        
 ! 
  


 !    
 
)   



 
* "    
  
  
  
 
 '
  ,"
/ 0  1 %>  '
  
0 0  1 %9:  '
  
1 (        
    
 

 
   

 
     

 +  

 
 



       Æ
  


 


  
 




    

  
 
 :& 
 )9=   *
       
  

 






 

"   

 
 
    

 

 '  



  
   



  


2 (       
  
  
 
  
  
  )   * 0  /   -   1 
 
  
  

  
  "   
 + 


   

   "    


 
   

  
  
 )      
 
 D 8

  *
  
  )  
     

 
  * 
  
  ) 

 
* "
  
  
 

     
 
   

  

0

  
 
 /    QRSTQUVSWX Y 

 0  D8
  
 
D5M8   
 

 /   
 !
     
   :A
+# (        

 
8 
    

  
 
 !  
  


  


 
 
    
 
 
 
 
 M 
  
  
 +   
+     
  ) +  
 
 +  
*
 


  
    
      

       
       
  
 0  


   
   
   M 
 )

 
  
  
*
 
 

  
 

46   
       
     
 


  
 
 46  
     %& 

 $ F:<G 
 
         
 
  

     
 
  

9 0    
   #  
 




  
  
      

 
    '


 

 
 '
 

 

% 0  
   
   #  
 
 '



  
  
  
  
 
  
 +
 
  




: 0  

   
   #  
 
 
'
 

  
  
  
 

 

     
   +
 
 
  
 

 


    
 

, 
  



         
 



  '

      !   




1 46 

  
      F:<G  
 
C
  
 
  
) + 

 
 *
+    )
 
*    
 
     

 + 
  
  
        
  2
       
 46   +
  
   
 :9 
 
 
  
   ! )% )
 4'
 6
 
 " 
 * " !
%     

+         
   
       


     
               
     

<&
<9

     
 
  
 

     

    

        
     
  

   
 
         

     


      
    
         
        
     
        
        
    
    
%'
 1  .

       
 
 
        
! 

 
   !
      %   

   8      :% 
 
   



 
  


   
  
 
 

   

  
 
  





   
 
   ) 


* 
  
        
"    
  
 
   
  


 
 -  
 )1 :9*  
   
,
  
  %
  
  
 
 
  

 D

8 
 
 

 
 
  3

    

  

        


 
 
 
1 
  
 

 
 %
 

    
   

 

  

      
  
  

 
        
 
    "  
   
  
 
   
! 
  
 

       
 


 )
 
      D 
 
8 
    

   *
3      
  
 
    :: 3   
  
 

 
 

  
 




 
 '

      

 

 
   
   
 
 



 
     
 '


 

    '

 
 1 :%  
 3       
 
  
<% 
      

 
    
 
   ½  ¾ 
   ½   ¾
   
  
   




 



         

    
 


  
  
  
 

  
 


 
  
 !
 
 



 
" 
 #   

 




  
 
!



  
$



      


%&' ( )*


+

     ,    
     


  ,   

 

   


   !
     
   



  
   




    



   
  -

.
  


     

     
 

   

   
  



.
 /  
  
$

 
  
 

   
 
  0


/   

   
  ! 



  
  

 

  



  
  
 

%&' ( ) 1


+

%'
  5 & 
 

3     




 


 
 C
'


   C






B 





   
  


 
     
Z 





   
 


 
   

 


%'

 1 
 
 
<:
{ union rackHolds, squareHolds, bagHolds}
Container
1
holds

Square
Bag
Rack

squareHolds 0..1
0..1 {subset holds} 0..1 bagHolds
rackHolds {subset holds} 100
{subset holds}
0..100 Letter
0..1

0..7


 -.!(

 
 

 



   '

  ) '
 

  *    
   

 

 
   

  1   


   

 
 9&&
0      
   !  
 
     
  1 :%
 /  
 
$  
$    
  ( 
 

 '

 
 
  )
 
 *  
M
 )
 *
5  
 
            

 
  



  ! 

    M   


     

5  
 

  %
       

  %
        

  
 )   
  %
 
  

+  
      ! 

  

 +  
 
      
 

 
 

   
 
*  
 
   

 * +  
( 

    

  

  

   
 
 
 
   
    

 
        
  
 
 

  
 
 

    + 
 ("
<< 
      

Board
game Square
Board placeMove(m: x: 1..15 1 post: squareLetter = {} =>
isOccupied():
1 Move) y: 1..15 boardSquare result = false
Boolean
getSquare(i: 1..15, post: squareLetter /= {} =>
Game getLetterScore(): result = true
j: 1..15): Square
turn: 1..4 1 Integer
0..1
moveNumber:
Integer
1
startGame()
gameEnded():
Boolean 1
endMove(m: Move) Bag OrdinarySquare DoubleLetter TripleLetter
game
1 1 Bag /bagSize: 0..100 Square Square
isEmpty(): Boolean
giveLetters(x: DoubleWord TripleWord
Integer) : Set Square Square
players 0..1 squareLetter
{ordered} {disjoint}
2..4 bag 0..100 0..1
Player Letters Letter 100
name: String symbol: char
{identity} rackLetters score: Integer
score: Integer {ordered} {readOnly} pre: score = 0
0..7 setSymbol(c: char)
playerRack
1 1 0..1
1 1 * wordLetters
Rack {ordered} Dictionary
HumanPlayer
/rackSize: 0..7 lookup(w: Word)
: Boolean
addLetters(l:
ComputerPlayer Set) 1
removeLetters(l:
* history {ordered} Set)

Move * * allWords {readOnly}


* 0..1
score: Integer LetterMove Word
1 * endx = startx or
validateMove( x: 1..15 score: Integer endy = starty
n: Integer): letterMoves y: 1..15 startx: 1..15
Boolean 0..1 starty: 1..15
endx: 1..15 {subset}
calculateScore( {ordered} *
endy: 1..15
b: Board): words getScore():
Integer Formed Integer


  
 
   !
<=
" 
    
    
 
     
 
   

    
!  

 
  
    
 


 
 

)1 ::* 

   
   

 

FormDetails Order
Person
name: String item: String * 0..1 name: String
location: String 1 * distance:
orderedBy address: String
phone: String formOrders Integer
valid: Boolean price: Integer
submitted:
Boolean

AcceptedOrder RejectedOrder



 6&    !

9 
 I$ #  
   2   3 


 

 J
%    #
    
 
   
 



       
   
  
    
  J
: 
  # 
 
 
 


 
0  
  
   
 
      

9 
 
      


  

        

 
  

  

       
   
 + '
  
%         

   
   
   
 )   

   

 
  
 )
 


 
 
 

 

 
 -$5 

 
 *
   
  

   
   

        

   
 + '
  
<? 
      
: (
  

 
 

  !"
   
 )  
3      
 

  
        
1 :<
 
 



    
   

boss 1 *
Person subordinates Company
name: String
* 1
employees employer

boss.employer = employer


  -!(
!  !   
 

    
 

 
    

  1 %>

 &  


46   
    
 
 
      
 
 46"
      

 '
 
 

  ,
  
 

  
      
 
  
 
  O
 
  -
 
  ,
        ,

 0+ 
    + 
   
 "

  
          
 6 
            
 1
 
    
 
  
   J % 

 +   J %  
 +  
 
 1
 
 
  - J   

      

 

  
 
 


 
  )  
*  ,
 
    
 

      
 
    
 !   


   !   

 
 
! 
  






   
    0 !  
 
    
 
 
    

     <;

     
 
  

 
  +
  
#$#      
 

     
 

      
     
 C

    

    
  

  
   
     
   
  *   . 

    8   

    
          
  0
/
!
*  
!
  /
!
.  /0
   
   
      

     
               


   $
  

   
      
  

   
 
   '
    '
    

0

    $        46   


     
   
     

 '
       

 
 '
 
 
6

    

  

  

  
  
    
  
  



) 
*      
 ) + *  
 !   
    
        

 
  
 46 
 
    4 
  
  
 +  
 
% 
   %    

   
  
 5       
  +  

    
   
 
 
 
 + 
    #  

 
 
 
   

  

 +
   

   
  ) 


+ 
*
  #
   

 

 
 
 +
     
 
$   #
  $   
$    #
 
  $  
    # K    
  L #
    
    

    #
 
     

 
$     
 
   
 
 

  
 

  
   
  
 

   

              
 
  
 '
       K 
   L  K 
 L   




 
  
 


       +



  +    



    


 


     
<> 
      
 
   
 '
 

        
  -    
    

 
  
  
 
4 

 
    
 

  #
       
 


 
  



  
 
       

   
  
 #
 
 
      
 


 
 
 



  
 
       

    
   #
 C 
 
   
  
   

  
 

 
   !
 $       



 

1 +
 
    
 
  #
 + 

    
   

   
   #
 
 
   
 

  9  

 
 
 #
 
 
   
    
   

  +  

 % !  !   !   !  





 !
  

-    
     
   
 
    
     
    
      
    

 :< 


   


  46 


 46" 46" 

   
  
  

  


   
   
  
  46 
   
   

 '   % 


"   

    46  46"      
    

    
  
  
 


      
  

 

        <A
%) )%  
9 )%*  9 %       

) 
%* 

 
%     


 
) 
%* 


% 
 
    

 )*   


  
  

)* 

      
 

 )*  H 


   

  

)* 
         

 0
)* 
[ 

    


 
),* 
),*
   



  
+
)* +FG 
 
 %
6  
 )* 6 
  
 


  
%'
  
 (

  1

9 4'
) '

 +*    
 


  


    '
 
  '
   
  
    


   
  
 


 
  H
  
 
     

 
  
'

 
 

  H
  
  
1      
 '
  
%
 

%
 


  '

 
 +   )
  
 



 
 
*
% P  )  
 +*  





    '
  

  '
 

+  '
  




    



 
     
 '
  
1       &! $ 
 
  $ 
  
 

    &! '
 
  
 +
  
  +   
 

 
)1 :=*

   
 

  
  
   
 
 +
=& 
      
A B
1 {ordered} *
att: Integer
br

ax.br.att = Sequence{2,3,4,2,1,7,8,1}

att values of
B objects
A B
bx1 2
bx2 3
bx3 4
bx4 2
ax bx5 1
bx6 7
bx7 8
bx8 1


   < 0 
 
    



    +          '

 +     +       



  


          

 

 

 
 $    +  $    

 


 $    )1 :?*
     
      
     
    
  )
  
 9

 
*     
 
 
  +    +     
   
  

 
  
   

  

   

    
   
   
 
 
  
  C

  
  

  
  + 
 
  
      
   
 
"     
 
   
    
 
 &! $     &!     

   
 &!  




 
 

   
  


   
  $ 
 ) 
   *    

  
 ) M
  *

        =9
C
A B
1 {ordered} * {ordered} *
br cr

ax.br.cr = Sequence{cx1,cx2,cx3,cx4,cx3,cx6,cx5,cx7}

C
A B
bx1 cx1
bx2 cx2
bx3 cx3
bx4 cx4
ax cx5
cx6
cx7


   < 0 
 

 


"   
 #
    


 
    


 
 +   

     &! $ 
     &! 

   ! \     


 
     

 
 
)

  
 
 
*  \  

  





  
    
   


  

 !
   1   
% &  '  (  ) *
      + , !  "

  
  
    

    
  

 
  1 %;
1
     
 

      
 
 
1     0    - 
   


  D8


 
  

     ¼

 ¼  

K  
 

       D8  M

9%L
   
 
  
  46 


  

       ¼
 ¼  

"

 
 
    
  
 
   

      !  

 D8 

 
 

=% 
      
"  46   

 

  



  + 
 


     ¼

K  

 
     D8L 
   


     ¼  ¼ 


 
    
 6 
  
       
  
 
          
  

$  
   $   
@  
        
        

* +     
 

  
  
 *       *  * +  
 
 
  '
 @  
   
   


 )
      
*  N
 
  )

   

  
* 
  

    
* +     +  
 
" 
       
 
   
     
  
$    $   
$    $   
$    $
$ 
  
$  1  $   1
$   1  $   $ 1
$   1  $  $ 1

 ( )


46 

 *              $  

   
  
   
   
     K 
    

 
  L
  $  K 
 

 

 
  L


      
 
  
 '
     

  

 
  
1   




       



  

 
      

9&

  !        =:
        

       

     
    ¼  

    
 
           $     $
¼

 
  
   
           
$    $  $    
-
           






       
   
 



    

  $  
      
"    
  
 + 
     
 '


  
 

    
  '
  46" + 

      
 

 

 
 

  



 
 +
      '

 


    


" 
 
 
 
 





    

  
  
   )     
* 
  

) 
   

 * " 
 
 
   






  
  

  
 
) *    
   



     #
   
     
     
 
 
 

 
   


     

 
 
 
 
 
"
 
 
 


 
  )
 


 


*
  
      
    
 
       

 
  1     
      1 :;
 
 ,    
 
  
  
 
System Sensor
alarm: Boolean triggered: Boolean
allSensors
1 *


  !
 !


 
     
  

   



   
=< 
      
   
  
   
       

  
 
 

      

   



   
   
  

  
   
 
         
  

    
    

 

   


   


  
)
  
   
    
*





   


 
 
 

 
 
  

    
  
     

   


    


     
  




 
  
 
  
   

 
 



 
  
  
  

  
    

   '
$     $  

  
   $   $ 
 
 
 
   
        $        

       
  
    
   
  
   
 
 
   

        
  
   
    
 
 

 
   
 '


 C
 
   
 
 #
   
  '

  

 
 

  
 
 
 
   1 :>     
!       
 
 


 
  
 
  
        
 
  $  

 
  $ 
 '
      
 




 

          
  
  
   
    '
 
           

  

     


     


 
  

 


      
 

  

   
    
  
" 
 
 
  
    
    
   

  
  
    
  



  
 

  

 
       


 
  1      
      

   


   

 

  "  ==

2 parents
Person
age: Integer
name: String
*
children

parents.age > children.age


 1
 
 
 
  &
 
 .!(
  )
    1 :A*

   
  


    

 
  

   
 )
 

   

*  

   
 
 

  
 
   
 
   

   
   

 
 
 
        
    

" * 


"
   

 
    
  46" 

  
     
  
     
 

   

 6 
  
 
    
  )1 :9&*   ! 
       


 
 
     
    


 
 


   

 
      

         

=? 
      

A B
aatt: Integer * * batt: Integer
br

A C B
aatt: Integer 1 * * 1 batt: Integer
cr br


 ,. .!(

2 parents
Person
name: String *
children


) %
 

  "  =;

  
    
 
  
    

 
 
         

         !  

 
 
  
    
 
  
   
 

  
    
 -  
  !
  



 

 
   
   
  
  

 
 

 
   
  
 

 

 
    
   M

 

 
+ 

    

 
 1 :99   - 
  
  

  


T
T E A
B E E T
A T
C H E E R S
H E
S
T


 
   !
3     
 
    

    
 
 D ' 8  +    +       ' 
C 
 
   

       

   
 
 
  
M
  
  +  )1 :9%*  
  

 )
 ' 

   ' 


*  
     
 
     

$ 

  %
    
$ %
  
  

' 
+  

       

'  
 
 
  
     

 
 
 


 

 
    
 
%
     $  %
 

$ %
     $ 

   
K   
  
   +  $      L
"

        
 %
 
   

  
  
     
  #
   &!
  
 
=> 
      

0..5 adjacent
Square
0..5
adjacent


  <    

 

      
 

   C
 
 

+       
 



 
 
 
    
 


 


 C
'

    
   



  


   
    + 

 
'

  # 
   '

  




  

 
  
 '

       
 + 


 
1    
 -  

        




   
  

 C
  

   
)1 :9:* -      K1L
      

Player
name: String
{ identity }
score: Integer



 %  

  #  $    =A
'
 
  
  + $  )   '

*
      




  )1 :9<*


 


    

   


   
    '

    +   
 

C
key : T {identity}
att1: T1
...
attn: Tn


         




 
 + 
   
 
       
 
 


 

  1 :9=
T
C
att1: T1
... 0..1 key
attn: Tn 1


  '       0 
 







      
  + 
  '
 

 
 .          
 
  

  
      )   
 )1 :9?* 0 


       )  '




  !
 
   + 

 %
 
  . 
1  




      
 

  !

?& 
      
     &  9 
    !
  #
 + ) * '



 !  !
  
   

 !
   
 





   !    
  '
  !
  

   !






  
   !  
 

"     
    
 




  
 

    

    


  
 

     
    
  !      


  

  #    
   
 1
:9? 
 
  +


 4   
post: lotteryNumbers.size = 6

Lottery IntegerObject
lotteryNumbers
score: 0..6 value: Integer
0..6
generateNumbers() {identity}
guesses
addGuess(x: Integer)
0..6
calculateScore() correct
0..6
pre: guesses.size < 6
post: x : guesses.value

pre: lotteryNumbers.size = 6 & guesses.size = 6


post: correct = lotteryNumbers /\ guesses &
score = correct.size


   !

 !

 
     
 

  
"    

?
C
 )  '


 
 "   
  '


    C
!
    !
   






#  $

 
  
  
  


  )  '

 !
  $

 
  $  
 

           

   
 
  -  - ./ 
-   0

.  .+ , ! - "


)

 

    
      '


   
 


  
 
 *
 

  '
   
-  - ./ +


 


4  C
     C
   
 

 

   
  

 
   

 !     ?9
 
 

   
   1    
 "   !
         

 !
        



  !
   
  

     
   

!

   
  




  -   A  6
 <   
   
    




      
   $ 
  

 )1 :9;*   
   
   ! 


 + 
  
 
 

    
 

 

   
   !   
T
E
att1 : T1
att1 : T1
0..1 1 att2 : T2
att2 : T2
att3: T3
...
attn: Tn


 % 
 
!(
 6

        
    
    
  
   

 
 
         

    



 

 




 )  
 



    
  !*

,    


" 
    
       
    

 



   
     

 

 

 

1 :9>      
   
 
 
   
  
    

  


 " 

    
   
 
     

    " 
  
  
  
 !

   
!       

     


 
  

  
    - 
     1 :9>
  
      
  
 
 
?% 
      

boss 1
*
Person subordinates
Company
name: String
* Person_Company 1
employees employer

salary: Integer


 1
 
  .!(

    
  +  
  


  
!
    
     
 
     

  
   

  
  
            
  
   
 

 

   + 
 


- 
  %   
" 
       
  

  
  


 

    
  
    

 
 
 
 
  



 '
      ! 


  

   
  
  
 
 
  
  
   
 '
 
 $

 
   



 
  
  

'

! 
    
   
 
     
 



       !  
  

  
 
"          
     
 

)1 :9A*  
        '
   
  8     8    
  
    
 8     8 


  
    
 
  
    
  
  
    

 
      
         )     
     *  
   9&&&  
 M 
 
  
  
 
  
  
 
 

  

 # 
        ?:
lt.surname < gt.surname or
* lt (lt.surname = gt.surname &
Person lt.forename < gt.forename)
<
surname: String
forename: String <<implicit>>
*
gt


 '!( 
 


.    



    
"   
     
  

 

 

      
 
 
      " 

    
   
 
  
 
  
  


 
   +    

 
 
 

 
 
   

  
 



 
  
      
 
   
" 
   

   

  
  
 

    " 
   
  
  
 

   
   
      


   
    
 ½ 
 

  

  
 
 
  
    H  


  H 
 
1 :%&       
 

  . 
 


     
    
 !  
 
          
 
 $  )  
! $  )   " 
  H
    
 
  


  H 
        
 

 
 
  -
  
     
    

C
    
 
 
   +  
 
 

 
    
   
 

  
 


  
 

 
  



 
     


"
   
       
     
    


   
   
 

6
     

      

 
   

     
  
 
 

 
 -    
  5
 
     
 , 
     
 
 
      

 



 
   
 
 
 

  
   
  


 

  ! 

 

 
       '




½ * &' +%#
  

(     
   (     
  
    
 %
?< 
      
<<interface>>
Collection
post: contains(v) <=> v = x or contains(v)@pre
add(x: Object)
remove(x: Object)
contains(x: Object) post: contains(v) <=> v /= x & contains(v)@pre
: Boolean
intersect(x: Collection):
post: result.contains(v) <=> contains(v) & x.contains(v)
Collection

<<interface>> <<interface>>
List Set
get(i: Integer): Object

LinkedList
add(x: Object)
remove(x: Object)
contains(x: Object):
Boolean
intersect(x: Collection):
Collection
get(i: Integer): Object


 ) '  
 
 
  

  )   
  
   * 

 
  
  
 

  
 '

      

 $  )      $ 
      
 
 
   
     
 
 
    
  
    
 

 
   

 
  
  
   
 



  
 

        
 
 
 
 
 

 
    
 



  
      
 
  
 



  


   

 
  

       
 
 
 
   
 




       
    
 
   +



  
 
 
  
      


   
 

 
 
       
    



 H 

    
  H
  

¾ 

   

   H
       '

  
       
 
   H
 
 
  
'

¾ &'  

 
      %

 # 
        ?=
 
    
  '
  
     
 




 
9 0    
       
 ' 
!  !

% 0   
  '

   
   





  

  ) 

'   


  
    *
      

: 0   
  '

   
   





 

  


  ) 

' 8
 
   
 C


8  *
    

"      '  1 :%9  


      
 
C
x : Integer
x <= 20 pre: x <= 10
inc() post: x > x@pre

D
x <= 15
inc() pre: x < 15
post: x = x@pre + 1


   ( .!(

  
   
 '   

 

  
  


    '   !
 

  



 


"  
 
     
   



 

 
 +

0  
 +  '  
  
 + 
#  
      H 
    
  '
  
   
   
  
?? 
      
  


 '
   
 D   8 


   

     
 )  
  

  * 
 

           
   
   
 
     1 :%9
 $ 
   
     
 

 . 
 
 .  
     
 

  


 ) 


*       
  


  
  


   .    . ,-     


   
 

 / 0  1   
 2
4
 
  
      


     

   
  
 


 
  
  
 
$     
 
  $ 

    

 
 
     
5  "     
 , !     
 D8

 




 
 

   

!  
 


 !     
   

1 :%% ) * 
   ! 
, !    
   
)    


  !  
*     
    !  

 
   , !      
 
 !  
   
       
  
  


 !     ! 
  !    



"     !    
  

    

    1   

!
 !   . 


  

    
   &
   
1 "     )

 *  !     

     
  

    
    



 
 

 
 
 

  
      
   
  



 

  
 !   
  
  



 1 :%% )* 
    ! 
0'& "    H

   !     

   

   

  )  
 
   
 *
 
       
    

  
       
 
   

) 

*
1 :%% )* 
    
   

 

 
  
 )      
  

 
* 
 
   
 " D!8  



 !  
 


 %&' $     ?;
(a)
Move
(b)
* Letter
Move 1 Move Use Case Model
1 Player add
letter move
*
Word
wordsFormed validate
move <<include>>
calculate find
score words

(c)

Move
addLetterMove(m: Move, lm: LetterMove) Realization elements
validateMove(m: Move, n: Integer): Boolean
findWords(m: Move, b: Board) * Letter
calculateScore(m: Move, b: Board): Integer Move 1 Move
Specification elements 1
addLetterMove::pre: *
lm.letter : m.movePlayer.playerRack.rackLetters
Word
wordsFormed
addLetterMove::post:
if lm.isValid()
m.letterMoves = m.letterMoves@pre \/ { lm }
else
m.letterMoves = m.letterMoves@pre


  %6? 
   ! 
 


" 
    !      
      ! 


    
         1
   !  1 
    
   1    


3     
 
  

       

 $  
  


    
       

  ) 
 *   

  
  
 
 )

 
 !*       $   

 

 
 (" ,  
   
 
 

 $  
   ,-  
  
  
 

 !   
 

 KL 

    
     $ !  
      

 


  (" 
 

  
   


   

     -    ) 
*
$ !      
 
  

  $
 :=   
 !   

  


$ 
         
        
  
 
 


   


 


  
?> 
      
     

 
 
  /
  
 
 




   
  
  /

 

 



2
  


  

 





 "#  

 

/ 

  


 3 


  
   
 




   

   /
 
 
 

 
 /   /



$
4
$

 % 

  
  

 



  !

$

 
.

 

 / / 51& 


$
 53&


% /




 

 



  


 
    3
   





    
    



 


 
  

  


  



%'
   ( (

     




    
     

  $ %&
    
  

       

  
     
   
 

   

 
 
    
    


  
     ) *  
 

     
   
 
 
  
   
 

    
  


  
   
 
    
  
 
 
 
 
 
) 
       


    
* "  
    


 
     
 


         
 
   
 
      
   
      


   
 
  
   



  "     
  %  2  

 

 
 2 


   

 +  2 
 



  
  
  %     

+  -      
 
 .   
9=
1 :%:   
 $ %&     



  



       ?A
Class Association m <<interface>>
rolename Interface
attribute: Type Ordered
Association m abstractOperation(pars): T
operation(pars): rolename
{ordered}
ResultType
Composition m
rolename
m rolename

inheritance

Qualified
Subclass Association
/derivedAttribute: Type2
qualifier: Type

Constraint

non−navigable end AbstractClass


navigableRole
Directed Association *



 !!
  ! 
 


$% 
+ (    
 

   
 '



 
 
    1 :%< 2      
    

B
A B
0..1 5
br


  @
&

0 
 


,  $   




    


    




    '  
- " 



  

     1 :9&  

 
 

9   


    
 
%   

 8     

 

  


;& 
      
" 
     
 

 
 )1 :9?*
  


 




     


 
 
  
  
 

. 0 

  46"    

9 %     %    
% %      %   
:     
    
< %       
=    
   %

/ 0  K  
       

   + 
  L  46"
0 1
   1 :%=  
 
 


K
 

 '
  $   

 
     
  L
A B

x : Integer y : Integer
br
* *


      

1 3
 46"H46 
 
   

 
 +

     
 %  


 
  M 
 

% 
 
   
  
2 3
 46"H46 
 

  

+ %   ) 
 
      !
   

  



+# I  

 
     
  
 
 
* '



 1 :%?   
  + 
       

   
 
       
++ 0   
$     
$    

 
 
  
$    '
  


  
 

  '
 3
      




B

       ;9
Administrator
UserInterface
Interface
check(uId: String,
delete(uId: String)
pwd: String): Boolean
post: create(uId: String,
setPassword(uId: String, check(uId,pwd)@pre = true => pwd: String)
pwd: String, check(uId,newpwd) = true
newpwd: String)

PasswordDatabase


  % 
   

+, 2 
   
   



 
  B  
  
 
    '
        8   




  
  B
,    
 
 %
   
   1 :%
;% 
      
 
 

      


 
   

 

  $ 

   

     
       


 

)    

   *  
  +    

   
 


     

 
 
     
'
       

  
  '
 
 


  


1 <9   

 




  )  ) 

  
 

  


 


Switch

Off
swon
swoff

On

  !(  

0 3

   
     
;:
;<    $      
% 3

   




   

  


 

  
    

  


  


  

6$   


 '
 



 
  

 




  
  
 
 
 


 )  !  *

 

 
     D 8 
$  

 


 ! 
9 5  "   
   
 
'
 
    
  
  

  
 
 
  
 

  
  
      


 ) 

 

  
    
 


  
 
  '


  


  



 !  
 

*   

 
  
 
 ) 
   
    
*
% 2"/  "      
 
 

  

  '
    
  

  
  
  

  
    
 


 
 
    '
 
     
 

 
 
  ) 
     
 



 * 
 
  
 

  
 

  

1 <9       


 
  
 
   '
 *  )1 <%*   


 

   '
  * 
 +  

 


 )  )

    ) 
)  )  )  

  
 


 
   
  
 H


     


 
     
  
 


 


  


9 0  '

   
 
 
  


 



 

%   '
  

     
   )   

  
        *
 
 
  

  
  
   

  
   
 '

  





 

  


  
  
  

  

 '
  


  
    ;=

State <<enumeration>>
On
Off

Switch
state: State
swon()
swoff()

     

  
       )
 
 
    



 
*     "    
 )     *
  
 
      
 
  


  

  
  '
 
 '
 
 

 


  
 
 
 



  

!   
 

 
 " 
 
  
     
 
  




 

 

  
     
   

 
   
  
  '
     
 





 

1 <:          
      






  
 
 
        




 )1 <<*    

 

 $   !

setaatt(x) [x /= 1]
setbatt(x)
A
B

setaatt(x) [x = 1]/
br.setbatt(x)

 
  
    
  '

 
  $  
 
 
    !   
;?    $      

A B

? aatt: Integer ! batt: Integer


br
setaatt(x: Integer) setbatt(x: Integer)
*

post: aatt = x post: batt = x

       

 '

  
  
       
 

 

  

 $ )




  $ * 5
 C

!
  
  
  
"
  

      

  
   )
 
* 
  
      
      "
  
  
 
   !
 
   !
  


   
    
   
  '


    

 

'



 
     
 

   
  
 
   
    

 
  )
 
   
   
   
  
 
  
 



 
*
  
 
   
     C

 
  
  
 '
 

 
  

1  

     


 

   


  


  
     
    
  

 
  
        '
   



     
    
 



1
  

 
  
 
  '
   

  



 
 

   





 


    
      
    


 
 
 



7 7 
!(
   

-

     
 

   
    
 
 
 
 
  
  
 
    1
<=      

 )  

 

 
  
"*  -

  )     

  3

  

*  

 ) 
 
 

  

 
  

 


  )  3 *   
 
   
 
 
 "* 

 


  )   


 



    ;;

Switch2

On swoff

Off
Standby
swon powerOff

NoPower

        


  
  
    
  
 

 '
   

  



 


     '


   

  
 
    

   




  #   

 H   


   
-

    

 
 

   
  
 




 
   '
 
 


   


 


  
   


  
 
 


 +   !




   )1 <%&*
1    
  
 


  
    

 

     

     

  
   
   

 
  
  !     


  
 
  
  

 
     
   
 
¼

 

 1 <? 
       $  
 


 

 
  + 
 
 


 


 

S4 S4

S1 S1
e1/act/act1/act2 e1/act
e3/act5/act6 e3/act6

S5 S5
S3
S3 e4/act5 entry: e4
act1/act2
exit: act5
S2 S2 e2/act3/act4
e2/act3/act4/act1/act2 e4/act5/act7/act8 e4/act7/act8

S6 S6

          .  



;>    $      
-

         
 
     
  


     
     )1 <;* 2 
Sensor 1 Sensor 2

sen1un− sen2un−
detecting detecting
sen1 sen2
untriggered untriggered
sen1 sen2
triggered triggered

sen1 sen2
detecting detecting

      


  

 9    %    

  
    
    
 
!      %         

 

 
  

 
     
   



 

 C

   
   

     
 3
 



    '

 




 
  

 
 
 
   
   

 
  
 

  C


    
 

 
  1 <;
   


 
     
     
     
     

3 
  


  
    
 

 
   

  


 
 
  
 



 

   1 <>

  
   




     

  
    

  

 


       
   
 
   
   

  C

 
 
  


 

  
   
 
 

  !  
  C


 
 
  


 - 

  

 

 
 
    '
 
 
  

  
 
 +

      


   

  
  
 
   
 
 
 )1
<A*
    
 ! 


      



 
 


    
  
 

    ;A

E1

A B

S3
S1 E2

S4

S2
S5

  -   


  



    

  

 

 ) 


 
*   - 
       

    


     
       
               

¼

      5
  8

      
 Z

A B C

S3 S6
S1

t
S4

S2
S5 S7

t’

      ( 



   

   

  
 
  

 

  



 


 


  
   
    

 
 
 

    

  
   

 1 <9& 
 
  

 

  

    
  
  

   

  

  
!  
2


   
   D8 


  
 


  
  
   


  
 " 



  

   
  )1 <99* "
  



>&    $      

S1

A e

A1

A2

A3
e

S2

 )   


 (
 .!(

 
  

 

 
  
  )
*
  


   
  
   


  


 )

 

  
   


  
* 

  


  
     

  


 

   


  
 
  " 


  
 

 
   
   

 ! D 

8  

     


     1 <99   
   
 
 

 

  

  


 
     
    

  
  


  
 

S1 S3
H δ
γ

α
S4
S2

  3
   .!(

"
  
 


 
 D 


8 

 

 
    
 
 

    D   


 

 
 

    
  
 



   


    8 1 <9%      

    >9
 
      
           



  


      
   
         



  


    

e C
S1 H*
e3
α
S2
S3 β e1 A
S4
e4
γ
S5

e2
B

   ( 
 .!(

-

 
 
       
 
   
 
  

   "
 
   
    
 
  
  
   
 #    

  
 

 
  
    !  

 # 

 
  

 
 

 
 
   

     

    

   
  
  1    1 <9: 
 
 +   


 

 
  1 :9?

Initial

generateNumbers

addGuess(x) [(guesses.value \/ {x}).size < 6]

Numbers
generated

addGuess(x) [(guesses.value \/ {x}).size >= 6]

Guesses
completed calculateScore

 
 ( 

  
 !
>%    $      
     


 
        )   *  
       

   
 
     $ +   
 
   *       
 
 
  '
 -
+    
  
 



 
 
   
       
      
 
 
    

       
     

   
 
 
 




        
 
 
 '


   
  '

 

    + 


 
 )   
 
*      
 
'
 ! )
  
 *    
   $ '

      
 
    
 '


  
     "        1 <9<
1:withdraw(d)
p1: Person a1: Account

2: ok := checkBalance(d) [ok = true] 3:


deduct(d)

b1: Bank

   -.!( 

 
 !
 
   
    
4'
   
  
 

  H
 

 '
 
    
    '
 6 
4'

 
  
 
  
 * 
4'

 
 
  
   
4'

 
  
  
 
 
! )
  
 *      

   

 
     
 '

  
 '

  


  
          

  
       



     
 


9 
   
 
  Æ   :9<  :9: 
   :9
6
     +   !

 
    


 
 

1 <9=     
 
! 

 
  

 -  
  


 
  ! " 
   
  #     >:
1: s = giveLetters(7 − players[turn].playerRack.rackSize)

g: Game b: Bag

2: addLetters(s)

r: Rack

   

   

 
 !

 
     
  
 
     

 
    2 

        
" +     

  
     1
<9<    1 <9? 
   
 
 '
  

p1: Person a1: Account b1: Bank

withdraw(d)
ok := check
Balance(d)

[ok = true]
deduct(d)

   -.!( < !


   



 
 
 )
  
 
 
   *  
  
 
  
 
 
 '
)  
 
  
 
 '
* 
 
 
 
 

"   '

 
   
      

 
  ,  
   
 
     

   
1 <9;     +    
 
 

    
 '! 
 2
    

 
 


><    $      
User Remote Control Web Server Media Player Streaming Server
view playlist

HTTP request
play
track request to play

download request

playing
track

  % 6 < !


 
 K  
 !L      
 


 
 
  

      ! +




 
 

    
 
  

 3    


  
 
 
   

 
 
 
 

  
     
 
 
 -  
 


77  
 

 

 
 
 
 

  
  
 

 !  

  ! 
 
 
 
     


 
   
 

 
 # 
 

  

  

 

     
   


   
  
   

   

    

    
1 -   



  
     



 

    
K   9&& 


 L      
   
 

 
9&&   

   $    >=
K"

      
   
 
 
 
 M
L      
   

' 1 0   


1   

&!   
 

    

 &!  
 &!  &!     

  8  &! 
 
 







 

  

  


 


  
    
  


 

 


  


 
! "  #



 


  


 

)    
   


  

  &!


   

 

  

 
   
 *
K     
 
  !   
 
  L
     
 &!   

'2 1   


 )  3 4 45

  

   
      
 
 8
 !  
 
 
 &! 
"    

  
     
   
4
 !  
  
 )  
   
* 
    
 
       
 
 
        
 



  
      

  
  

 
   

3
  
 

 
 
   
  

  
 
B - 


 
 
 
   


 
          
 
 
           

   
 4 
    

 
      


  
 
 
 

   
      
      


    
      


   !

  

>?    $      
9  Æ

 
  

 

 

  


 
  




 
 









% 6 


         
    '



 
    
 

: 
   
  
  
    

! )  
   
* 
 
  
      
  
    
    

 

  

 &!    &!      #
 
      
  
      

  

 


  
    


 

 

 
4
 
  
 
     !
 
 ,
 
 
   
 
    
      


     
     

 
 8  ! #
  
  


77 4!
   

3     


 


 
 
     

 
  
  
 
 

   



  - 
     ,    
 


,  
  
  
 )    

  

 
 
   
 ,- 
 C



 *
1
 -  

 
  
    
 
 


 
  )1 <9>*
  


(   * *  
   

 

 
 
    

 
* 
 *   
 *  
 
  
  



 

   
  
  
 
 
  
 *    
 
   *    
  
-    
* 
   
  
  
 
* 
  
  
  
  
 

77  ! 


 !  <

( 


  
 
 
   
  


 


  ) +*
   

          
   

 
 +      
    
1 <9=   
    
 -  
 
 !
 D 
  

 8     


  
  

  

 
   
 


  !

   $    >;

* WordSets
Dictionary chr: String
ws

len: 2..15

*
Word
wd

  4  


 


  
 
 
 -   




 

  !  
 
  ! 

      


    
    

" 
        
 


 
  

 
  
 

   
   

 
   8  


  
 3   



   
  !   

  ** 

)1 <9A* 

 

 

  !   

  
 '  
 "   



  
 
 

  
     1
   

        
 



   
 K 

- 

L
  
 )6
 99* '!   (* 
  
 


 &
  
  

  

         
   

 &


 
 )

   

 
    9?       

  &


 * !  



        !  

 

  

 
 )1 <%&*   
  
  
  9>

99   
     

    
  
  

  
   

 


  




 
      

 

  

 


 
    
    
 
 

  )1 <%9*

   
  


  
 
  
 



  

  
       


 


    
 
 
 



)$ %& - 

*
>>    $      

birth
birthday[ Widowed
age = 15]
Single1 Single2
[age < 16] [age >= 16]
marry partner
marry partner
Dies
Dies

birthday[age < 15] separate


Married

reunite Separated
marry
divorce
death
divorce

death death Divorced

death

death

death

       

birth Alive
Marriageable
Single2
birthday[ age = 15]
Single1 [age >= 16]
[age < 16]
Widowed

birthday[age < 15]

marry partner dies


Divorced

Married
divorce

separate divorce
reunite
partner dies

Separated

death

  )         


! 


   $    >A

Person
age: int = 0

birthday() pre: true


marry() post: age = age@pre + 1
separate()
divorce()
reunite()
partnerDies()

   %
 

3     



  
 
   
    
  
  1   
&*
. )  1. 
 
  )  1
"   
 
  


  
   
 

 

 " 
 
 
  


 C


 
    
 
 
 
   
I         
 
   
 
 1     I$    

       




  

   

   #
    


    
 -  

 
 

    
&!     

 <9 
 C
  
     

    
 
  
6 !     
      4 
  
 
 
 
 

  
 4 
 
 
 
!

    4 
   
 
   
 C



 4 
     

%'  >  (
 
 
! 

      
  


 
 
  
 
  
          
   

   
 

#
   
A&    $      
  


     <9
/ $  $ 
   
    

 
 
 


 
 
 
  
   
 

  
  
 

   
  
 
 
 
 

 


  
  


     + 



  '


     #     
     # 

  

      #  

  
 

 
  


 

 
     1 <%& 
    

  
  
   &


 
 


 
 
 
 
 
      

     


    2&

    
   
  $  


   
 

    


  $

 
    
  
   

  
 


 
  O  

77 40

/       


!   
 



 
   
! 
    $ 

  


 
  
 

  
   
           
 $ 6"-0


9 6 

 
 
  
% -


   
      
 

 
: "  
  
 
    

   

 

   
C
 

 
< - 
 
H
   
  
 
   
 

  
= "  
   
  

   
   

 H
 
    

? " 
   
     
; "

 

 
    #     
  


  
   

 
    $     &
   A9
> "  


 

 
    
  


  

  


 


   
 



    
A "   
 %       
   
  

 %   
        
 
 
  
    



  C
 
 

    
,

    + 
   
 
  
9 


 
       
  
 


 


    



  
   

  
 

  
 
 


0   



 * +   
 -  

   
 
 
 

 
  >     
     
% 

+       


  
  
1   
  
)   
 
 

  
 

 -  



  
  
 4


     
   
 


 

 
  

   

  
)   
 

      
 

    
 


       
: 
     
  
     
 
< 
    
          


= 

   

 
      
 


 )   99=
 

  
 -  


      *
? 



    


      

 O

       


 
  
     
 




 
  

C
  )
 


     *
4  

   1 :% 
 (    


  
 $
  $  
 - 
  
 


    
   

  



(   
 
(  
 
  
  '


 

77 
  

" $     


      

  
 "
 


     
  
    
 
       


  
 1       
A%    $      


 



 $       
 

$ 
  
$   

      



  
"  
    
   1 <%% 
 

1 f
A 3 B

g
5 1

   A
  !

   M :   

      
  ) 

     
  

 *          
             
     
 #  

  
  

-  
      
  +


 

    


   


   


  

  

  
  
      
 
  

     
 !


  
   


 
 

 

 
    
  

 
  
  

&    

 
 
 
 
   

  


  
  
     
    
    
 
 
 
  
  


  
   5

   

 

 
  
9= 
  
Z - 
   
 

 
 '

            
     

 
  
   


 

 "  
   
  

     8 
  



  

  
 
 

    
 
 
1 
     


   $      


 0&*
  0  0+ 6 

 $    !



  

  $ 
 
    
     
  

  

   !  

  
 
 !    
   
 
    


 0&*
 0  
  0  0+ 6 
    $     &
   A:
, 

  
  
  


 
 
 
$   
 
   

    
 $   
 
  
  !  


     


   


"      
 
 
   


    !
 
 

 

1    
  
   
 
   





 

  
  
 

  

  8 

   
  


 

  

   
   
   

 

   




     
  
     


  

!    
   



  

 

 

-

 
 
  


 

    


  
    
 
    



 


 



    



77 
!( 

6 
    




    
 

          
   
 

     
     

   






  



   

 


  
 

 
 !
   1    
 -  
 
 


 


  ! 
  

  




 
   
    

   
 ! "

 !   
    
 
 

    1
     
 




  
   
  
 
 


  
 
    


 +
    

  
  
 
 B "
 

   +
 

  
   
 
    &  0*
!   07
 &0  8*
! 9&*7 "
"
A<    $      

    8&  80*


! 8  807
 &  80*
! 9&*7 "
"
5

 
    
 
 
   

   


 
 

 
 
    
"    
 !
   
   
  
 

 
      
              
    
 
 
   "
    

  


  
   
 



 

 
   

  
     
 


          
  '
  
  )
   
          
    
   
  
 
  
  
   +


  '
  
   

 *

"  
      
C
   
 

 
 
    
  
 



" 2& 


"     6"-0
  $ 
 
  
 

   
  4C  

 
 $   
    

  
    
 '

     
  

 


   
H 

  


) *
  

  
  )  *


 7 7 
(718 - 
 $   
           
 

 
   O     
 

  )
     
 

 

 
*
   
 
 
  7  7
%"9: 

          
    
  
  
 O
   
 $   
    
     
  
 + 
   
    
  
 7 
 7 
"!& - 


 
   !   


 
   


   ! ) 

 

 

  
 * 7  7 
    A=




 

 
     
  $ 

  
        

 
 
 
          

    
 

$% 
+ 2 
  




 
 1 <%&     
   
    


B ( 
   

 

, ( 

 
 

   

     


   
  C )  * - +
   

   

   
 
  C
- - 


 
 1 <%:  
 
   





S1 α

γ S2

α
β
S3

 
 -.    

" $  
  



  
    


  
 
 HC 
  3    
 

 

  
 
) 

 
   *
. ( 

 
  ! 
 
  




 
 )
  M*   
  $  
   

$  

     *
* $  
 
 
 
$  

    
 
    )

  * 
   




A?    $      
/ 0   
   1 <%<  
 

 2  
 

   

B
Pond level < 10 => pump = true
level >= 10 => pump = false
level : Integer
pump : Boolean

setlevel(l : Integer) post: l < 10 => pump = true


post: level = l

   %
 (!( 
 


0 
 
 
  
    
 -  
 
     
1 0   
      1 <%=   
C
A
1 * att: Real
cr
*
cr

B D
att: Integer
*

   '0  !

2 3

  
     


   
 
     B
+#   
 
  
    
 
 



   


 
 
 
    B
    A;
 
 

  ! 


 
  
+ 
 
    

  
 
    
  

  
 
 
 


+   


   


 

" 3    


(    
 

  
   
 


  
  
 
 +
     

  
      
 
     
   


   
    
 

     
 ) 
  
 
 




    *
  
     +
     
 


  
H 
    H   
   
   1    
 -  

 K !  L  
      -
 %%      
 
 
 #.
     
 I$ 
 
  

   

    
 
    
   
 

&! 
- 
 
 
  
         
     
 


  %
       

  %
        

  
 )   
  %
    
  


 


  
 
 
  

A>
    
   AA
4
 
 
 
  
 

   +  

  
       

%
     $  %
 

$ %
     $ 

   
            
 
 
     
    3           
  

 
 


  

 
   
 )
 
 #.  &!  
 *

 

   
 
  
  
 
4  +
  
 Æ

  

)*

 
 


  ' 

  
   +   )* 
  

 
   
  (

    
 

    

  
   
  
    ! )*  )*  
    
 
 &!  


 
   

    

 

" 2  


 
"     
  
  $ 
     

   


   
  
    

  
 
 ("
   , 
 ,   , 
 ,-
   1  
  
  
 


   

 
 


   
 
  
 +
 "

  
    
   
  
 



'


   

 

   
 

  

  +    6
 A   
 
   

 
  
 


       
 



  +              

  
 
/ $ &*&  
  
 )1 =9* 
     
 
   
   

 
 
   

 
  


      
  
  
      

   
   

    '
   
$  


$ 

 $        -
  
 
 
¼ ¼

 

$  
  
¼

! " '&  


  
 )1 =%*   

   

  
  
  ,  
 3.  
  
 )1 =:*   
  



       +  

+  



    

  

  
  
   

 $
  
 
 

¼


      $  
 
9&&   %
# 

A B
* *
br

A AB B
1 * 1
*
ar’ xr br’

  4!


0  ! &! 
 


B 0..1 1 A
ar

   4(      


 


A B
* A_B * att : T {identity}

A B
A_B’
1
att: T

 
 ' 
  < 
 


    9&9
  ! 
  
      

     
 )1 =<*        

 
        
 
 
   
  
    

       

  
 

   
A B
att1 : T1
att1 : T1
att2 : T2
op1(x: T3) : T4 op1(x: T3) : T4

AorB
att1 : T1
op1(x: T3) : T4

A B
att2 : T2 op1(x: T3) : T4
op1(x: T3) : T4

   ' 
  (
% ! $ "  
  
 

  

 
 


  
 

    '

   1 ==       #  #   #  #  


 # 

 
   #  


  '
   1   
 #  $   #    $   
 #   $   
 

  +  
   
  
   + 

  
 
 
  
 -  


" 4    
( 

    



  
     
  

           
    
  )



   
  '

    * 
      
 
   
 D 

8

   

 
 
  6
  " 
2 !  
   8  9   F9G   ! )  '
: 9   :    F%G - +
 
     

 
 

   

     D 

 8
9&%   %
# 

e[G]/act
A B

e[G1]/act
B1
A

e[G2]/act B2

    ( 

 
  

    
  
 '

 

 
 KI   1L ) ! I1* ! F9?G  


   

  '

 
  I1  

 


   
  
 

        

    )    '






    

   
 

    
'
*
- +

      
    
 
   


 F9;G 
   !    
   
  K,

       L 



 
   
M 
 
 !



  
  
     
  
 
 4  


 5 -

  -


  
 
 

-  '


$77  !(   


 ( 

   

   
      
    

 
     
 
  
 
     


   
  

    


   
  
  
   
    


  
 
 
 
   
 C
1 =? 
  

 




    9&:

GenericClass
...
templateMethod() hookMethod1()
...
hookMethod1() hookMethod2()
hookMethod2() ...

ConcreteClass1 ConcreteClass2
hookMethod1() hookMethod1()
hookMethod2() hookMethod2()

    


!(   
 ( 

      


 
# 
 #
 

 
 
   
 !

 
      ! 
 
   !



     
 
 #  

 ! 
 

2! 
     
 
 # 
      

 




 -  
   
 
   


 

%
   
   1   
  

   + 
   

  

  :  (  
 
    ( /
  4   :
 
    
 !  +   
    

 %
    
 


 

   

 

 
            
     ;:
!  5 :5   7



< 4  
      .5; &5 *7

=   


9&<   %
# 
    .5; &*
!  &:5   * !  7 "
 .5; &:5*7
"
"
0   
  
   
 ! 
    
 

  ;: 0  ;:


!     .5; &5 *
!  .; &*7 "
"

 >  5;: 0  ;:


!     .5; &5 *
!  8? .; &*7 "
"

 = 5;: 0  ;:


!     .5; &5 *
!  9? .; &*7 "
"
     
 
     +   

+  


   

!  +     + 



  
   



$77  ' 


 ( 

    
   

 
  

 
 

 


 ) 
   * +
 
  
  
+ 
 
   
    
J
+ 
   
    C

 J
  
   
   
 
  


  

 


    1 =;


" 

 '

!    
 


 



 



     

  

      !  



    
    
 
 H 
"$




 

     
!
 H $

  




   
 

 


      

    9&=

Client

Aggregate Iterator

createIterator() first()
next()
isDone()
currentItem()

Concrete
Aggregate
createIterator()
Concrete
Iterator
first()
next()
isDone()
return new Concrete currentItem()
Iterator(this)

   


' 
 ( 

 
 #
       
 


 



  
 #    
  



 ! 
    


 # 
     

  
   




 

 

 
 

  
 # 

  
 
  



  
 
 
 
 


 
   


 



  + 


      O


   


 

        

  
  

  

 
 
  
 '

   

 C

   
     
 
 
  



 



  
    + 




 

 


  

  

$77 ' 


  
 2  (!  
  


 
  

     
    




 
  
 


 4   

  


     
  
  '

6. "   
   '
  
    

   
 M   
9&?   %
# 
 
            
 C

  
   
  
   
  
 )    

 

  9= 

 
 M    9=  
  

   * 
    

 

    
 
      )
  -   
   

 

  !*  


    
   
 

. 
  
 
 !  .(56   
 

  

 +  
   ,  

H

-      
 

 

 
  
    
  C
  '

 
 
  
$

  


 
 
 
 
 

              


 
  
 M 
 

0  
$    $  
     % 
 
  
  


  
 
$ 
   $ 
 %  $     $   %   
   
 
 
  
    
   C



  
 
  
  
  
 
 C

)

  

*  
 M  

 -  '

  
 
   
    

]
  !
 
     
        



     
    
     


 
  ! 

   
     
 


  

      
          
        

  !     
 

  

 


  
      
  
   

   
    

 






    
 
 1      
 
 
   
    

  
  

 
I  
 
 
     
 


  
 )*

   

 


  )*
  


 
 
    
  )*
  



    
 
 

       '
 

      

  



 
    

    


    
 

  
 
   
  
 

  
  D
8 

 
  
  
     

   
 
   

  $    

 


 


  " 

 

 
     


    9&;



       
 
"$   
 
 
  
 

    
 
 
 


"$     
  

  

 $  




 

   
 

 

 
 
)




  
 *  


-
 

 


   
9 
 

 
 
 

    
 

% 4
  
$  

 


 


 

   
  

 

 



 

 


  

 


 
 

 
  

 
 
 . 
  
  
 
   
 $ %  &'

%(  
%  )
 
"  
  '  *
 (
+ 

 

 
,($
 
'  *



 



 
 
-'  *

-  
  
 

%  )
  %('  
  
  . " 
 #

%( 
%  )
    
"   '  /%
   
 /  

-  0'
 
- 1  2

" 
   +
0'
 %(     /     
'
%(

0'
%(  
 
%  )
  %('
#
#

%( (
 3
- 
"    %
"
%  
' #
 %(  %
"
%  
' #

%  
- 1  2
.4 
%( 3
- '
#

%(  %
 
" 
  
 /   '
  2
  0
"
% 
' #
9&>   %
# 

  %( %
 '

 05
'

% 
'
#

%(  
- 
"  %(  %
"
% ' #
 %( 3
- 
" %( 
- ' #



" 
-66'
 
- 1  2

" 
   +

-'
 %(     /      
'
%(


-'
%(  
 
%  )
  %('
#
#
#

%(     7 +  + & *


 &
"    
 /   '
 88'
 8(8'
 88'
 88'

%  )
    
 
%  )
  '
7
 %    %
 '

 3
- 
"  
- '
7
 %    %
 '
#
#
#

$77   0 ( 

   

  
  

 
  
 
   

  
 
  

      ) 
 
    
       *    


    
 '


  '
)
 
*
 

  
 
)
  *  
   

  


 

    
 
 

    
  
 
  

 
 

 
  '
+  


 )
 
* 

    
 
    )1 =>*
 




 
    
 '
 
 


    9&A
'



ObserverA
observerAState = fA(subjectState)
observerAState
*
Subject
subjectState
1

ObserverB
observerBState
observerBState = fB(subjectState) *

  1   0 ( 


1 =A 

       



 



Observer
Subject
observers *
attach(Observer) update()
detach(Observer)
notify()

for all o in observers


do
o.update()

ConcreteObserver
observerState
subject
ConcreteSubject update()
subjectState: T

getState(): T return subjectState


setState(val: T)
observerState =
subject.getState()
subjectState = val;
notify();

     


 0 ( 
   


  
   
  # 
 
      
    
 ,
 


  

         
'
  
     

 


  
  
    


   
  


 

  

99&   %
# 
   #     
  
 
  
 


   
      

)  ! # 
 
       '
 (  

 
   
 
 '

   8  


  '


  
 )  ! #         



  


  
         




  

 '
'
  

   !  

   

  



     !   
   


 
       

    '
  '
  
  

   
  

   
  
   
      
  
    
  
     
  
   +   


 
 
 '
        

0
 
            
  
'

6
 
 C
     C
  '



                 


 
 P6
 )P6*    P6
 & 

   
        
  

 0*

  

 )   * 
 
     

 

     
0*   &   


   
  

 
            


  
  

  
 
   
 .
 -  
    
 

 4   

 '
 
   )  ! 
  
 )  *
'
 . 5   .        


 

 -  
 4     
   
  
  
   
   
   C
 
 )  


 * 0           
   
  


 
   !  


  
  
4
 

 I$        
    '

   
 C
     
 '

'
  
  #
 

$77$  5 ( 

 
 

  


'

 
   '

 
  
 

   

  
  


       
    
 C
    
 

 '

  



    999
1
Client
1..*
AbstractBuilder
buildPart1()
1
buildPart2()
1 ...

1
1
Director
ConcreteBuilder
build()
buildPart1()
buildPart2()
...

 )    


5 ( 

1 =9&   



 


 
 -   

     


     
 

 
  

 

 
   " '

 #
   ! 

  
 
  
       

   
 


   

 

  
    +   
 
  
   

 

   !  

 )1 =99*

Scrabble
ScrabbleBuilder
getLetters(): List
1
getBoard(): Square[][]
1

1
1
Game
EnglishScrabbleBuilder
Game()
getLetters(): List
getBoard(): Square[][]

  5 ( 


  !

  ! 
 
   
 
     
 -  +

     
   
   


 

 
     ) I$ 
    

     C
  
      

 

 
  
*
99%   %
# 
$77+  
 ( 

 
 

   
     
   

 ) 

  

    
  
  
*

  
      '
  1 =9% 







Singleton
uniqueInstance: Singleton
singletonData: T return uniqueInstance

instance(): Singleton
singletonOperation()
getSingletonData(): T

    



 ( 
-
    
 
 + 
     

  


 !  
J

  
   
      

  
    
 
 


 
      
  #    
 




 
+

 
     )

*  

           
 
 + 


 



 



  
 

   
 #
    
  
 
 
J

    
   #  
    
 J

     J

   
  
     "    
 

 -  

 '
     
    



         
    

  
 
 
  
 !   
%(  9  
"  
   9   %:%
) 
 %'

 
9   " #

%(    9   +


9  

    99:
"  %:%
) 
 %
" %:%
) 
 
 9  ' #

%  %:%
) 
'
#

%( (
 %;  
" #
#

5  
 

  
 
 '
  
   



  '
 
      '
   

 


" 

      
    . 
  

 
 
  
 )
 &
       
 * 2 

   O  
 

  
 
 
   
 
 "   
 

$77#    ( 

    

    


   

 
    
   

   

  C
 
 
 '

  
   ! 
1 =9: 

  

 



Client Abstract
Strategy
m(x: T) : S

Concrete Concrete Concrete


Strategy1 Strategy2 Strategy3
m(x: T) : S m(x: T) : S m(x: T) : S

 
   ( 

 



 
 #    
  
   
 
  
 
 

 #  ) 
 *

   
 

 C
 

 
  

 
 # 

 

    

 

 



 


 
  
 
 
 
 

      
 
 C
   



   
 
     

99<   %
# 


      
 -  




 

 
 
  

  "  

. ' 1 &. @* 1 
   
        

 

 
9 1 
 

    +    

    
     

 
  !
% 1 
       

 

 !   
  
: !  
 
 
   Æ    ."  
 
  
  !
0   


      
  

"  
   
  
3      
+  
 
 


   $ 


 
    
 -
 =;  =>
  
+ 
 I$  
  

  
 
     
     
 
       
 
  
     


  
    

  
     



 

  
 
 
    
  


   

 1 =9<   

   

    
 -  
 6 
)  
   *
   
 
  - 
  
 
  

 "    
2
  
3 


2  
 3    
  


 !    3 8 
 
   !
 
  3  2 
    3 
    3    
2
-             $ !  


"

   
     
     $   

     
  
   8   
  



    
 
 
   
 

  )
 

 



 
 
 

 
*
"   
 
 &!   
,9< = 

/3/>=7 9/*/ 
5


5 ; 
?,37*/)3*7
?4   
@  


 - 2
 4 
 


  2
 4
?A     
@ B   


 - C
B   


 
?D   ;  @  -    -
 
  $   $   99=
GUI

Player GUI Administrator


GUI

Functional Core

Move Game Strategy


Management

Data Repository

Move History Dictionary


Data

   1  


 !

     

?E   
@  


 

1
 


 


?F   
C   9   @
  G 
 1  ; 
,=/*),37



 
5 



 

  

  


 


  
   
  


   


 
! "  #



  


   


 



 
5  )
+
 H

 
  @ 4
  
%  %
    
5 

   
%(
, 


%  

 ?
    ?45 ?A  ?F

;  
5 ( H 
     G 
  
 

 
   2   
 

 
  


 

 
  ( =    

99?   %
# 
 ?D

%
7
 
5 ( H  )
+

    


 2
1 I @

%    G 
 +
7
( % C
  
   G 
 +
7
( %
    


 2
 I @

%    G 
 +
7
( % 6 J0 C
  
   G 
 +
7
( % 6 J0

" 
    

  
       
  
 

  
     
        


         
  
 
 
     



?E   
@  


 


 


 



        
      
!
         
  

  

  O

  

  
     
 

   

 
   



"  
 
  
  &! 
  

   
     4
   


  
 
  
     
   


 
 
    
  D   8 
    

       
   
    

 
 

   
 
 D  8    
 
 
 
   

"" 4    
1 
  

 
    
  
 
 
  
  
 
  1
 
#

 
  #
   
      1 =9=
-   
&!  &! )1 =9?*  
  
&!




  8  !    
 

   
  

  

) 
  
 

 
  !
  
  
    

  !*
1
 &! 
 
  
  
 


 
    
   "   
   M

+  

  +  
        )

  * 

 
      ! +    



 
     ! +  -   M
   1
=9;       
  
 
 
        
  
   

  M
   
   
  
  
  
     99;

Idle
startGame

addPlayer(p)[players.size < 4]/


Selecting add p to players list
Players

selectFirstPlayer[players.size > 1]/randomly choose turn : 1..players.size

Ready

    
 
#


Idle startMove[gameEnded() = false]/players[turn].playerRack.addLetters(


gameBag.giveLetters(7 −
players[turn].playerRack.rackSize))

cancelMove Moving

endMove[invalid]/ turn := (turn + 1) mod players.size

endMove[valid]/update score/remove letters from rack/


turn := (turn + 1) mod players.size/
add move to history

    

&! ? &!

T New letter

T E A Existing letter
B E E T
A T New words formed = Tea, at, ch, teach

C H
H

  /
 (
 
!  !
0
99>   %
# 
 
   
   M
       


 -  


    M

    M
  

    
  
 
  4(    &!  

  

 & 1 AB0  1 A 1 B0*


    

 1 AB.C  D &* ,
1 .<   D &*
       
 1 AB.<   D &* ,
1 .C  D &*
  
(   
      
   &!



 
  M
  
 
 

 #
  

 M     !   0 
(   
   

  
         !      
  
 +  
  

 
    

+  

 
  
 

 )     
*

"+          


        
 
 
  
 
 



      D  8

   

 
  
 
 C
  D 
8    


      
 
 




 
    
      


       

 
 
 


    


  



  

"    
    
   
  


        
   
      



 
  
            + 
  C
  

4   




 
        


  '
    

   
 
0'     
 

      

    
 

      
          

   ½
8 "  
 

    
 


 
  
 C
 
 " 6    
 
   
C
       
½ &' 
 
 
     
   
   

 %
  
  99A
( , 
 
      
  
 
  

   
" "      

    

  
; /! I  
  )
  
* " 
 
  

  
   
  

      
H  
1 ! I    

  

      
 
  )
 * 
 
       

1    
 -  

  
   

%

 
   
   
   
   
%
    
   
  +
   
,
  
    
              

   

 

     !  
   


&!   &!  (  



 " !
    
   
    
 
     
   1
=9>   
  

 
      
  
 
 
        
     
 
   
  !
     
  
 
 

 )
     


 
 
 *

",  #    


,
 
I$        
 
  
  
     
  
   $ 

 D 8 D

8 D

8 D 8 D
8 
     

 

  $
  2   . -
1            
 
  

 - 
  
      
 
 
 )1 =9A*
   
  I$ 

 2   .    
 =9      
   



  I$  
   !
 I$  
  
  
 
 
 


 

 I$    
 
    
  "    
 

 $
!
F==G   
 
I$  

        I$ 
 
 
    I$       
  
 
  


 

 
 
 -  

 I$

  
     '
H    )1 %%&*  


   

 


 
 
   


    
  
   
      



9%&   %
# 

Game Board
Square
Management placeMove(m: x: 1..15
isOccupied():
Move) y: 1..15
Boolean
getSquare(i: 1..15,
Game getLetterScore():
turn: 1..4
j: 1..15): Square
Integer Board
moveNumber:
Integer
startGame()
gameEnded():
Boolean
endMove(m: Move) Bag OrdinarySquare DoubleLetter TripleLetter
/bagSize: 0..100 Square Square
isEmpty(): Boolean
giveLetters(x: DoubleWord TripleWord
Integer) : Set Square Square

Letter
Player Letter 100
name: String symbol: char
score: Integer score: Integer

setSymbol(c: char)

Rack Dictionary
HumanPlayer
/rackSize: 0..7 lookup(w: Word)
: Boolean
addLetters(l:
ComputerPlayer Set)
removeLetters(l:
Set)
Dictionary
Move
score: Integer LetterMove Word
validateMove( x: 1..15 score: Integer
n: Integer): y: 1..15 startx: 1..15
Boolean starty: 1..15
endx: 1..15
calculateScore(
endy: 1..15
b: Board):
getScore():
Integer Integer
Move

   !


 
!  !

mainFrame
resultsPanel
boardPanel
Player 1 score: 0

Board buttons Player 2 score: 0

Player 3 score: 0

Player 4 score: 0

Bag size: 100

rackPanel
Start Cancel End
Move Move Move Rack buttons

   >'


  
  9%9
6(   ;<) =  


 

 .5




  

 [K

LH . 
1
!  

 [K!LH .6!5
  

  

 [K LH ./ 5



 
 
 H .65


 . 
 

. 
    .1 
   .( 
%'  ((
>' 
(

 
%
   
      

    
 
 

 
%
   
     
 

 
0  
  ! 

   !
    

     "5 )"

)"   


 *
0        
 
 

 
   
   

 
  $ 

    
   
      
 
    

     
  
 
(  
  !   
  ! 
 
 
   
     
 ,
 
 

  $ 
 
     
 ,
 
    

3       
  !   !    

   

   


   $   


   
  


     


 
9%%   %
# 

Idle startMoveButton.press/create newMove

Moving
Move [ i: 1..7 =>
cancel Started rackButtons[i].text =
Move endMove g.players[g.turn].playerRack.
Button. Button. rackLetters[i].symbol ]
press/
press rackButtons[i].press
g.endMove(
newMove)
Letter Selected
entry:
current = g.players[g.turn].playerRack.
rackLetters[i]/
lastRack = i

boardButtons[x,y].press/
boardButtons[x,y].settext(current.symbol)/
rackButtons[lastRack].setenabled(false)/
boardButtons[x,y].setenabled(false)/
Letter newMove.addLetterMove(
Placed new LetterMove(current,x,y))
rackButtons[i].press

  )  
!
0  


 

      
 
 
  

 )1 =>*


(
 
   
 I$      
   
 
 
 C
 I$  
 
&!  
)1 =%&* (  
  ! 

   
 

 


 8  ! )  
 &!

*    
  

 

 
 
 
,
 
   

 

     

 

   
   

 )

     * 3   

   
  !   


   
   

  

   
    

 

    

  

   4  



     
   
  !

   
  
&!     
 

   

 ! 

 
   '


"- 4       


     
 


 
  

 



   
 
 
    P 

      
 
   

  
  


  
   -@ )

HH +*  ,
-@
)

HH 
 +*  '

 
  )  4'
-



HH'


* 



 
)

HH:HH*  
   
 
   
 

   !
  
   

 
     $  9%:
$7*7 
! 

 !
 
  & !


  
 $    
 
  
   
 

  
     
9 
  

 


  
 
 
 

  
  
     
% 
   !  


      


   
     



: /    

 
   
 
   

    )1 =9*  
 
 
  


   
  !
 
 
   ! 





  
   

< /   
    
     
  


   )1 =%9*

A
atta : T1

1 Y
B C *
1 attc: T3
attb: T2 InvC
*
X

AType <<enumeration>>
isA
isB
isC
A
atta : T1
1 attb: T2
attc: T3
flag = isB
flag: AType flag = isC => InvC
* flag = isC =>
ay.size = 1

* ay
X flag = isC 0..1 Y

   1!! 

  
! 

  
      
  

  
 
 
 

 
9 0 
    

    

 
 
   


  
   !
 




  
)    !*  




   
% 0   

 
  
  
     

 ! 

  


   
: 0   

 

     
   -@ 

    
  

 

 
 
 
 
  +
9%<   %
# 

 -  
   

 

    

    &! '

 


 
 

 
 
 &! 
     
 
      1
 =%%  D 
8  
   
 
 



LetterMove
Letter x y MoveID Letter
MoveID ID
Move
MoveID Score PlayerID

Letter
Letter Symbol Score
Player
PlayerID Name Score Player ID
Flag

       !



 
   





    !





   
  
 
 
  D98 
 


$7*7   =  8 =9


  

     
  
  
 -@
     
  
  46!



   +
  
  



  
      
! 
 
+
   -@



-006  1/4
 320/0 

-0/  4
 )    * P"$0- )     *
(00 0 1/4
 320/0 

$,(" 0
 -0  [     [  320/0 


  


 

 
    

    


     
 
  
    

    
   




 
  

 
  )


 *  
  
 

+  
   

 )

* 1   
;%5%'= E( 1 ; ( ;
F31 ) ( 1 ( 51 ( 5
D<%3% 1 ) ->  ) ) -> E>
     $  9%=
1 1 ->  51 1 -> E>
51 5->  55-> E>
5;   


    
  8     

     


    
 

 
  

9&   !


   

    
 &!   &!    


       
   

    
)


 * 
  

 ",


  

 
 ) 


  
 
 



   
* $    
)


 
 

*  
 

    
 

 

   !    

 
 
   

 
   + ) *   !  
¾  

!   
   
     !
   
 
  
  

1   
-E;%3= -E= 1  &1 ->( ; ( ) ->*
C5G%; &( 82( *
     &! '
   9

  

'      



 )
 *
  
1   
>%5%=% F31 1  D<%3% ) ->  
     
   9
.'   
   



    



   


 !
  
 1   
G)>=% ) 
;%= ) F .  H' ) H
D<%3% E  HF 0H


   D18 
  
 -
 
   

 

  +


  -@
- 
  -@  
  
      
 
 
 

  5 
 )      
  
* 
320/0    0

 -@   


 
  

 
    

    

 
   

 
  
   
    
   
 
 

  
 C

    


  !    

  
  
 
   
¾    
  , %
9%?   %
# 
". $%  
,       
C   
   



   
  



    M  

 Æ

   
 

  
 
 
      
 
    
 
   


   

  
 
  

 

 
 

  

    
 C

  
 
  
    
 
 





 - 
 
 
 
   
  
 
   
( 
        

  
 

        

,9< = 

,=/*),37



 
5  )
+
 H

 
  @ 4
  
%  %
    
5 

   
%(
, 


%  

 ?
    ?45 ?A  ?F

-
      %5 
 
 
    %


%  

    
    



  


  

  
   
 
   
! H   
      

   
 
 
     

!

&!  
   
 
    K 
 
   L  K  Æ

   
 L   

!   
  I$     !

&! 

   
  

" / 3 


  02   02

 
     
  
 
  


     5
 ,   ,-          
$ 

  


  ,- 
 
   
      
  .        
 

  
  $  
 
  %#  %  9%;
$7 7 >  
 %'
%  
! 


-       


  
 C  
 

 
    
 
!


 
   
 ,  

     ,- , 
         

(

  
 ,       
      

         
    

     0

    
 


 
  


 ,   ,-   
   
 
 
 

  
   1 
  
 .  
    
 

  
 
  
        46    
 C




           
  
       
  
 
 
            

  
 
 
   

  .   

 

 
 

     
   )  

 
  
  *
       5  


         
 
   
          

  
  
 
        
    
 
    
      
  
  !  
  

  . ) 


 6EE*  
      

  P   5   6 ) 


 . * 6EE 
 
    
   )
     
 . * 


 
 
   )  
  .    9=*

 
 ,      


     
         
 $ 
   
 

 
C
      + 


 ,-    
  
 
  
 

     

 
   '
  
    

   
  
 )  


 
* 
     

  
   "
 
 

  
 
       
  
   
      
   
   
 
  
     
   
 
   


     '
 
  '
     
 

 
  '
 P 
 

  $   


  
 
  

      =%  



    
 
9%>   %
# 
   
 
   
   
^ 

      
 
 
E       
%'   A  
 
  

$7 7 %
  B0& (  

 
     


     .   


    )
 
     
 
  


    
C
 

  *     

 
 

    C  
 


   


 
 

   &* !  "

   &* !  "



     
   !  
   
.   
       
   

 

    

   # 
     


 '
 
 
 
  


 






 )  * 
  
   ) 
 

      

  *   
 C


 


 

 
  
   )  

       *   
  
  
 

 

 
 



   

 

  
  


 
  


 ,  


 
 

   



 
 
 
  
 ,-
6

 
    
     

       

  . 

  
 



      
 1 
       

 

    

 
 

  

)1 99%&* 1 
   
 

  
 

 D8 '

  
   
D 
8 '

"
  





,-  . 
 



  
  

     


 



 
   3    
 K   
  
L

  
  -
 =%  
  
       
 
 
  %#  %  9%A

  
 
     
 

  


) 4*    

 

  
 ,       
   
  

 
       
  )
! 


 
     
 
  
     *  =:
 
    .    
      
  
!   = !  

 

/  
5   
%' 
 ((
 (
B0
    

  
   

 
.  1   
 
 '  
  ! 
  

   

 


          7
           7
" 
            

   
  
 )   . *   



 

   
1 =%:  . ,-     
 -  

,

  
    
 
 %
  
 ,
  

  
         


  
   

  
  
    

$% 
+ I  
    
 
    -
 =:%  
, I  
      
    -
 =:%  
- I     
 
   
  
 
&! 
  &!  )  
         
  %
  

 
    %
 

" "  


  


      1 =%<
   




. (  I$  
   )


*    
   
  

   

  
   



  
    
    

    


  K4L 
 
 

  KL 3    
9:&   %
# 

Board
Square
−game + placeMove(m: x: 1..15 1 post: squareLetter = {} =>
+isOccupied():
Board Move) y: 1..15 −boardSquare result = false
boolean
+getSquare(i: 1..15, post: squareLetter /= {} =>
Game 1 +getLetterScore(): result = true
j: 1..15): Square
− turn: 1..4 1 int
0..1
− moveNumber:
int = 1
1
+ startGame()
+ gameEnded():
boolean 1
+ endMove(m: Move) Bag OrdinarySquare DoubleLetter TripleLetter
−game
1 1 Bag −/bagSize: int Square Square
+isEmpty(): boolean
+giveLetters(x: DoubleWord TripleWord
int) : Set Square Square
−players 0..1 #squareLetter
{ordered}
2..4 −bag 0..100 0..1
Player Letters Letter 100
− name: String − symbol: char
{identity} −rackLetters − score: int
− score: int
{ordered} {readOnly} pre: score = 0
0..7 +setSymbol(c: char)
#playerRack
1 1 0..1
1 1 * −wordLetters
−move Rack {ordered} Dictionary
HumanPlayer Player −/rackSize: int +lookup(w: Word)
: boolean
+ addLetters(l:
ComputerPlayer Set) 1
+removeLetters(l:
* −history {ordered} Set)

Move * * −allWords {readOnly}


* 0..1
− score: int LetterMove Word
1 * endx = startx or
+ validateMove( − x: 1..15 − score: int endy = starty
n: int): −letterMoves − y: 1..15 − startx: 1..15
boolean 0..1 − starty: 1..15
− endx: 1..15 {subset}
+ calculateScore( {ordered} *
− endy: 1..15
b: Board): −words + getScore(): int
int Formed

 
  B0 % 

r B D

5 batt: Integer * *
br dr
A 1
aatt : Real

C
r
catt: Real
5

   %'  !


 
  %#  %  9:9



 !   
  

 
   




 
 
 

   
  M
 
   

  


   
/ " 
    

  


   
1 =%=
A
att1: Real
att2: Boolean
E

er
*
B C
att3: Integer att4: Real
1

    !! 


 . 

0 $ 

  
  
 
      


  
   


   
      )

   * 

 


 



 

  
)
     
 
 
 

 
*
 


 
  

    

 

  


    )    

   
* 

  

   )

   

    M
 *     
1 " 

 
 




  
 

   
         
 !  

  " 
      
  

 
 
      
) 
+

   

 *  
      


 
 
  
  8  !   )%> 
  %9 
* " 
   




 M      
2 (
 ,       1 =%? 

 

 
. B  
     
 
   
   
 

9:%   %
# 
D
A B
att1: int att2: int *
op1(x: int) dr

C
att3: boolean

   %
(
 B0 % 

+# 
 

 
   
 


 
 I$ 

    
 -  
        

  
 
   
   !     )
 


 
  
      *
 
 

"  ! 



#$   

4 
       
    
  
   

  
  
 
  
  
  . ,-
 .        
 

    6EE  6 

+ 0    5 



  
-

 
 ,-       
   
 
.     
    

 0  



,-     
   
      


 ?9 

      . 
1

 
   



     

+
 

   . 
  
 C
!
   )4

   
)   
* 2 
 

   
 Æ
 " 


 
 
 



 '


     
    
   


 

 

! 
         

 

  
 
!     







" 
 
   
       
 


   

   
       

  

   
 
 &9  9



   
    1 


 
 



    

  6
   

  
      
 . 



)1 ?9*
"  
   
 

  
 .
   M 
"  
 
 
   
 . 

"  
 
 
   
 . -

" +  
 
 9  &9 
 


 +  
 
 .  )   H
     

9::
9:<   (  %
    )    

 &    = !   


 

 
 
 


  
 
     
     


 

 

 


  
  








 ) *








 




 4


  




 
 
 
 




  


 



  
 
 

   
   






  

  





   H

 

 
 

  

%'  ((
 !
B0

Association from class A to B Declaration in Java class for A

{ordered}
B
br Java array B[] br = new B[N];
0..N

{ordered}
br B Java List List br = new ArrayList(); // of B
*

br B Java Map Map br = new HashMap(); // T −−> B


x: T
1

  
 (


 
  (
!  
 %   
 *     9:=
+ 

     
 *
$ 
    

  
   
 

-  

%(  >

"  
H  +
H '
 

 
  
 
E'
 
     
 /   '
 
H+ +
H+'
 
 % '
 
 
3%(
 4'

%(    >




%( (
 +
=


%( 
 
 

#

%(  H 


"  
7:%
 ( 7:%
 
 7:%
4J4J'

%(  



 


%( 7:%
+
7:%
 5  $
#

%( (   7:%

"  


:%


'

%( (
 ,%


%(  +


7

#

$     



 .     
 
 
        
 
    .  !
   
       4 
 
     

+ 
 . )
  
    *

  
  
 

 
  
 
 
 
     
 

    + 
3  ) * 
       



  

  
 
B 
 
 
    

 

  

       
   
 


  
 
     
 ) 
* 

 




3




  
   

 


 B
3


  
  
+   
 
 B
9:?   (  %
    )    
     
 
     

  )
  
 *   

 
   
 -  
    

 
 



   +  
     

+  
 

 
  &!     !



    
 
  )
    
 
  
  * 

 +    
     ' 

 

   +   &!  !


    
 
  
 

+     5 



      

   
    
 
   


 
6        

      

#

    
  
   
  
    "

   
  
   
       
  

 
 

5 
    
 .   =:    


   1 ?9
" 
 
    
 ,-
 
 


     D
 8 

    '


 !      Æ
    
1 ?% 
 


  
 
!    $

 .   


     
 

 
   
  
 
 
   
 
  
 

    
 
 
    

     I$

 
     

    
   


    
     
 
 
  

   
    

 ?%    
  !  
  $ 
  



 . 
 

6
 
  


 
   



 


      


  
 


  '
$
   $ 
     
  $      $     
 

  

 
   $      $ 
1    
      1 :;
 
 
   
  

    
 
  

 

%(     
++

7
 
 -5 (
 ++

-
" 
 - 
++

 ++

-'
  ++

-  %

"   0  0' 0 1 
 2
' 066
" 7
 
-  7
 
 +
0'
 
- +

  K % CC

- +

   
 -
  $ 
*   9:;

UML PSM Architecture E

A er

C
cr
B

dr
D

Archtecture of Synthesised Java

*
E
es
<<interface>>
ControllerInterface A er
as
*
cs *
C
cr
Controller B
bs
*
dr
D
* ds

   
B0    
! 


  
    



  
  
   ¼ 
  

           
 
 
  /     
¼

!
 
 
     
 


/ 
  
  

      /      




.

  /
    

 
    
  
.

 




    /
   
 
   
  
   ¼     
           
    

 
 


   
 
   ¼     
           
  
 
 
 


6  


    
     
     
      
 
 
        
  
    
     
          
   

  


%'       
  !
9:>   (  %
    )    
" 
- 
  %
' #
#
#
#
  

 
        

 
 
  
 /   '
 
 
   
 /   '

  
 
    '

 ?: 

  
   46"    
 .  !

)% =
P   


  
   $ $
"



  

  
!
 

/    

  
!
   
      '
 ¼

       

 '

    
     ¼
       +
 '

    
  )     ¼
$  
 ¼ 
 $ ¼
$    ¼ 
 $ ¼
$    
  $   $ ¼   ¼
$    '
$   $ ¼ %
  ¼
  1  ¼  1 ¼
  1  ¼ 1 ¼

%' 
 =
!
1 .( 


  
 
 

        
 



      1       !
  $

     

   

  
   ?: 
   
 


 
     


  
   
¼

    D 


 8  
 
    
    
    
  !
   
 
?< 
       
 +       
 
 
¼ ¼¼


  
  
 

  
 
   
   


$ 

  '

 
    
1 
   
 
        
  
 

 
  


   

 
 
 


    
 
 
  


  
  

 !
   

"    
 

 $   !
 
# 



 
  
 

 
.& I - .&0**7

 $    $+  $  $  9:A
  
  
    
 ¼      ¼  

  7 



 ¼    ¼ 
/
 
 
 
& 
 
  
   
   
 ¼  ¼  

  
   

 ¼      ¼  
 /
7 

  7 
  
     
 ¼  ¼  
 
7 
  



    

 ¼   ¼  
 /
7 

 
  
 ¼  ¼  
 
7 
  

        ¼ 
    
     ¼ 
  " #  
¼ ¼¼


 ¼¼
 ¼¼

%'   ( 
!
1 .( 


 .     .  


    


  
 

 

    

 
    

 
 
  
 
 
 

9 (  

  
  

 


 
  
  
 

 

  

  
% 1    


 
   
  
 




  
 

 
 0 
  

     

   
 
 



 &@H

'  *
! '  7
 H7
 7
"

      # 
 

  
  # 
 
¼ ¼

 
 

+      6     

 
      

         
 

 
    
  
 
    
!
F9:G
1 ?: 
     
 

    
 


    
 
 
 
  

9<&   (  %
    )    
C7, C8
leadSignal
Signal
1
? sigclr: State
? sigstp: State
sigstatus : BlockedState Switch
! sigset: SigState ? swn: State
? swr: State
locSignal 0..1
swstatus: BlockedState
*
! swset: SwitchState
Route
locSwitch 0..1
State <<enumeration>> C9 rte: Occupancy
On routestatus: BlockedState
Off ready: Boolean
1 1
C5, C6
traversable: Boolean
*
Location
BlockedState <<enumeration>> ? locn: Occupancy path
blocked locstatus: BlockedState
C3, C4, C10, C11
ok *
number: Integer C1, C2
{readOnly, identity}
! trafficalarm: State
Occupancy <<enumeration>>
occupied
unoccupied

SigState <<enumeration>> SwitchState <<enumeration>>


stop reverse
half normal
clear

 
  !
 !

9  K   
  
   
 
   L
      

%  K  
  
  )  
   

   
    
*
 
 

  L

  
  
! 
  


: K  
    
  
 


 L
      

4
        
 , 
 
   
 
     "     
  

 
  

  
 

  
   

  

 46 
 

  
 $ %   '
 $ %  L
  '

%( 

7
*

" %(      %%
  0'
%(      %
  4'

%(         0'


%(        4'
%(      
  A'

 $    $+  $  $  9<9
%(  7

"  
L
 


   
 L
  '

%( 7
,($
 -
"


  -'

%  ' #

#
#

0   
    
  

   .  


 


   
  

   
 


 
%(    

  7
*

"  
 '  

 
 7+  
 L
  '   7+

%(  


"   %%
' #

%(  
 - "   -' #

%(     
/   5 
"     0'  1   2
' 66
"    -       +
'
? 

 -5' # #

%(  
7+  7+--
"  7+-- 2
 @ 4 "
% ' #
7+  7+--'
#

%(  7+7+ 7+--


"  7+ 2
 @ 0 "
% ' #
7+ 7+--'
#

 !   



 
  
  



 

   
 
 
    
    
  
  
! 
  
 )
, *      

  


%(  %




  7
*

"  

'  

 
(

'  

 
(
 
(
'  

9<%   (  %
    )    
 
    
 L
  '    
 
7+ 
7+'

%( %
7+ 
7+
"
 %%
'

  
'

(
 
'
 
7+  
7+'
#

%(  


- "

-' #

%(  

(

- "
 
-'
 
-  
 " 
(
 
' #
#

I  
 
      
  
 

 
%(  ? 



  7
*
5 ? 
)


"  
L
     
 L
  '
 
L
  %
  
 L
  '
 
L
  +  
 L
  '
 
   ? 
%:%
) 
 %'

 
? 
 " #

%(    ? 


 
"  %:%
) 
 %
" %:%
) 
 
 ? 
' #

%  %:%
) 
'
#

%(        "   ' #

%(  %


%
 " %
 ' #

%(   



 
"    -  
  '
   -'

 -5%%
'

7+ -5
 L
  '

%   -'
#

%( %


%
7+ 
7+-
" %
%
-  
 %

7+-'
  $    $+     9<:
%
 %
-'


 %
-5%%
'


 %
-5
'


(
 %
-5
'

  %
-5
 L
  '


7+ %
-5
7+-'

%  %
-'
#

%(  
    -5
 -
"  - 
-'
 -  %

"   A  0' A 1 %
 2
' A66
" %
%
-  %
 %
 +
A'
  %
- +
  K % CC
%
- +
    -
" 

 %
-5%
' #
#
#
#

%(  

%
%
-5 
-
" %
- 


-'
7+ +-  %
- +

7+'
 
-  %
 " 
+
+-5 ' #
#

#
 


   
 
 + 
 


+      6   %



    

  
  
   



 

  
 
 .  1 ?< 
     



 1 ?<
   

   
 (

 
      ? 8
 2

 
      ? 2
9<<   (  %
    )    
A
att: Integer

inc(): Integer
post: result = att*2

C
B
inc(): Integer
inc(): Integer
pre: att < 100
post: result = att*4
post: result = att+4

D
inc(): Integer
pre: att > 3
post: result = att*9

   ( 
 .!(

 

   
      6 2

 6

   9
      ? J


  
 
 

 . 
 / 

  7
*

"  
  '  


%( /
"   0' #

%(  
   - "    -' #

%(  +
  "
%   ' #

%(  
" 
% '

%   & A'
  $    $+     9<=

% 
% '
#
#

 H 

  7
*


-
 /
" %( H " #

%(  
" 
% '

%   & E'

% 
% '
#
#

 ? 

  7
*


-
 /
" %( ? " #

%(  
" 
% '
  @ 400 "
% 
% ' #

%   6 E'

% 
% '
#
#

 9 

  7
*


-
 H
" %( 9 " #

%(  
" 
% '
  1 D "
% 
% ' #

%   & M'

% 
% '
#
#

%(  ? 




  7
*
5 ? 
)


"  
L
    
 L
  '
 
L
  (  
 L
  '
 
L
    
 L
  '
 
L
    
 L
  '

%(  //  "  ' #


9<?   (  %
    )    

%(  HH  " ( ' /' #

%(  ??  "  ' /' #

%(  99  "  ' H' #

,
   
     


 
 
 






  
   
 
  
 





 
 
 
  !
  
     
 
 
  "  
       


     
 
  
    

+"      6      %



    


 
  
  

    


  

 
   
  1 ?= 

    
 

Person Job
/ njobs: Integer
salary: Integer
/ earnings : Integer
1 {ordered} *
job

njobs = job.size
earnings = job.salary.sum

   0    .!(

 
  
 
   
 
 

  7
*

"  
 $('  

 

 +'  


 
 $(  
 L
  '   N(

%( 

"  $(  0'

 +  0'
#
  $    $+       9<;
%(  
$( $(- " $(  $(-' #

%(  

 +
 +- "
 + 
 +-' #

%(  
$(  $(-- " $(  $(--' #

%(  $(N( $(-- " $( $(--'


#

%( 

$(N( $(-- " $(

$(--'
#

%(  +
$( "
%  $(' #

%(  +

 + "
% 
 +' #
#

 N( 



  7
*

"  
  '  


%( N(
"    0' #

%(  
   - "     -' #

%(  ? 




  7
*
5 ? 
)


"  
L
  
  
 L
  '
 
L
  $(  
 L
  '
 
   ? 
%:%
) 
'

 
? 
 " #

%(    ? 


 
"  %:%
) 
 %
" %:%
) 
 
 ? 
' #

%  %:%
) 
' #

%(  



  " 
 ' #

%(  N(N(  " $( ' #

%( 
 



" 
 
-  
 
'


-'

$(
-50'
9<>   (  %
    )    


 +
-50'

$(
-5
 L
  '

%  
-'
#

%( N( 

N(
" N( $(-  
 N('
N($(-'

 $(-50'

%  $(-'
#

%(  
$(
 
-5  $(--
" 
- 
$($(--'

$(
-5
- +
$( 2
'


 +
-5
7
% N( +
/, 

 
- +
$('
#

%(  $(


 
-5 N( $(--
"  
- +
$(  $(-- "
% ' #

- $($(--'

$(
-5
- +
$( 2
'


 +
-5
7
% N( +
/, 

 
- +
$('
#

%( 

$(
 
-5 N( $(--
" 
-

$($(--'

$(
-5
- +
$( 2
'


 +
-5
7
% N( +
/, 

 
- +
$('
#

%(  
 N( $(-5   -
" $(- 
  -'
  A  0' A 1 
 2
' A66
" 
 
-  
 
 +
A'
 
- +
$( K % CC

- +
$(  $(-
" 

 +
-5
7
% N( +
/, 

 

- +
$('
#
#
#
#
 
     

 
   !   

 

      $    +      9<A
  


 
   

    
 

   
 

 


  


    
5       

 

 5 .  &5 / *
  
 

 
    

      

 

     
  

    

  $  

$ 
  

     $  
+  
 
        '
  
 '
  $ 

++ 4     



  6       
"     
  
 
    
"  -@
,
-@  4    
 
    ?=   

  
  C 
  /
  

 

 

!     >) ! >) % 
&    2 2 2
   2 2 2
>)  

 2

2

      
%    3 3 $ 3
$  $
 
%'   
!(

  

 
 
 
 

 
 



  

  !  $  

    


 $
 ! 

 

 
   
 "   !  
    

  
   
  
 




! 
-@  
 

  

 
  ) 

  

  
  
* 2  
 
   
 
 


 
  
 

+, 0    72&     


-  

 F=:G    
  

  


 
    
 -  
 
   
 
9=&   (  %
    )    

   
  
        
 

 
 


      
 )  
  *

 

   

 

 ,- 
   

 

 
 


 
    )("I*

  
  
   

 )
 D
8*
 
 )D 

8* 
 -   
    
 &! 

  


 
 
 
   &!    &!   

    "        

   D8 D 8 D 8


 
 
 +   
1  @
1
@
1
@401
@
1
@
1
@41
@
1
@401
@
1
G+ %
8O%
8@
1
@
1


@
1-@B1-@
1@B1@
1

@
1(@1(@
1
@D1
@
1

@
1


@

1


@
1-@M1-@
1@B1@
1

@
1(@1(@
1
@41
@
1

@
1


@

1


@
1-@401-@
1@B1@
1

@
1(@1(@
1
@41
@
1

@
1


@
1
@
1  @



        &   &   )'' *
  




   
    

 %   
 ,     $ 9=9


  
   

 
  

  
( ( 
     
1K= = =3*    
&@
1K= = =3* 

5 
5 


&@
1K= = =3* 
P?9/*/@
1K= = =3* 

5
5
G+@
1K= = =3* 
P?9/*/@
1K= = =3* 
G+ = *Q@
1K/** )7* 
G+ %

O%
 ?%

 O%
@
1K= = =3* 


-55

@
1K= = =3* - P?9/*/@
1K= = =3*  P?9/*/@
1K= = =3* 

(5
@
1K= = =3* ( P?9/*/@

 ( (  


      +      
 
      
  +  

 

 
 

   
    

 



   
      1  
  

  

    
       


'

 
 

  1      

  2 , 

  6 
,  
 2 ,  
  

    ,-    
   ( (  
 

    


  )
  

    

 *  

   
 




  

  



    
          



( ( 
  
K%5%1%E=  &( (  (  ( (  *

"


      
 D 
   
 
8  

 

K%5%1%E=  &L)'>=*

"    


  

    
     

 
 
 
 
 +
  
"     
 
  
 
 

  




    

 
 1      
K%5%1%E=   &?*

    1 &9        9N      
 
) 

*   9 
 

 C

    
9=%   (  %
    )    
1   

 
 


  
 

 





    
  



 



"


   
  5 
     

   
 
  

 
    


 



" !
 
 '
   
  
 

'


 
 

 
  C




  
 
 '
  
 


   

   
 
 

 

 

   
   


   





 
 







   

    
 C



 
 
  ( (
  
 #        
" 

   
 
 

    

    
 )

HH:HH- *
3
       

  
 






  

  1   
 
  
 

  
 
) 

%( 7 + R
" 7 +
  81
@! 1
@8 6 
6 81
@!8'
7 + 
R   R'

 
 6 
R'
    0'  1 


 2
' 66
"


  


 


 +
'

 
 6  R'
#

% 
 6 81
@!8'
#

) 

%( 7 + R
" 7 +
  8 1
@!8 6
8 1
@8 6 
6 81
@!8 6
8 1
@8 6 
6 81
@!8 6

S 6
8 1
@!8'

% 
'
#

)



%( 7 + R
" 7 +
  8 1


@!8 6
8 1-@8 6 - 6 81-@!8 6
8 1@8 6  6 81@!8 6


R 6
8 1


@!8'

% 
'
 %   
 ,     $ 9=:
#

)


%( 7 + R
"
%  8 1

@!8 6
8 1(@8 6 ( 6 81(@!8 6
8 1
@8 6 
6 81
@!8 6
8 1

@!8'
#

2       


 '

    
 
  

    
9 ; ?  !  ;)@'    
  
  


  

   
 
  
 


% &% ?&  %A   @'       




 

  

       

   

  -"   

   
 
  
     

  

+  
 

   
  
- 
 -      
 
 
 

 

   
 (4      
 
   ) 

 
   -"       
 *
. 9= 
 -"     
   $ 
$ !   (4
    
   *   !   (4 
    

%       .>  %  &*7  

 


  


E 5    .' E &*7 I

 
  

)
 

*       
 
    


     

 
 
  &    7     .5 .&*7 66*
! E     &*7
 &     %  * 4 I  
! %     &%  * 7
    . I       
"
"
.=.E&*7 I


   -
  
 
.F' &*7 I

         





    
    
 

 


 
  
   
  (4  
 

 
 
 

   
9=<   (  %
    )    
 $  &'
 $- + NG
?
'
 $ %   '
 $ %  L
  '
 $- -  
 &'
  + D  &'
  + - - 7/R=-
 '

%(  O   



"  
9%
 H%
(%
'

%( O   



   
?+%  =-
 
" 9%
 H%
G      
9%
 H%
G   
) 
'
(%
    
9%
 H%
'
#

%(   
7 + 

  7/R=-
 5 ),=-
 
" G
  
 G

'
9%
   (%
 
'
=

    +
9%
 =

 '

%  +
O    '
#

 
    +
O  =



" L
  
  
 L
  '
3
 
 
+
?3
'
    0'  1 
 +

+ ' 66
" 3
  
 
'
   
 =

    


" =

 
 =

  '
 
+
*+3

:%8
8
" 
  +


'

 '
#
#
#

%  
'
#

 
   
+

=



" 3
 
 
+
?3
'


 %'
7 + 
 %'
L
  


  
 L
  '
    0'  1 
 +

+ ' 66
" 3
  
 
'
   
 =

 
 %   
 ,     $ 9==
" =

 
 =

  '
7 + +  
+
*+3
'
  +
:%8
8
" 
 +


' #


  +
:%8
8
" *
-   *
-  
+
G  ?'

  +
9 '
#


  +
:%8


8
" 


 +




' #
#
#

%  
 

5


'
#

 
   
+

=



" 3
 
 
+
?3
'
7 +  
+
/ (%
8
G+8'

7 + 
 88'
 
 0'
    0'  1 
 +

+ ' 66
" 3
  
 
'
   
 =

 
" =

 
 =

  '
7 + +  
+
*+3
'
*
-   *
-  
+
G  ?'
7 +     +
9 '
  +
:%8
8
" 
 )
+
 
)  ' #


  +
:%8
8
" 
  ' #
#
#
  K % CC 
:%8O%
8
"
%  
 O%

' #



"
%  
 ?%


' #
#

 
  


+



=



" 3
 
 
+
?3
'
 -  0'
   0'




 %'
    0'  1 
 +

+ ' 66
" 3
  
 
'
   
 =

 
" =

 
 =

  '
7 + +  
+
*+3
'
9=?   (  %
    )    
*
-   *
-  
+
G  ?'
7 +     +
9 '
  +
:%8-8
" -  )
+
 
)  ' #


  +
:%88
"   )
+
 
)  ' #


  +
:%8

8
" 

 +



' #
#
#

%  



-55

'
#

 
  

+


=



" 3
 
 
+
?3
'
7 + (  8 8'
 
 0'
    0'  1 
 +

+ ' 66
" 3
  
 
'
   
 =

 
" =

 
 =

  '
7 + +  
+
*+3
'
*
-   *
-  
+
G  ?'
7 +     +
9 '
  +
:%8(8
" (   ' #


  +
:%8
8
" 
 )
+
 
)  ' #
#
#

%  


(  / 05
'
#
#




3     
  
 


 
 

  
  

  
 
      

 
   
         





 " ("H0
 $ F%AG 
  


  
 
6 H,   
  
    
 
  
  
    " ("  

$% 
+   

 ,-     1 ??
 
 .   
 %   
 ,     $ 9=;
Branch
name: String
sortCode: String

* customers
AccountHolder Account
name: String 1 balance: Integer
accountNo: String
personalAccounts maxOverdraft:
Integer

PremiumAccount OrdinaryAccount
interestRate: Integer
minBalance: Integer

   B0 % 

,   

 ,-     1 ?;
 
 .    

  
  

 
 

- 6 

  

 
 

 
  
 . 

   
"   

 , 6  
  1 :<
 .   

  

   
     '    



. 6 

     1 ?>
 
  
   
/ 6 

 ,-  1 ?> 
  
  

  


 .   
 


 
  '
   
+
0 I 
  ( ( 
      1 ?A    
   )  '
    
    
 ( (
9=>   (  %
    )    

<<interface>>
I
op1(x: Integer): Integer

A
B x: Integer
1
* y: Integer
n: String
br {ordered} setx(xx: Integer)

y = 10 * x

  B0 %  

B D
batt: Integer * * datt: String
br dr
A
aatt : Real

C
catt: Real

  %   !

Order OrderLine Product


1 * quantity: int * 1 description:
date: String String
note: String price: int

Assembled SelfAssembly
* orderedBy
Customer
name: String
address:
String

   !


 
 
 

  
 


 
  


   
 


  


         


   
2  . 
 .-, - 
 1  3    (" 
     
    $  46  ,   ,-
 


   
    

  
 $
  3       
 

      

 


 3:6
    
  

"        
   
      



, 8
      

  
  

   
 
 

   


 
   


  
 
   
 
  0      !
  
 
     
½   
  
  '

 

    

  
 


 
 '
 



  

  
   +
 2
   
 



 
  
 

 
     

9 (  

 
     
 
  
)
   
 


 
*   
 )   

   
 
 
 
 
   
 
 
  
 
  *  
 


 

% (  

          
  

 

 
     
 
   1 
)

HH  *


: ( 
 
 

   
   

  


     

½ *
 

    
 +##- &)  
  
   %

9=A
9?&   #  $  
(C

 + C

 
  
 (  

   
  
  
    ! 
  


           

   
 
      

       !  

  
  

  
  
   

 
 


 
  
 

 5     


   H      
     1    


 

  
    

  
    
   
 
    
!  
 

  D 
8 
     
 
    

    
    '

  
  Z
1 ;9 
   


 


Client

HTTP response
In Database server
ter
ne
HTTP t
GET/POST
requests database

database driver
Application
doGet Server
doPost response
Servlet(s) SQL
operation commands
Database interface

   (  


  (( 


3   

  
      
 III   4
 

  
   )  
$  * 
   
   
 


    


    
   
   
 
   

  
 

  )1 ;%*
  

 
  


!   

  !  " 
   

 

   , 
 
 
  


 



  
 
      
 
   

 

  




     
 <     
?<!@

I0 +
 


   

 +

$/   
   
   
 $/   
 

HH  B  9[ 9_  %[ %


 ( 
  $  9?9

   4   (


(
(  !
9?%   #  $  
,4- +
 


     
   
)

 $/*  
     
 


  

  
  
   $/    ,4- +

     
   
  
 
   


 
"
   
  I0 

       



  $/
 


 
 


   


 I0 +
  
    %== 
 )  
 *
    

     
  
  2 
1   
     1 ;%   I0
 
 


1 @
1(@
1  
 8
+
 8

  8>=*8
  
8   

   %B0B0


+
<
7

8@

1 @
1(@
1 @


  
 
 
  I0

      .
 
  
 
    >&>& 
  
   
  
  
  
 
  
    
 


 
     
   !

 
   
  !



 

      

 
  
  
  
 
   
 +


#7 7 '  ! 





"     


 
     

  




   
 


       

  
 
  )
 
 
 
 
 * 
  
  4
 

 
:/0!   . ! 
    )    
  *  
 
 

 
   
 
  . -
      
     
8 =    B9      P  
5  
   . 
" " 
           !   
C

     
 ( 
  $  9?:
. -
    
 !

   
  

 


     2 , I0  ,4-  
      

 
      
  

      
   
 

1      
  !  !        


  

  
       

4
   
 
:05 . -  ,      .


 2 
 



 
 
   
     

    
    
   
(05 "
  -  ,   -   
  3     
P   5 
 
    -

  
 

    
  



    
  
   

   
     

 
    



 
 
5<5 "    
 
   
   

   
 
 
    
   
      " 
 "-,  .-, 
  +   
 
      



 
    


 

0/ "  .   
 
   
  

 2 , I0  ,4- +
 
   
 


 
    
 
 
.-,      
  
  
   
 2 

 
    
   

)




   
  
+

*   
 
 


 
          

 .-,  
 
  
   2 ! 
 
     
 
  
   
     .  
 
  
    
      
    
  

  
  
     2  



#7 7    

  
        


   D 
 8 
 

 
      + 
   
  
  1      

    



  ! 
    ! 
    
 +

 
   
 
C

 
 
 
    

 
  
  

  
 
 #   
   



 
    


 
    
  
 J
9?<   #  $  
  #    
 
   

H  
J
 #    


   
H 
 
 J
 #    
  
 
   )   
 !   
*J
 #      
H
   

 
  

 
 J

 #   

  
  
  ! ! 

 

  

 

 
  
 
J
! #    
   


   
      
 
  

  
 
 
 
       
!   
   
  
    
 
  
 

3 
  
    
   


 

    
      

     

, 4       

 
    
 
      


  
 ,  
 
 
 ,- 

  


  
  

  
 
 
  
  
    
  



   
  
  
   
  
  
 

  
  
   

  

 )
   
 
  



 *
   


  
   
     

     


 

      
  


   
 
  
  
  

 

  
  
  
   
       
   
4
  
    )  




 


*       
  

   
   


   

 
 )*   
 

   

    
 
 
 
 


 J )*
  
 

   
  


 
 



 

 
 J )*   
!     


 
 
 
 
 
   
 
 


  
 
  
 
"       
 
 
 
 
   


 
  

  
  
  
  
  
 


  3  

     



 
     
    


  
  

   
 

   
       
 
 
  

 
   
 
    

  
  $  9?=

  
 

   8   
 
  
! 

 

  )       
    

 
  $


     

    J




        
 *

#77 -.!(2
 (
( &  !

"     
   
  


    



     
 

 +

 
 
   
  

 +
 1 ;:

 ,       
   1 ;< 
 ,  
   
 


Register User <<create>>

Customer

Update details <<edit>>

Remove User <<delete>>

Search <<get>>

Login <<add>>

 
 %'    
(
(  !

-    
 

 
  46" 
9  K"     


&  
   + 


    L
  &  
 &   &
$ 

   
 . 
% K"  
 
   +
 
  
  

   

  
 +   
9??   #  $  

User Property
<<implicit>>
userName: String * propertyPrice: Integer
*
userEmail: String matches propertyType: String
userMinprice: Integer propertyArea: String
userMaxprice: Integer propertyAvailable:
userArea: String C2 Boolean
userType: String propertyBedrooms:
Integer
userBedrooms: Integer

C1

   %'  !


(
(  !


 
   
   +L
 &      
 &
$       
  
    

      
       
  !

   

 
   
 
     
     


  
   
  
  

 
 
  
  
  "

  
  

 
 
 



   
 +   -@ +
    

 
 
  5
 .       


    1 .   
   !    
!   

!       
 
1   
 
     
 

 


 1 ;= 
  
 ,-     

  


C
 
      
  
 
  7   


7  
  &   &
$ 
5!&  
          
7 5!&   &       &
$ 
   
    
          
       !

   
  $    
$   
  
  
 
 

  


  .
( !!& $         

"        
!
    
  
 

  
  $  9?;
User <<persistent>> Property<<persistent>>

userId: int {identity} <<implicit>> * propertyId: int {identity}


userName: String * propertyPrice: int
userEmail: String matches
RegisterUserForm propertyType: String
userMinprice: int propertyArea: String
name: String userMaxprice: int propertyAvailable:
email: String userArea: String boolean
minprice: int userType: String propertyBedrooms: int
maxprice: int userBedrooms: int
* *
area: String * allUsers * loggedIn allProperties
type: String
bedrooms: int
{subset}
register() <<create>>
0..1 1 1
Controller 1
LoginForm
name: String * 0..1 0..1
email: String UpdateUserForm

login() <<add>> 0..1 name: String


* email: String
* minprice: int
RemoveUserForm maxprice: int
area: String
name: String type: String
email: String bedrooms: int

remove() <<delete>> update() <<edit>>

   % 
(
(  !



. "( '    
"( '  .   \  
. "( '  "
  
 
. "( '   



. "( '  &     
. "( '  &
$   
$  
. "( '       
. "( '     
. "( '  
  



   
 "( '  

  

   

 . '
    

  
 
    

  


 
    
 .
 )    


         
#   
   
 
 H                 




*
(
   
 
  
    
  
 


  

!  
"       
  

   
     


  
 , 
  
 


    

 

   1 ;%     
  
 
 

Æ

 
   

         


  
 
   
       
  
9?>   #  $  

 

   
  
 



    
  

 
  

   

 

    


     ,    


  
    

  

1       
    # 
 
 

  
 


 

 
     
 )
 
 

  + 

* 
 


 

 
 ) 
 
      *
  
 

  
  
   
 

 
1 @
1
@
1  
@<

+  1  
@
1
@

1  
 8
+
 8

  8>=*8
  

8   

   %B0B0


+
<
7

8@

1@
1 +@Q% 
1 +@
1% 
 8
8 
 8
- 8@1@

1@
1 +@= 
1 +@
1% 
 8
8 
 8
- 8@1@

1@
1 +@; 
  
 
%
+  T1 +@1( @
9


1% 
 8 
8 
 8 8
%
 8

8@
7
.


1% 
 8 
8 
 8 8 %
 8
8 

@
*


1% 
 8 
8 
 8 8 %
 8

8@
G
1% 
 8 
8 
 8 8 %
 8 8@
1@

1@
1 +@O  (
 T1 +@1( @
1% 
 8(
 8

 8
- 8 2
 848@1@

1@
  
  $  9?A
1 +@ -%  
T1 +@1( @
1% 
 8- 
8 
 8
- 8@1@

1@
1 +@ %  
T1 +@1( @
1% 
 8 
8 
 8
- 8@1@

1@
1 +@; 
  
T1 +@1( @
1% 
 8
8 
 8
- 8 2
 8E8@
1@

1% 
 8%( 8 %
 8
+
8@
1 @
1(@
1 @

 
    1 ;%
  !
   
 

   
  
 
 
      
   

   
 ) 
 
 9 % : <  =E*       
  
  
  


  !
 
   O
   
      C


  
  

 
  
"

  . -
    
 !
 
    

 

      $ \$ $ 


 
     
     
   
      

 


   


  
   

 $  &'
 $ %  &'
 $- 

  &'
 $- 

&'

%(  
+
<
7


-
 O 7


"  
9H) ('  )

  (

%( 
+
<
7

 "#

%(   7



?+ +
  7

=-
 
" %
 +'
(  
 9H)'
#

%(  >


O 7


:%

:5
O 7





  7

=-
 5 ),=-
 
"
 
?
 *
8
-  8'
9;&   #  $  
  ; 
 
 +
; 
'
7 + 

: +
 

8
8'
7 +
 
: +
 

8
8'
7 + 

: +
 

8 
8'
7 + (
  
: +
 

8(
 8'
7 + - 

: +
 

8- 
8'
7 +  

: +
 

8 
8'
7 + 
 
: +
 

8
8'

   81 @1
@8'
   '
   81  
@
+   9
1  
@8'
   81
@8'
   '
   81( (+ PGGFM??@8'
   '
   814@* %5 8 6 
6
8 
+
+ 14@8'
   '
   81 @8'
 ( K %
" ( 

<

5
5 
5- 
5

5(
 5
'
   81A@Q% 
 
8 6
8(


 
 1A@8'
#



"    81A@=   
  8 6
8
 
 1A@8' #
   81(@1 @8'
 
'
#

%(   O 7




:%

:5
O 7





  7

=-
 5 ),=-
 
" >

:5
' #

%(  
 
" ( +' #
#

  
 
 
 
  
 
    

  
    
 
      

   


 
  
  
  +
 
     
    
 
 
   

3
  
   2 , I0   
 


  


 
 #    
 %  

 
  

 

  



  
  $  9;9
'  =&#0  #*7
) D I  .D&*7


    
      
   2 







; .   :.)&# #*7
; .   :.)&# #*7
; .   :.)&##*7
; .    :.)&# #*7
; . 0)   :.)&#0 #*7
; .  )   :.)&#  #*7
; .   :.)&##*7

   
   

  
  

 
 2 ,
I0   

        
 






 


  
   


     
  




 +
   

 

  
   81 @1
@8'
   '
   81  
@
+   9
1  
@8'
   81
@8
   '
   81( (+ PGGFM??@8'
   '
   814@* %5 8 6 
6
8 
+
+ 14@8'
   '
   81 @8'
 ( K %
" ( 

<

5
5 
5- 
5

5(
 5
'
   81A@Q% 
 
8 6
8(


 
 1A@8'
#



"    81A@=   
  8 6
8
 
 1A@8' #
   81(@1 @8'
 
'
#


  


 
  
     

     

 !

   
 
 
    
  
.

  
   
 
  
   
 ,
-@ '
H
  
  F:%G



 
      
    
 
 
9;%   #  $  


 
     
 
   

 
 

     
  
       
 
 
 $  &'
 $ : &'

%(  9H)


"  
?
  '
 
7 

   '

&& ? %   (



  
 

  8 
(8   %

88 &
%( 9H)
" 
"  +
 +
  (
 

?  3
8 +  +
: 9 
8'
 

 
    
  (

 
9 
+
+
?
 
8$( +
: 
(85 885 88'
    

7 

 '
#
  =-
 

"
  7 * 
' #
#

&& /  
 %
 
 (
&
%(  2
  

<
7 + 
5
7 +
5 7 +  5 7 + - 5
7 + 
5 7 + (
 5 7 + 

"  -)  +
-<
)'
-)66'


"  
-
%
<
8)37=* )3*, <
8 6
8L/ <=7 8 6 -) 6 85U8 6 
6 8U5U8 6

 6 8U5U8 6  6 8U5U8 6
- 6 8U5U8 6 
6 8U5U8 6
(
  6 8U5U8 6 
 6
8U8'
  '
#
  =-
 

"
  7 * 
' #
#

 
 +
-<
)  
%  -    

"  -)  0'  %
%
   (


" 7 + V%
  87= =?* /R%
) 8 6
8/7 -) G, <
8'
  
  $  9;:

% 7

   
-
%
V%
V%
'


 
- 
" -) 
 +
) 8 -)8' #
#
 7V =-
 

" 7

  8=   +
+ - 8'

  7 * 
'
#

%  -)'
#

&& ?

    (
&
%(  2
  +
" 
"   
'
 
'
#
  =-
 

"
  7 * 
' #
#
#

    



   
 
 

  
 
   
   

 
  
    

 
   
    
 

     
        
 
+


 
   
 
  
 
 


 

 
  +
  

     #   
" 
  
  
 
 
  

 

  

 
 
 
 
    
 
 
 

#77  &   2  (    

(  
     
 

       


    
"

 #


  '
 
    
  




    
$ 
 #

    C
      


 


  
   


 +
,

 #


    + 
  
  
     C
  
9;<   #  $  
" 
 #

  
 C

      
     
  
   
         !
    
 


 
     
  
  
 
 
 
  
  1    
    
    ! 
 

 
   


  
   "    
 
     

           


 

 
      
    


 +    


  ,         
 
 

 
       
   
   

  
  

 
 
      
 
 
    

!   H
 

  

  

  
   
   


 

 
  
      
 1 
   
   

 

! ! 
 
      

O    H 
! 


    
 4
 
    
    
   
!      
    

  !
 
   

  ! FAG        

 
    
    
(         



  
  
 

 F9=G   
  
 
     
  
  
 



 
    
  
 

  
C
   


    
     


  

   

    



     



 
 
 "

    
O

  
 #      !  ! 
    
        
  !   ! 

  
 
# 


    !
  


   0  
 
  !  
    #    
 
  
     
    !
 
 
  




    
   

   
 
" M  '    
   

 
   

 
  
 !   

   
 


!        !  


 
  !  


 

  



     
 

 
 
 
 
 
   
 

!   5      

 
 
    

          
 
    

!  
  


         
       
 
 
  


      

0  ) 0* 
  )*  M 
  
  $  9;=
,

  
   
-
     . -

 
    


 

6   
   
     C
  

  
 2  
  
    
       
 $ 

 
!  0    
  

 
  )
 
 

     
   


   

   *

 
   
  C
 C
 C

   1   


  1    
  

      
  
  
 

  
 
   0
,  
     C

   



 
  
 
      

  
 
 
 
 :=9AAA      C



  

 $-"   

 $7     "
      K=
    9AAAL !  

  
  
    
)

   *
  !   
 

4   


   
   

   
  
  C
    


  
  

        



  
 
!



 
     
 
   
  
  !

 
    
          





 
   
 
  


    


       "        %9?  )
 
       
   
 
   
 && :: ?? AA 66  11*       

  

  
          
 K L 
)

HH *
3     !   

 3:6 2 
 

 3:6 
  
 IIII9  .    

    

 
 

   

  


     "
     
! 
  
  
 
   
 
     C 
     
 

         
       
 
 
  "       
    
  
 
    
 $7 
  
 
    
          
9;?   #  $  
0 
   



    
  


  ! H  
       

  
 !  
      
  

       , 
   
   

   
   
0 
  
M       9% 
   
    
 
  
 
  


 
  

M
0 

   
    
 
   


 

 
 

    
 


 


        




     KNL  
       M
  
  

     
  H


  + 
 !
 KF-
GL
-    


   
  
  
   

       
 
   
         
0 

2 

  
      
 

  !  

   !   
 



      
   

1   
 
         
 
 
   

     
 


 

    

  ! 
              

 
     
       +
  
 
 
    
 "     
    
 %&&&
4        
  !   
 
  
 

 
F%&G 
 $7
 ( 
 ( 
 "
 ! 
  
    )
    *
  
  
   
  
      
 

   
 3:  
  
  
    

  
 
 IIII9  . D- 

#77  &   2 B0 (

 
      . -
  



9    
 
  
       
  
           

 


   
    
  
%    
 
 
   
 
 

 
   
     
     
!   

  

   

 
  

     

  
  $  9;;
. -
 

 
 K L 
    
 
       
 

   
 
  

  . 
" 
     . -
     
 

 

 
 
    

 
  
1 @ 1
@
1  
@7%  %(
  4 401  
@

1  +%+
 8N7  8@
%
  
81 (
( 
 U4U    UF0WU@8'
%
  
81 @1     UD0WU@3%(
1 @ 8 6
81     UD0WU@7%1 @1 @8'
 %  0'
    4'  1 40' 66
" %  % 6 '
%
  
81 @1 @ 8 6  6
8 1 @1 @ 8 6 % 6 8 1 @1 @8'
#
%
  
81 (
@8'

   % 
1  @
1
@ 1(@ 1(@
1 @

1 ;? 


    
        




     2   . -
      
 


P    . -
   
 

   7
"
  
    
 
   
   
  


   
   
 
  & 
    " 
.           
   
  
 



 
  


    *               
. -
 .   
 
  


   . 




            !
 "  
 
  &  0    *
!    A 0B  "

       
 

          



. -
      
 

    

   



  I &#     HH I  HM NH#*7


9;>   #  $  

    (
! (
  
  $  9;A



  


 
   
 

 

 

 
     
. -
        

    
 

      2      


 

   

 
  
  
 
 

      
  
  
  
 

  
  
1 @ 1
@
1  
@?%(
 1  
@
1  +%+
 8N7  8@
%  %(

"  - 
 
) %
  4 
4 %
'
%
  
814@*
%(
 8 6 -&-&- 6 814@8'
#
1  @
1
@

1(@
1  
 8 48    88@

1@
1 +@=

+
 (
%(
1 +@
1% 
 8
48 
 8
- 8@1@

1@1% 
 8(% 8
%
 8?%(
8   8%(
8@1@
1 @
1(@
1 @

1 ;;      


 
 
 
(


  4     
 
  

 

  
  
 
 
     
   
 

     


 ! 
  . -

9 ,       
  
       


!       



   
   



  .    
 
 
  
% 1
     !    

   



       
     

  
   
          
    
   

 
1
       
   

 
   

 
 "  !  
 

    

)    
* 

  



  

! 
  
 
 )"
" *
9>&   #  $  

   (
 (
  
  $  9>9
  E&*
!  &EE&F &***
!   7 "
 7
"
 
      


 !

  

    
 + 


1 @ 1
@
1  
@3%(

  1  
@
1  +%+
 8N7  8@
%  

"  3%(
%
  4 
4 %

"  
8,5    %(
8' #



"  
8=,   %(
K8' #
#

%  3%(


 
"  33 
G  
"
%  
' #

%  %
'
#
1  @
1
@

1(@
1  
 8 48    88@

1@
1 +@=

+
 (


1 +@
1% 
 8
48 
 8
- 8@1@

1@1% 
 8(% 8
%
 8?
8   8
8@1@
1 @
1(@
1 @

1 ;>   


 
 
" 
   
   
  

 
 
. -


    $     
  
 



 
   
 
  

   

  
      C
   
 


   1 ;A 
  
    
. -

   
        

 
  ;9 
 
 
+
    
 
 
 
 
 !  


 

 ! 
  
      C

 

 
9>%   #  $  

   (
! 6 (

Cube
field1: Integer

cube()

  



!
  
  $  9>:


 

   /
$  
  /

   


 




 /











  /



 








 /


 








 /

 


 







 8 /

  9

 










  8 /

      /

  





 

 /

  



   /
   / /

 




 
 
 0 

  /


  
  

  /


 
  


  /

  


  /

 



 /








  /
 /


*

   

  

*
  
/

%'  B0 ( 0 


9><   #  $  


  


 
    
 


     
 

  

 

 
  

1   


 
  
   

  

     


      

1@
1 +@; 
  
T1 +@1( @
1% 
 8
8

 8
- 8
%

 8

+
8
2
 8E8@
1@


&
   
%  

+

"  
8=
  
5
+!8 6
87;4M  =?48'
#
1
       !

 
   
 
  
  
      
   
  
   C

  !
   
       

   
    &'  9'  %'  :'   <'  
  
  
1 @
1
@
1  
@)+
1  
@
1  
 8
- $  8@
 %  0'

%    *



"  
)
8 85A000' #

%  


" %  % 6 4 W J'
%
      % 6 8 $+8'
#
1  @1
@
1(   8  *
8@
1+ 
 8 8    80 $+8@
1(@
1 @

   

     
    

 +

 
  

    

  - 
 
  
   



   
    
 

    
  

 
 


 


   . -
! 
  
  


 
  
  
 

  ;% 



 . -

!   



   4

 
   
 !
  
  $  9>=
    =  
 $
/  " 

 "   D8  

 
 
5   +  K
L  K  L
%'   B0 ( 6 0 
!    (

  







   
 


 D\8
  

  

 
 
  

  % &*
!      0&#+#*7
   

     . O 7
"
   
 



 
     
  


 
  
 
    
  1   

46H46" 
 


 
   



  

 !
  . 
 . -

1
  
   

   
 
   


     1 ;9&  
 

RegisterForm <<form>>
name: String C1, C2, C3
email: String <<email>>
minprice: int
maxprice: int
bedrooms: int
area: String
type: String

register() <<create>>

 ) 


  

!

9         


$ 
9>?   #  $  
%  

 
:     

 



  
 


   
 
, 
    
 

 '

   

   
  


         !

     
   

 
 
 
 


 )
    
   

 *
  
 . -
  

   

   
1 @
1
@ 1  
@<
1  
@
1  
 8
- $  8@
%  3%(
 
"  33 
G  
"
%  
' #

%  %
'
#

%  )


+
 
"
%  3%(
  CC
 
-,8 8  .4'
#

%  = 


"     
-,8 8'

%   @ 0 CC  1  
+  . 4'
#

%  
3

"  %
 <

%

+  @ 0 " #



"  
83
 (

 K8' #
#

%  
=
"  =%
 <

 %
 " #



"  
83 
 
 8 6
%
 <

 %
'
#
#

%  
  

"  )
+
%
 <
 
%

" %
 <
 
%

 
) %
 <
 
%
'
#



"  
83  
+
 8 6
  
  $  9>;
%
 <
 
%
'
#
#

%  
 - 

"  )
+
%
 <
- 
%

" %
 <
- 
%

 
) %
 <
- 
%
'
#



"  
83  
+
 8 6
%
 <
- 
%
'
#
#

%  
H
 
"  )
+
%
 <
(
  %

" %
 <
(
  %

 
) %
 <
(
  %
'
 (
 - 
 
) %
 <
(
  %
'
 (
 - 1 0
"  
8H
  % (
@ 08' #
#



"  
83  
+
 8 6
%
 <
(
  %
'
#
#

%   7%( 


"  -   
) %
 <
- 
%
'
    
) %
 <
 
%
'
  @ 0 CC - @  " #



"  
8 
  K8'

%  
'
#

%  %
'
#
1  @
1
@

1(@
1  
 8<
8
  
8   

   %B0B0


+
<
7

8

  8,7*8@

1@
9>>   #  $  
1 +@Q% 
1 +@
1% 
 8
8 
 8
- 8
+
 8
3
8@1@

1@
1 +@= 
1 +@
1% 
 8
8 
 8
- 8
+
 8
=8@1@

1@
1 +@; 
  
 
%
+  T1 +@1( @
9


1% 
 8 
8 
 8 8 %
 8

8@
7
.


1% 
 8 
8 
 8 8
%
 8
8 

@
*


1% 
 8 
8 
 8 8
%
 8

8@
G
1% 
 8 
8 
 8 8
%
 8 8@
1@

1@
1 +@O  (
 T1 +@1( @
1% 
 8(
 8 
 8
- 8 2
 848
+
 8
H
 8@1@

1@
1 +@ -%  
T1 +@1( @
1% 
 8- 
8 
 8
- 8
+
 8
 - 
8@1@

1@
1 +@ %  
T1 +@1( @
1% 
 8 
8 
 8
- 8
+
 8
  
8@1@

1@
1 +@; 
  
T1 +@1( @
1% 
 8
8

 8
- 8 2
 8E8@
1@

1% 
 8%( 8 %
 8
+
8
  8
%   7%( 8@
1 @
1(@
  
  $  9>A
1 @

3    


 
  
 
  

 

   
#
   
  -  

    

   
 


  


   
  
 
 

 
 
 
     
 
    
    -
 ;%> 
. -
     
 
!
   

 

   
   
     
    
  
     


#77  &   2 ! !(

"     


  
    ! 
      
2  ! 

 
 

  

 C


 3 

  
  
    ! 

!  

 
     
 !
 

"       
         

 
 
     
 
1 @
1
@1  
@)+
 =-
1  
@
1(@

1 
 88@
1
 
 8
 8    8A5A5J054008

  8
4  8
  8
4   8 @
1
 
 8
 8    8JA5A540054008

  8
A  8
  8
A   8 @
1
 
 8
 8    840A5A54J054008

  8
D  8
  8
D   8 @
1@

1+   8
 +8   8A008 
+  84A08
  8)+
 


8 %
  88@
1(@
1 @

 



 
  




    


    
   1 ;99 


 
  
-   !        !  
9 /
     

 
 

 


 
9A&   #  $  
Image Boundary

Figure 1 Figure 2 Figure 3

Active area for 1st figure Active area for 2nd figure Active area for 3rd figure

  '! !( .!(

   # #   #0((08(8#


  #  4 #
   #%0    0# 

% 6     
 
 
   
   #  #   #0((#
  #  4 #
   #%0    0# 

: ,        


 
 
 
   # #   #0((08(8(09(9#
  #  4 #
   #%0    0# 


  


 
 
 
     

  
      

       

#77$  &   2 


! , 

  1     


 
 

     

 C
       
      
  
           
   
C
   

    1    

   
 


  
 

  
 

   )   
  * 
     

     
   
  
  $  9A9
3  


    1   

 D 
 
8 
 
  O   
  
 
    


 
 
      
    
 " 
  !  

  
 
)


   


*
1 ;9%  
  

  

Plan of
property

photo 1

photo 2

   A 


  (
(    1   
  
   
  
 
       
 +         

 
  
   
     1    
  
 
  
 
   
  
 
   
             
 

   

 1
  
 
    
    
1
  
   D 
 
8    

   
9 "  

 
   
 O 
  
 0  
  
 

 
   !
  
  ) 
 
  * 
 
 " 
 

     



 


   


% "    
 

  
 
 
 
 9&  
)9 * 
   
: ,
 
 
      
  

C

1 ;9: 
   +         
 
 
 



  
    
  
 
    
9A%   #  $  

Layer 1:
Plan of
property

Layer 2:
moving
blob

Layer 3: photo photo photo


photos of 1 3 5
rooms photo photo photo
2 4 6

Frame 1 ... Frame 10 Frame 11 Frame 12 ... Frame 21

 
 A 
  

 

    
 1    

      
 
 1
 
    
 O    
   

 

  4
 
  
       

        
      
        

 
 ! " 
 . -
    

    

  


   


 

&*
! .   ) & ? 6 *7 "


 

   
     


 1   
 


        
 

   
 
  
 
 
    

  4

   
   
 
 )
  
   

*
 
    
       
 


8  
  

         

 


   

#77+ '  


      

"    -


 ;%:           
 

 
 


 
 

   
 
  

  $ 



 
       


   
 
 
 
     


 
  

+      
   
 C
      1
;9<      
  
   
 -

  

 

   

   )

     
  
  $  9A:
     
*
   
    

 

   


   
    
  


 

    

   
 
 

 ) *  C


       




 
 
  


   
              

index.html Login [invalid name and email]

NewUser
Login
[valid name
and email]

registerUser.html command.html
Register/add new Remove
user record to
User table Edit
Update/
Search update user
data

Lists all properties


results.html editUser.html removeUser.html
matching users Edit
requirements,
in price order

Remove/remove user
from User table

       


   !
(
( !

  
 
   
 
      

  +  
 

  
 
   
      
 


       
 
 C
H

   
 
 


 

"
 
        
  


  

 

 
 
 
  ,!
              
 


        
 
  
 

 

 

2   
  
  

 
  
 
 
     

   
 
   

 
   
   
 
 K !L 



     
 

  
  
2   

  
 
 
!  !


  

           


 +       
   
 
 3  
    
!


 


 +
 
 
 C
  
 

 

  
   
 
 3    !



  
       
   
9A<   #  $  

  
 

 

 H
C 
 
    

 
  
 
 
  
 

  
  
 


 
  
   



                
    
   



 
  
 
  
 
 

 
   
  
 
 

  
 
  
  
   
    1 ;9= 
    
         +  
 
  
  
   
    
      


      

   

Login[incorrect id or password]

login.html

Login[correct id and password]


resultsr.
html
Getr
command Getr
.html
getr.html
EditE1
CreateE1
DeleteE1

createE1. delete editE1.


html E1.html html

       

#77#   0

"

 
   
 
 
   
 
     

       
  

    
 


     
    
 
 
 
   
    

 
 C  K3  
    9&&&&&
 
     
 -
 0
L     -
    
  
  
       


 
  
  
  
1
 

 

      
  
  
  

   
   

 
  
 

   
C 

  

  
  $  9A=
/

    )    
* 
 
 
         
 


  

 
 
   


 
 
  
!        

     
1  
     
    
 

  
 
 
  
  
  
6


 
 

 
  ) 
 * 

 
 
   
  
 
  



   ! 
 + 
 

  

 

#77* 0&   2 B0 0

- 
 .     
 2 , +
   



     

   
  
  

    2 

   
 


 

   
 
 
3

     

 


  
 
      
  

  
 O  

  


   
 
     
 

 
  
 ;:   - 

 .-, ). -  ,  *  

  .

       


 =!
" 
 6
    0 
 




   
   
  
(  
 /+ . 2 
 
  !     


  

  

%' 
 0 0  B %
 -
 ;%    
   


 
 

 
       
 1   !   

    H 


 
 
  
         



 

   

& 


  
    )  

  


       


 *  



 
     
    

 
 
 
 

 
 
   

9A?   #  $  
 
 
   !


   

  





      
 
  




  

&  !


 
    
   
 

 
 
   


   
   

   !    


"

   !


          
 

 


   


   
   

  

 

&  !


  


 
    

    
 
 
   

 

 
    

 
 
 
 

 
 
   




  
  



   
  


  


 
  
 
" &  !


     
 
   

   
 
 
  

 !  
 

 


 




  
 
  

   
  
 
 

 
     
 
 
   
 
 
 
 

  

     

&   


 

     

  

  
 
    

 
  





   
    

  


     
       






      

  -@
  N +,)&  (,  +  
   

 
 +  
  
  
  3
   
 
 + 
   
 
     

4/(0/0( 5` 4  
  -@ -006 
  
  $  9A;
   

 
!

   ! 
 




   
  

 
 
 
 



 

 
 
   
  !
  + 


!


  
 
!


      

  
 
  

   
 
 
      


    

#77) 0&   2 &(  




 
   
   
 
   


'
 
 .        
   


         "  5   
  

        
  
      

   
  
3
  
 
  
   

 

 
 
       
      



 

  
   
          
 
  
     
  
 
 3
 
      
 

     


  
         
 
   

 
   )
  .   .   

 
   
* 
     

  C 

   
 


 
       


   
 

 
  


C     
  
 
   
 
 

 
  
1
  
 
       
     
 
    
  
  
 
 

   
    
 


 
  

 
 )1 ;9?* 
   
   

   
   "

 
      

 

        
 ,!. 
 

 

  "

 
  
 
  

  
C
     
 
 ,!. 

  
   
 


 
   C


  "

 
  . 
   
  
      
    


  - 
, . 
  . 
  
     
 C  


 
   
 


 )  
  
   

 

  
   



*
   
  
 
   
9A>   #  $  
HtmlPage

PSPage

NameEmail Command
Search
Page Page
ResultsPage

PSUser Remove Login


Page UserPage Page

Register EditUser
UserPage Page

    


 &(  


%(  7+

"  

 O +
+
 
 O +
'
 

 O O
 O
 

 O O
8 
 7
  <S8'
 

 O H H  
 O H'

%( 7+

" H 
/ (%
8(+ 858PGGFM??8'
H 
G
8 
 7
  <S 0BBB MMMAAA8'
+

O
O
'
+

HH'
#

%( 7 + 7 +


"
%  +
+
O ' #
#

  
 
 
  
 
 

 

  ) 
    
Z*  ! 

  


 
 "

 
   

 
     



   
%(  3
=+

-
 7+

"  

 O G     
 O G '
 

 O )% (%   
 O )% '

%( 3
=+

" %
'
  
  $  9AA
  
/ (%
8
858>=*8'
O *
- 
(
 

 O *
- 8Q% 
858 +8'
 (
  


  
(
'
O )% 
G
  
 O )% '
 % 
  


G
 
/ (%
8 
858
- 8'

G
 
/ (%
8
858
8'
  
G
'

O )
    
 O )
88'
   '

O *
-
 (
 

 O *
- 8= 
858 +8'
  
 (
'
O )%
G
  
 O )% '

G
 
/ (%
8 
858
- 8'

G
 
/ (%
8
858
8'
  
G
'
   '

(%  
/ (%
8 
858%( 8'

H  '


#

%(  
3
7 + 

"   
G
8
858%
85
' #

%(  
=7 +

"   
G
8
858%
85
' #
#
     
        

  
    
    "

 
 
%(  7<
+

-
 3
=+

" %( 7<


+

" %
'
O *
-  
 (
 

 O *
- 8; 
  
T858 +8'
   
 (
'
O > %  
G
 

 O > %8 
8'
 
G
 , 8

85
'
 
G
 , 8
85 %
'
 
G
 , 8

85
'
 
G
 , 8 85
'
   
G
'
%&&   #  $  

O )
    
 O )
88'
   '

O *
- (
 (
 

 O *
- 8O  (
 T858 +8'
  (
 (
'
O )% (
G
  
 O )% '
(
G
 
/ (%
8 
858
- 8'
(
G
 
/ (%
8
858(
 8'
(
G
 
/ (%
82
85848'
  (
G
'
   '

O *
- - (
 

 O *
- 8 -%  
T858 +8'
  - (
'
O )% -G
  
 O )% '
-G
 
/ (%
8 
858
- 8'
-G
 
/ (%
8
858- 
8'
-G
 
/ (%
82
858B8'
  -G
'
   '

O *
-  (
 

 O *
- 8 %  
T858 +8'
   (
'
O )% G
  
 O )% '
G
 
/ (%
8 
858
- 8'
G
 
/ (%
8
858 
8'
G
 
/ (%
82
858B8'
  G
'
   '

O *
- 
 (
 

 O *
- 8; 
  
T858 +8'
  
 (
'
O )% 
G
  
 O )% '

G
 
/ (%
8 
858
- 8'

G
 
/ (%
8
858
8'

G
 
/ (%
82
858E8'
  
G
'
   '
#

%(  
H
 7 + (
"   
G
8(
 858%
85(' #

#
  
  $  %&9
  .  .  C  


  
 


 
%(  
+
<
+

-
 7<
+

" %( 
+
<
+

" %
'

O *
- 
+ 

 O *
- 8=
% 
 
+
85
848'
H 05
+'
  
/ (%
8 85
8   

   %B0B0


+
<
7

8'
(%  
/ (%
8%
858
+
8'
  (% '
#
#

 
    
%(  = <
+

-
 7<
+

" %( = <


+

" %
'

O *
- 
+ 

 O *
- 8=
% 
 
85
848'
H 05
+'
  
/ (%
8 85
8   

   %B0B0

= <
7

8'
(%  
/ (%
8%
858<
8'
  (% '
#
#

1 ;9; 


   
 
  
-
   
   
    '

< ;    I < ; &#0 / #*7
&< ; EG1%3P'<%'QPFGE'=-E*7
&< ; -E=P'<%'QPFGE'=-E*7
&< ; %1-5P'<%'QPFGE'=-E*7

<&*7
 

   ".&,  5 +."  )"  
 

 

  
  . -
! 
 
 , . 
     
  

 ! 




 
    

   "* .     

 
 
  



       
     

 
  
%&%   #  $  

   (
-  %
  
  $  %&:
 $  &'
 $ %  &'
 $- 

  &'
 $- 

&'

%(  ) 7




-
 O 7


"  
9H) ('  )

  (

%( ) 7



 "#

%(   7



?+ +
  7

=-
 
" %
 +'
(  
 9H)'
#

%(  >


O 7


:%

:5
O 7





  7

=-
 5 ),=-
 
"
 
?
 *
8
-  8'
  ; 
 
 +
; 
'
7 + 

: +
 

8
8'
7 +
 
: +
 

8
8'

7 +
+
? 
: +
 

83
<
8'
7 + +? 
: +
 

8 +8'

 
+
? K %
" 
+
<
+
%  
 
+
<
+
'
% 
3

'
% 
=
'
    %'
#


 +
"  
     %

(
   ( 
<

5
'
     +
5 



" ?+
  
 ?+
'
   '
O 7
 
 
: +
7
 %
'

 % L%
8
85
'

 % L%
8
85
'
#



" ++
  
 ++
'
   '
#
#
 
'
#
%&<   #  $  

%(   O 7




:%

:5
O 7





  7

=-
 5 ),=-
 
" >

:5
' #

%(  
 
" ( +' #
#

5        


  
   
  

 2     


   
  
 
 I$
     

"  '
 
 

  


  
 
   




 
 
   
  8   
    
  

O 7
 
 
: +
7
 %
'

 % L%
8
85
'

  
     


  '
 

 
 
   
  

 
   
  
 
 
 
 
     

      
  
 
  
 
 


O 7
 
 
: +
7

'
 
 K %
" 7 + %

 7 + 
 +
L%
8
8'


     

          




 
 
 

   '
 


   
 
 
  +
  
    
 
 ! 

 
!  
    

  C
  +  
 !
  
 )  
+   

    
   
 
 
 )1 ;9>*

0..1
HttpSession parameter: String Object
value

  3 (  
  

 
      
 
  


  
  $  %&=
    
   .
  "
  !
 
  
 
  !
 
    

#77  0&   2  =  !

3
  
     
  



  
 

    

    -@     
 
 -@  
        


 .'    


    
  

6 
   
 
  



     ! 
 
   
  
)

 
 
   *
  
   
   !  
  
 
  )1
;9A*

A B
akey {identity} bkey {identity}
aatt1 br batt1
... 1 * ...
aattn battm

  %        


  ;< 
 -@  

 
  '


  
 
    
0 

     
    
   

   -@



     
 
  
  
 

  


 
  
 
 

 
     ! 

 
 
  
    
  2 , +

 
   

  


  

1    
  
 
   
 -@  
   
 ;=  
 
  
  ) 
* 
 

 
 
    8 +
  
    
 
 
     
   
 
 -@



 
 
 
 

 
  1 ;<

#77 
!(     

1 ;%& 


   

 
  
   
 
     
   

  
  
  

 "

 

            
%&?   #  $  

    
 
      !"     
#$% &    & 
 

  !"    &    & 
"

. # #$%
& 
  
& 
    

  " '%() 
"

. # #$%
& 
  
&  *"
 &    & 
      '%() 
#$% &    & 
  
  '%()  

#$%  &    & 


"



  
/ 
#

&
½  

 '%()   
#$% ! *"  &   &   
"
    
$
  ! #

        +*% +*( 


,        
  " '%() 

#$%  &   &  
%'   = !(!  

 !
( 




 
 
          !"     )    
   
      )          
    
       
#$%   *     :2       
        " '%() 
#$%   *     :2       
-&          '%() 
#$%   *     :2       
3 
 
7
  
  

  )-       
   +   !      

       
     

'%()  !   #$%
  *     :2        :2
  )     !  :2
  )     !  :2
         :2
       :2
   
    ¼ :2
        

          +*% +*( 
 
 
    ,         
 
 
   
%'   = !(!  

(
( !
( 


   
   $  %&;
 


        
  
 +
  
 

 +

  
 . '


  

 
 
 
     
 C 

  F9%G
index. register command editUser. removeUs searchResults
html User .html html er.html .html
.html
GUI

Login Results EditUser


Page Page Page

Initial Register Command EditUser Remove


Servlet UserServlet Servlet Servlet UserServlet

Command Remove Functional


Register Page UserPage
UserPage Core

Data
Repository
DBI

  ) 
!(    
(
(  !

I  
  

 
  

  
  

     
  
 
      
 

 




   
 !  )
  *  

  
 +




1
      

!
 
  

  
 
!  (  "+ 
 

1
     




 ! H 
 


 ! $   
  $   







' 0   #   #    #I   #
    ##  ' 0

"  
 
 * $ 
   
 
  

     (  "+ 
   
   

 



 ! H*
       
 
      (  "+   
 
  

!
        
 H !  

, 4        



  
     


    

+ 
 
   
   

 
 
%&>   #  $  
9 ( ,  
 

  

   
% ( ,       
  
 + 
 

:    
 
 ,-  
  

   

  

< ( 

   
       
 
 

   )
 %*   
   +  
 


  
  
  

  
 
    
(    
  
  

 !H
 
= (
   
 
 +     

 

? (
       
 

  
 
     


   

; "  
 

  
 
 
 
    


 
  
   !

 

 

 +
   
   
   
 

  

     
> (   
     2    

 

A 1 
     
   
    


   

 
   
     
    

   


  0  

           
 
 

   
 
  

 
 
   
  * 2
   . 
9& (        )  *     


 
   
  +
J ! 
 
  

 J     
       
  
 
J 


 
  
H
 
99 ( -@ + H 
   
  

      

 
 

 
  
 
  

    
9% ( 
  
 ) *
  
 
 + 

   
    


1 ;%9 


 
     
      
  

   

   
  
 
          

  




   
  
 
  
    

         
  


  
  
 


  ,   8
%A  )

HH H'
H*    (),8 
 
 6(   

 !

   
   $  %&A
Required PIM class
Visual/ operations diagram
behavioural
and information
Statemachine PSM class
content definitions
of operation diagram
(page) sequences

Servlet Data interface


XHTML page definitions & SQL
definitions
definitions and statements
constraints +
scripts to check
Classes for webpage
generation

Client−side Server−side
code code

   '  ! 0


(! (





3      

+  

  

 
    
  ,      
 

+  4
    
    .-,
  
 2  
          
   

 

  
I    
  
  

   
   
    

$% 
+ ?!A @ ( 
        
 

H
C  

     
  
 
 
  
    

 (
      
 


 

  
  


     -@ + 
   
 
, 

    
  
  
   
)1 ;%%* 
 
  

        !

- (   

     M 

   


 



     
    
  

   
   
!  
 

    C
  M ) " 3 PM I 

/  (
  
 *


 
  

  
 


 
       
%9&   #  $  

      (



   
   $  %99
" (  
   
 


 
   
   


 
    
  $    

 
 
 
  
    
   !
 


 
     

  
  

0
      
     
  



          

 J  
   
 
 J 
  
   


 H     
  
. 3
  

 
    
  
    


   
  
/ 3
 . -


 !


   
 




  
  

 
  
   
  

0 ( 
   
 


 
 
 

 



 
  

 
 ! 

 
       
    

 
   
     




   
   


 !  



    
 
           



        
 )   


 
*     
 ) 

   
*    
)

   
 !H ! 
*
1 3
 . -


 !

 

  
 


 5
  
     
 

    
 
 

 3

    ! 
 


2 3

  
    
     9?  




 
 
  
     
    
 
 <  
  
   
 
  B
+# (           -
0
0  


  )* J )* 7
J )* -H- H2   

 
 
  
   

 
   

 
 
++ 
 
 
 
   
  ! 

  
 
  1 ;%:
%9%   #  $  

Booking
Customer
name: String arrival: Date
address: String 1 departure: Date
*
creditCardNo: noOfRooms:
String Integer

 
 3
 

6 !
 
 

% &

3    



 


  
 


   



    



   


  

   
     
     
  


  
      

 
 
 
   


     
)        

 


 

    
 
  
  
  

* 3    


  




! 
   
  

 
 
 

    
  


 
     
          
  
     
    !  .%00

- 4)    


 6   ! 
 
   

  
    C

  
    

21 3    


   


   
   
   !   
!  

3
 
 
  
        3 
      

  3   
 

 H
 !   
  
!  +


 
  

 
  
  
  !O 
"     
 
       
  3(-J        
  
)

 

*    
       


  
 )2 , .- 2 ,- 
* F9AG
1$ "     
 
    

 
 
 
  3   
 


 
    

 3 F::G
%9:
%9<   - 
0 K-   ( L 
  
     6

  

 
   
 
 
 
 
 

      

 
   
O  

 
 
 
   
 
   
   " K  
  L    


  
 

  

  




 

  
    
    
  
  
   F<>G
<#*5  0    
# 
     
 
     
 #     
 



 
      '
   


 K
L 
      
 ! 
   

 
!    !
   
-            
, 
   ! ! F:>G    

  
 
  
 
 , ,   
   

  
     
 
 
     

 
  
 


 
 
 
  
  " M
-     

   

HH



    ! 
   
       
     
  
    
 



  

     

   



 +
   )1 >9*

Directory Services
Register a web
service

Locate a
Web service description web service
using meta language

Web Service
Web Service Uniform data representation
and exchange Client
Provider
Standard Communication Channel

  / 0   


  
             

     
 

    
  
 
.%00  -  
   
  

  *.)) %9=
- 5$$
 . % ,
 0
   0
 ).%00*  
  .

   - 
 .-,     !    


 
   
 
 
- 
 .-,
0
   . 5  )0.5* #   
 

    

   
  



.(56
.   -  ).-* #  ",
 
 
  

   )4*
       
  

 
.    (
 
  ).( * #  
 
  

   
    
 . / 
  


 
 
.   #  ",  
 
     
. 
1 >% 

  

  .%00 

Client tier Presentation tier Business tier Integration tier Resource tier

HTML DB
file JSP EJB
file interface Database

App Serv
let let

External
web service

    ( B-- !  

  
 

     F9%G
   .%00 
 
   
   

    


   
  
 
   
  



  




   
 
   
     
 

   
  
 
       

  


    
 
 
 

     
 
     

    
  
  


      
 

 

- 
     
    


  2    

%9?   - 
5   
   
    
  


 


 
  
 

 
    
   
   
      


 
  
+  
 

 
   
  +


  

    


   
 .-, 
2  
 

    
 
 1
     

    
   
 ! 
 

 

  

    

    0.5 
  
 
 

  
 
 


  
 
  

    
  
.(56
 

  
  
  
!
  
 

  
  "     


   
 
 
 
 
  
.(56 

 
   -@



     



   
   
 
  

      
    

       
      
  

  
 

 .%00 

  
 F%9G
  


   
 
  
 

   
  


 
 

*77 - (  B0 5

0.5 
        

    
  
  .%00  
    0.5


  
.%00

        
0 ' "    
 

  
  J


   
 
 
 
8  J

 
 

J


    
 

 

 
 
 




  
  

& ' "       
    '

   


J  
    
-      

  )
 *

    
    

        -

      
    
 2

-  '
   
   
 
     
   
  


  


 
    
 5

         
  
     

 
 
 
  
  "    

     
  *.)) %9;
4
 
  

          

      

 
        

 
     -    


+

          


!   


  
 
 -

         
    
 
    
   
      
 

-

      
   
  
-    

   
0 
 !      
 + 

  


 
      
!  

 

  !
,   '

 
 
    
  
 

 
"  
  


      )-


 >>*
0  
    
  0.5  

     

    
!         + 
  

    
    
    
     

 



 
 
     
 0.5   

   
 0.5  

 
   


O
      Æ     
  

    
     0.5 
   
 
   )
 0
 ) 

  F9%G* 1      




   
 
     

  ,- 

  
    
        
 H 

 
 !
       H 

 
 
  
"  

    

   
 D
8 

 

 
   
 D 
8  D  8 

 
   



 
    
 
 

    
    
 "       )   
 


  )   
 
  

  
 

  


 

       
  0.5 

 
  

 0.5   


 
 


  
  

   
  
    
  
 
    
   
    



    .(56  
 .%00  

  



      )5,*
  
  
     )6,* 6,   

  
 



    
   

     
" 
 
  
         
  )1 >:*
"      

    
 


  1    
  
   
   

 


 
  
      
 
 


  
 . 0.5
%9>   - 
"
     
  
 )
 
* 

 )  4 
5 *
 
 
    '

"      
    


       

 
  
 
  .P
 0.5
"  
    
    
   


<<interface>>
PropertyHome
Remote
Client create()
<<interface>> remove()
Property findById(String id)
putOnOffer()
Local setPrice(int p)
Client

<<interface>>
PropertyLocal
PropertyBean
putOnOffer()
setPrice(int p) create()
remove()
findById(String id)
putOnOffer()
setPrice(int p)
<<interface>>
PropertyLocalHome
create()
remove()
findById(String id)

 
 5   


 C
0.58  
   ) 
* 
 
 
   
 


  


 

   
 

 
 
    
  ) 
  


 


     
   * /
 
   
  
 O
  
 


*77 -.!(2 (
( !

  
 
     
 
 .%00  !  

 

        .   
 

  



  
      
 


 (5 )1
><*          
 
 

 




  
 
    !   
      
 
    

    
 
   !  
   !   -   .   
 
   
  *.)) %9A
registerUser editUser.
create edit delete .html html
Property. Property. Property.
html html html
remove command.
CLIENT User.html html
TIER

Delete Create EditUser


Property User Servlet
Create Servlet Servlet
Property
Servlet Edit
Property Delete Get
Servlet User Matches
PRESENTATION Servlet Servlet
TIER

Property User
createUser(...)
createProperty()
editUser(...)
editProperty(..)
deleteUser(...)
deleteProperty()
getMatches(...)
BUSINESS listProperty()
TIER

INTEGRATION
TIER DBI

   %
( ! 
 B--   

  
     
 
  1 ;%&

*77 0
(! (

 B-- (( 



   
   
    
   



    
 
 .%00  ! 
   
9    I   
    
  


 0.58  
 
 
 


  

  )      


*   !

 
    C
  0     
   

 
 
    

 

 
     D
8  
   
 
  

 

        
 
 
      
     !  
 


  
 
!      
   
    
   
  
  !
 

  
 
        
 +




 
  !  
 
 

 
  
  
 


 
   

  
  ! 
 0.5 
   
 


  
   

%%&   - 
   
  
      
  
 ) 
-@


 .(56    
 ,   
    .(56
 

* 
 
 


     



  
 '
 !   2 ,      

 
 

    

 P6




 
   
 
  


  


  )
 
   *   ).     *

 


  
   

   


 

      
 . +
  

 . 




 


*77 !!

.%00    

  
 

  





  
 
      2  
 

   
     
   

  
   
  
 

  
  

!   
  


  4 


  
   
!  .%00

  

  .%00 
 

- '

  !  
       
  
 
                

P   5  6^  "-,
      

  

3 ",             
   C
          





.%00   

 D  .   
8  


  
 
 
  
 
 )1
>=*
  
    
 
1 !     

 .  6EE 
     
 "(4

  
", 
    
    

  
 -4",
        2 ,

*77 !!



  
   
 
       +     

      
   .%00  3  

 
 
  
 3 4-      
 



 
      
 
    
  
  
         %%9
Applications

VB ASP C#
Application Application Application

.Net

Class Libraries Web Services ADO.NET


User Interface
ASP.NET

Base Framework Common


Language
Runtime

Operating System (eg, Windows XP)

   7"   

- 

     
          
    ! 

  
 
 
 
  
 


# <%18  
   


    
 


   
     
 
  
  
  
 & 5  

!
* $ 
!   . %    
  



 

    
 
    

   
  
 2 , 2     
  
  
 
 

            


 
 
 
 
   + 
 
  
 
 
0= "      ! 

     
 


 
 
  "       

 
=( ) (  ( 
F ( 8 R ( 8( ;D
>   ( 2 ( S( '32
=   ( 2 ( 9( ;DJ
F (  ( 2( ;%

  !   
 

     6-P 

 1 -0 9&&  

 
    

%5          
  
 

  
 


 


  
   
  
 
 
      
       
%%%   - 
  
 1 , +

 
  
 
  
 1 ,    6 )

HH 
* 4



 . !    

      .
",  
  1 , 

  
  1 ,
+

 
 0 
 '! 
  
    

     
   
 
  1 ,
0-(5 "   

   
   
    
 

 
 
 
  
-4", )-  4'
" ,
* 

HH:H /H-4",
     
        

  
     " -4",      

  
      
 
  

      
     
  +

   +

 

  
 
   

      
  -4",   
 


 

       
 
 "   
  
  
 
 
 
 ! 
 


 

 


 2 , ,4- 
    

  

-4",    .%00    
 -4",   

."/,6 ! 
>068  3 -  (
        
)

HH:H /H *


 

  
  
!
   
    
 
   

 
 
       
 

 
 

 
! 
    

    
 3-(
    

   
 
    
 
C     
   
   

  
  
     !  C

 )
2 ,   .-*    

 
    
 

  

 
    !
    


 
  
 
 
 (     

(   )



* 
   +    
 
 
   
   

  
   
 


 

"
 
     
   
 
    
             
  $(( )$ 
 ( 
 (    

 
* 

  
     
 3-( 
  !
    
  ) 
  %%:
-" $%
   
3   
  
      
   
 
 
 
 
 
 5  
        


 
   
 
 

'! 
  6
 9

*7$7 -5  


  

05        


    
 
   
6
     
  
   !   
    


   5  
 K0 L 
 
    
 
       
 
   
    



 


 
      5   5  

  
          
  

  
 
! 
    
 )   
   *  
 ! 

  '

 
   )    *
"
   


     
   

  
  
  
  
        
   
 
 
     - 
 


0
 

 
         

  5   
   

6 
 
 
 
 
 
    
    
       
 )  * 
    

 
    

1 >? 
       1 >;
     
 


Get bid data

<<depends on>>

Calculate bid price


Bidder Auction site

   1 
 !

    
1 >>     

 
 

 
 

      
 K
 
L  
 
  
  
  
   $/ 

  
 5   

HH !  + 


 

 5  
     
     2 

 

 

  


 & 4     !
%%<   - 

*
Item
String
{ordered}
searchTerms

Auction BidItem
article : String minprice : Integer minprice = auctionList.price.min
price : Integer maxprice : Integer maxprice = auctionList.price.max
bids : Integer avgprice : Integer auctionList.size > 0 =>
endDate : Date auctionList
regprice : Integer avgprice = auctionList.price.sum/
* {ordered} 1.0*auctionList.size

  1 


 !

  !

GUI
Monitor
GUI

Functional Core

Bid estimate
calculator

Data Management

HTML eBay
filter data
lookup

  1 


 !

 !  
  ) 
  %%=
4  
 


 

  & 4  

 

 
 
 



  




  
 
  

   
     

   


 
  '
     
  !

 
  
 

  

 

  


 

1 >A 
 
  
 


  1 


 !

 >'

*7$7 ,   !

 
  !   
  !     
   


 1 -0 9&& 
 
        
 
 
1 -0 9&& 
  !     


 
 
 

0
 
 
 
 


 
9 ( 
 6-P 

 1 -0 9&& 
  !  

%%?   - 

 
  
% / 
    
 


 . 


   

  
 
     
 6-P
   


. 

  

 
  . 

  

 '* 
.,     


  
 $/ )

  
  
 6-P   
 
 1 -0 9&&* 
  
 

  
 

 



 

   ! 
 $ 
< '
 $ 
 
< =-
 '
 $  &'

%(  9<


" %(     7 +  +
" 8 % 
 8 6
8:%
 T8 6
8XG*7=6 <SR C44 44+C
 85
8% 8'
#

%(     7 + % 3


57 + % G

" < 
<  %'
 " 
<  
 < % 3
' #
   
< =-
 

" 7
 %   
7 +'
7

- 4'
#


" (
(%  
 (
4000'
)% 7
   
< 
7
'
G
,% % 7
 % 

 G
,% % 7
% G
'
 %  0'

 %

"    
(%5054000'
   .4 (
' 
  %
%  
(%505'
% 6 '
7
 %   8 8'
7
 % %'
#
% 
'
 
'
#
 ),=-
 

"
  7 * 
'
7

- 4'
#
  ) 
  %%;
#
#
 

  
 
    6-P 
 1   
8XG*7=85EDIF F058IIA00E858B4B856J M05EDI0 I05EDB4 M05EDI0 I05JEB4M00E
8// 8540M0 0058IIA00E858IA0850 0053/53/53/50
8/HG 85F4A J058IFA00E8584FJA850 0053/53/53/50
8/O 85BAJ 0058EIA00E8584I4E850 0053/53/53/5ED4IMDIF
8/ 85B4D J058IIA00E858I4B850 0053/53/53/50
8/ 9 85EJF AJ58IFA00E8584FJI850 0053/53/53/50
8/3 85EBJ J058IIA00E858IA0850 0053/53/53/50
8/<3 85FJE J058IIA00E858IA4850 0053/53/53/50
8/L 85JJJ 0058IIA00E858IAD850 0053/53/53/50
8/LY 85DEM IJ58IIA00E858IAA850 0053/53/53/50
8/Y3 85AEDE 0058IIA00E858IA4850 0053/53/53/50
8H/ 85A4A J058IIA00E858IAA850 0053/53/53/50
8H// 85JJF 0058IIA00E858IAD850 0053/53/53/50
8H/? 85EJB IJ58IIA00E858IA4850 0053/53/53/50
8H/*7 85BEM 0058IIA00E858IAA850 0053/53/53/50
8H/Q 85AFD 0058IIA00E858IAA850 0053/53/53/50
8HH 85AFE IJ58IIA00E858IA0850 0053/53/53/50
8H> 85DE0 AJ58IIA00E858IAD850 0053/53/53/50
8H 39 85I00 0058IIA00E858IAD850 0053/53/53/50
8H * 85EIM 0058IIA00E858IAD850 0053/53/53/50
8H3Y 85EJ4 AJ58IIA00E858IAA850 0053/53/53/50
8H,? 85MAA J058IIA00E858IAA850 0053/53/53/50
8H,,* 85FFI 0058IIA00E858IA4850 0053/53/53/50
8H 85EBF 0058IIA00E858IAD850 0053/53/53/50
8H7Q 85F0B 0058IIA00E858IAA850 0053/53/53/50
8H* 854MD IJ58IIA00E858IA4850 0053/53/53/50
8?HQ 85EFA J058IIA00E858IAA850 0053/53/53/50
8?? 85AFBD 0058IIA00E858IA4850 0053/53/53/50
   ,
* 0   
   
 
 


  
   
  .  
 $  &'
 $ %  &'

%(  ?7L


"  
/     
 /   '

%( ?7LG

" H%



( '

" (  
 H%




 G


' #
  =-
 
 "
% ' #

7 + 
 88'


K %
" 
%%>   - 
" 
 (
 
'
 
 % " (
' # 
   
7 +*
2
 

 7 +*
2

585 8'
/     
 /   '

  
*

"   
- *
' #
  '
#   =-
 
 " 
 %' #
#
#

%( 

 
"   1 0   @  2
 " #


'
#

%(  +
/ 
" 
%     %
  % 

  
 /   '
    0'  1  2
' 66
"    /     +
'
  1  2

"
   +
' #
#

% 
'
#

%( %(
+
9%(
-  
" %(

  0'
    0'  1 2
' 66
" %(
  0'

"   9%(
 
9%(
7 + +
' #
  =-
 
 " #
  @

"
  ' #
#

% 
'
#

%(     7 +  +


" ?7L (  
 ?7L
 G
8% 8'
(

0'  



  ( +
/4'
7
 %    '
7
 %   ( +
9%(
- '
#
#
  ) 
  %%A

  
   
 

        

 1 -0 9&&      %?>:&&  66

*7$7 '  6


.

  
 
 
    



   

        
   
 !     

 
 $    
  
    
 !    

 ! 
   
 
)   
*  


 


   
  

 
 

   !
 

  !
     
 


     
 


     
 

 
   



  
  H  
"    
     C

    :
        ) <&5 
 !    <5 
 ! 
 :* 
    
  
    

    
 
   / 
)

HH * @!   3   0 



 

-    
    
0  


0 
  
  
   
   
 

 
    
     

 

 
   C


-
       
  
   
 

 

 -               
     
 
   

 
       
  


!
  
  
   
   
     
 
 

   
   
) /   @!  3   
*  
  
 
  

       
 
 
 


       1 ,
 
   

1
 .!
 / 
 
  
 
 !  
   
 

     ,("  ,("


 .!    
 
     1 >9&

     

  
 .! 
  / 

    2    
 9

 

 6 

   
 
 
 
   

  
  

"     
 
- 
6
    
 %
 

 .! 
  
 
         
   
   
  / ,  /   8     
%:&   - 
Streaming server Web server
(Helix, FTP) (Tomcat, RealPlayer)

Internet connection
Computer 1 Computer 2

Wireless
connection
Stereo

PDA
running web browser

 ) B6


. 
!(


 
    ,("  
    
  


 

 
 
 
 
  

   

+ 
9  +

  
 !   
   

 
 


   

    +



 
 !

 
 


   J
%  
 
  1 , 

    

   

     

 '! 
 
 

 
 


 !   

   
 

  

    !  !
   /4 0 ) ; .T . /  
 
 '!8     

    !
 

 
 
 


 K

'L  
   
 


 /  
    
 
 
  
 
!
   

  
 $/ 

 !
  +
 

 
  


   
   ) ; . 0  <; 
! 
      @&<; 3: :( *
! 
; .  .  :.)&# .#*7
-  4)    I -  4) &*7
 ; .&#   4R . # 6  .*7

"
"
  ) 
  %:9

 
 
   

 !   
 
)/ 
" 
*
!
  ! 
   ) 3 *

 /   
! 

  
 

  $/
 $ + &'

%(  )




" %(  7+7 + +% 
" 
" % 
+
% 

-

8?!! +  G
!!
!!
,

!!

-
8
6 +% '
#   =-
 
 " #
#
#

 
  
  

 !
  




   

  1 , 


   
  
 
 


 ! 
   

 ; .AB .; . ;&*
! ; .AB    7
F=)'     I F=)'  &*7
   7


!   &#  4#*7
   .3 ' &*7
 . &#G#(#/4 0#*7
; .  E  #'  #7
 &KF=)3 ) '   & **
!      .
  &*7
;0&*7
"
 
!   .D 4 .>  & E*7
   E&*7
"
"   &%0  * !  "
 7
"
  
    
 4 


    
F=)'     I F=)'  &*7
F - ;   I F - ;& *7
  &#  4#*7
%:%   - 
     .3 ' &*7
 . &#G#(#/4 0#*7
; .  E  #'  #7
 &KF=)3 ) '   & **
!      .
  &*7
;0&*7
"
 
!   .D 4 .>  & E*7
     . 
 F & I (*7
"


 *4  
   
  
  
  
 4 "


  

4 

-+ 9     



  


         
    
!  

  
 
 "
!     
     

     
 
 
  
   
 
)5%5* 
 


  
 
!         
 
 
+   
   

 
 
 
 
5    
     
    
 

   
     
 )

   
  !  

       
 

 

   ! 


 
 
 
* 
 
     


 +

 ! 
   1
    
   


 
              +
 

   

  
 
     
  
  
 

                  
    
  
 
 
  
 
   !    

            


   ! 

  
     
  

 
  

  

    

   
   
   
  

           


    
   
 #     *.)) %::
-, 

      5$$
.%00    ",  ."/,6      



      
  -4",  ", 
 

 -4",   
 

    

 . /
)/
 
  
* 
   
 
 $! / 
 
    
 
    . 
 

  
  2 , -4",  3-(   
  


   
 
    
  
 
    
1 >99 
 

   
   ."/,6 
1 >99 

 
!    ."/,6    
Client Program Service Program

Stubs
Ties

JAX−RPC JAX−RPC
SOAP Messages
Runtime Runtime

  B1:&4%   

Code SEI, Server−side classes


and configuration files

Generate WSDL and


deploy service

Code client and generate


client stubs

   B1:&4% (





 
9 -          )-0 *
  . 
  
%:<   - 
 
 


 



  


 
 
% (
  

 
 
 
 
    
  

   
  
: 6 
 -0   

  
!
  
 .  
< 3
 
  )  
*  
   

   
   
 -0   /
 *   



 3-(     
   
 

        
  

= 4
 
   *   
 
    

 

          
  
? 6   
 

3  


 
      
        
     
  
 
  

 
   

   

"    

 
   
 
9
 

 /3  
 
%
 
 

)
       
  

      

    
*
: 0    
   



 /3 %0  
< 
  
  

     
 ."/,6

  ) 
 
        
 
   -

   

 
 
  *
  
  

       
 $  

'
 $  

=-
 '

%( 

 
;7)


-
 


" %(  
 +
 
  
)   

=-
 '
#

 
   
           .%00



   

  
 
9 " 


   ."/,6
  
%
   



:
 
 
/3 
< 0  




     
 
=
  4



 
  

 
     
 
 $ : &'

%(   
;7 

   
;7)


 #     *.)) %:=


" %(  
 +
 
  
)
"
-      
)    (


%  
#
#
   

  
       .   "
     
       
  

 
 
1T- 
84 08
+8<*G.B8T@
1+%  
-8 $ % -$-.  +8@
1



 8 
7

8
 +
3

 8  

   %8

3

 8  

   %8@
1


 8 
;7)

8@
1

@
1+%  @

 *     .%00   



  3-(  
  
" ."/,6     
   
  
    
      
       
  






     
       !

    
 
  
    

 

 
 
  

 $/
 III   4R R /0  
 3-( 
       
 +

 III   4R R /0  TD;>5


" 

   


 '
  
 
 
 

  
   


 '

   (  
 
   
 $- -  7 %('

%(   
?

"  
   7 +
 '

%(     7 +  +


" 
"
   +0'
7 %(  %(  

 -'
 %( Z
 

$- -  7 %( =39,)3*Z/99=77Z,=*Q5

 '
 
;7)

  
%:?   - 
 
;7)

  %('
  
     +
 
8ADDEJ8'
#   =-
 
 "
  7 * 
' #
#

 
   7 %( 

 -
"
% 
7 %(

  
7

Z) +
 
;7)

 '
#
#

     
 


 
 
  
 3-( 

   
 
 3-( 
  
    

  
 
1+%  
-  8 $ % -$-.  +8@
1
  
8   

   %B0B0$-  
T;79 8@
1+%  @

 
 
        .  
   
      


  
   !   
 
 
    
 

 
 

    
     
 
  '
   
 '




 3-( 

   
  
 

 
      
 
" 
    
O
 
       
  )( 
*  
 

 
 
     
 
 ) 


     


* 
!
$ $   

'
 *   
   

.%00      
 
 

-4",    

 

           -"". )-4", 

"


",  . * ",  


  -4",    
(4 
   
 
    
$"  


    
      )  
6    -4",  
  +


  
  
 
 ?

 
+


+
G      
+
G   
) 
'
7,/
+

     


+
'

 / 
  

+

7,/H (  
 +
7,/H'
7,/G     7,/G   
) 
'
 *
+  

:%
 
3
(

   %    %:;
 

3
8+
 
85885
8   

   %8'
7,/H=

 (

  ( H=

 (
'
 *
+  %
  


3
    

3
8 
)8'
7,/=

   (

 ?=

  '
 *
- 3
8AADDMB8'

 ,
 7,/ 
   
 
+

7,/?
 G    
7,/?
 G   
) 
'
7,/?
     

?
 '
$ 
< 
 

 < 8   

   %+
 8'
7,/
+


  
5
'
 



   

 
  
 
17,/.=3L=


-7,/.=3L  8 
 -  +


8@
17,/.=3LH@
1+
 
 -  8   

   %8@
1 
)@AADDMB1 
)@
1+
 
@
17,/.=3LH@
17,/.=3L=

@

-- 2  0   


-  


  
 
       


         
 +

 
 
 

 
 
    
    

!
 

 
 
   


 
  
 

0      
         

 

         
  
     

      
 -
    
 
 

             
  
 

  ! D  
8 
.%00  
 .   ",
       
 
     
 
  "    
  
  
  
   
     
  



    
  
 
   
     

  
  )* 
     
   

 
 
     
  

   6    

K  
   !     
  
 


 
 L
%:>   - 
   

 
 
   


   
    
 
        
 



 
    

    

      #
    

 

 #

  
    
 

   

 
 
 
         
 
 $ 
  
 
    
    
  
   

 


 
H   .   ",  
 
 
        
 

 2  #

    

 
 

      2      
 .   ",  
 

  

 .%00  


 
     
   
 
  


  .   
!
 
     
 .%00    
 ! .     
0 /  
   
   
 
  


 
- , ) *  
 $-  &'

 

    7
 +
 

'
  % 8    858  

   %8'
7
 
  7
 +
9
% ) 
 5%'

'
  
 
 

    
 
+
     
     
         

  
   #         


  
  
 
     +  




1 " 
 
   
   
  &&

   
  

     





+

  
 

+

'

 
7%($
 83
  
 
  8'

 
*
- 
- '


  

 0   

   '
  
   

 $ 
(     
           
/
    
 )

/
8  

   %8'
/
   
 )

/

5
'

 
G  '

 

 
+


 *
*,5 '
   %    %:A
 ,          
 
     

  

    


   

 
   

 
 )         
    
 
  
   

"       
    
   

       

 
 #  .       
D 8  
       

  
(" /  
    


  

 
   
     " 
* 
 
 

 
* 
  
* 
 

    

   
   
 $-  &'
 $- + &'
 $ %  &'

%(   7/% 


  
-
 /% 
  
" %(  /% 
   +
 /% 
  
" 7 + %
 N, 
)% 9+8=
%

8'
7 +   N, 
)% 9+8=
 8'

%  
  /% 
  %
5'
#
#

   
  
    


  + 
 
   
  

 


 

 
%! /  

 
        - , 
 
 
  
 
  
=   &*7

  
  

  
       

    
 
      
  
    
 
  


*    
 +
*  8 8'
 
  5%

5'
 

+

5  '
 
'

  

 
 
     
   

 )1
 >9:*   
 
  
  
 
   !
 
       
 
         
 
  +


 ' )  
         *
  !
  
  )  !
  

 

 H
 
   ! 
 

   
  
 .   

    

  
 
    
  


%<&   - 

Observable Observer
notify(...) update(...)
*
observers

Property User
createUser(...)
createProperty()
editUser(...)
editProperty(..)
deleteUser(...)
deleteProperty()
getMatches(...)
listProperty()

DBI

 
 -.  (
( !  !

%(     %


7 +  *
5    
5
  H
 5 7 +  /
5
7 +  /(

" 7 +   8  

   %8'
 

    7
 +
 

'
  % 8    85 '
 7/% 
   %   
  7/% 
   '
7
 
 
7
 +
9
% ) 
 5% '
7 +
-  8*
+  
  $% 8 6
8(


+

   +
   
!8 6
8 
 
 8 6  *
6 8!8 6
8 
 8 6   
6 8!8 6
8H
  8 6  H
  6 8!8 6
8/
 8 6  /
 6 8!8 6
8/(
 8 6  /(
6 8!8'


+

  
 

+

'

" 
 
7%($
 83
  
 
  8'

 
*
- 
- '
 ,  
 
?
 
- 58
- 8'
/
   

 )

/
8  

   %8'
    - %<9

 
G  '

% 7

  ( +
 
 *
5
  
5 /
5
 H
 5
 /( '


 
- 
" 7 + 

 +
7 +8%
3
8'
7 +
 
 +
7 +8%
=8'
/
   
 )

/

5
'

 

 
+


 *
*,5 '

 
?+
'
#
*  

'

 
'
#
 =-
 

" 
=-
 
' #
#

-. 3 
  9
 D- 
 38 
   
 
   

  
 
    


     C
   C


   C

!   
4 
       
     

   

       



  
        


   
  
         

  
 
  
    

   

  ( ( 

  
 

  
 
    


 ( (   
  

!    

         


    + 3:6    
 /  ( 
 1 !
)/(1*  
  
     

  

 
  
/(1     
  
      
 
 )
*       
   
 
 
     /(1 
         


   

       

"       
      
 
)
D 
8  D8* 4
     43 F:;G     
 
  

    


 
  
  
 

    
 
 
 
     
   

   43   /(1     
%<%   - 
1   
 

  1  
 7
  "
  
 /(1  


 
F 0   Q
F 0    0

  
  /(1 

   K1L 
       ( 
      )$/ * 
    
 III 4  4 ; F 0  L 
 
 
$/  
   
 
  
"    
 
 
1T- 
84 08T@
1 9G - 8  D  +4MMM0AAA. . -.P8
-
8     %
8@
1 9
  
(% 
8     %7 G
-  P
8@
1

 ,

% 

8     %7 G
-  PS 8@
1

 ,

% 

8     %7 G
-  P/
-8@

1 9
  @
1 9G@

   ' 
 

  
 
    

  



   
 
      


   '  




- / 2  
  
#


  
  

 
  

    
    

 

    


 
 ):I*    

 
    
  
  
 
   

   
 


      
 

 

 !     
  ! 
          #       

 
       
 

   



 
      Z
5   
  
  

       )

* 

  
  
 H 
 
 
      
    

 

         %<:
*7 7 
   0 8  9

4   


      
  
 

 
     )--*  

   
 9?&
  

  

  
     1    
  
   
 


   
   

 
!     
   !


   
 !   .%0   --  
 


 . 3   ", )3"*

*7 7 / 



 !
 (


"
   
         
 

  

    


   
9A>&8   
  
  =&& 75  /" " 
  



  M       9%>  +    


 

   
+     
   
 +
 
  

   


  

    +   

  


 P 

 4        
 
 '
 
  
   4'



  
     
. 
 
            

 .%0 ). %  0


*  
  
 &
 .

  .%0 


  .%0   

 .
  

.%-0  
 
   O
 

  )   -
 *
  
    
 
   
   -
!              I$    I$ 
   
!  
 
  
 C 
 
   
       
 

  

 

 



*7 7 /1%  /

4   


 
 3 " 
 ,
 )3",*
 3  !    )3* 3",      
    
 

 

  3", 
    3 


   2   
      
    
)% 
*     
      
   
 

   

     
 D  8 
3           
    "
    3   
1@
1    8

3
8  
 8=
% 
8@
1 
 8
 8 (
  8,8@
%<<   - 
1+ 
  8   P+
3
8@
1@
1@=
% 
1( @
1% 
 8
8 %
 88@
1@
1 @

1    8

=8  
 8=
%
8@
1 
 8
 8 (
  8 +8@
1+ 
  8   P+8@
1@
1 
 8 8 (
  8
+
8@
1+ 
  8   P
+
8@
1@
1@[

+
1( @
1% 
 8
8 %
 88@
1@
1 @
1@

 
  
   

  
 
8   


 )
 
 
*   K4!L 0
 


 
  
 



  
 
 

   

"
 
  
 
   

 
  


  
 
    
   
   
 

   



 
8    
   



   "

 

 
   
 
    

 

 
   *  
 
   
 3  

-
 %  +
3

"  -  ; H 
+
L 8
8'
; H 

L 8

+
85
8=
%
5 8 6 -'
; H 
+8P

=8'
#

-
 % 
+

"  
    
+   + #

-
 %  +
"  
 +    

#

" 

      
      
 

   C
)  

  

 1  
     
)

HH  *


 $ %<=
*7 7 5

5

 
  
  ):& 
H9& 
 *  

 
         
!
   

,("     
  
  


   



  



  
!      

 

      

4 
  

    
      

    
    C
     




   

  
.  
 

  
   
 ' 

 
'  !  
 .  0


- 


3      

  
    

  

    !  .%00  

   

 
 

$% 
+ /  

 
  
 )  < 
  
*

 .%00 


, (         

 
  
 
 
 
 

 
) *  
  
 
   )1 >9<*  
   )  *

  


   
           
 


             
   C  

 
    
    
 3   
     
 2    
,6  


       


 ( 
 3
 2  
  
 
 
 
   


   
  

  
-  

     
 
  
 )  < 

  
*   .  
 

       
   
 

 
 
    
  
 
  
   
    


 D8    
 

 8 !  
 

" 4  
 

 
 
  

     
1 >9= 
 
 

   
%<?   - 

Sensor
Cat

Web cam

Sensor
Home PC

Remote
PC

Mobile phone

    !

 !

Variation
Table OrderItem *
* description:
name: String 1
number: String
isVegetarian:
Integer price: Integer
Boolean *
price:Integer

1
Order 1 *
status: OrderStat Ingredient
date: Date name: String
Dish
* time: Time Drink stockLevel: Integer
name: String reorderLevel: Integer
alcoholic: dishType: reorderAmount: Integer
add(x: OrderItem) Boolean Course status: IngredientStat
unit: String
completeOrder() pricePerUnit: Integer
generateBill(): Bill reorder()
confirmDelivery( * add(amount: Integer) Shift
x: OrderItem) remove(amount: Integer)
start: Integer
1 end: Integer
Staff *
date: Integer
name: String 1
salary: Integer
0..1 login: String
password: String
Bill Payment
total: Integer method:
verified: Boolean 1 * String
date: Date amount:
time: Time Integer 1
add(p: Payment) Waiter
KitchenStaff BarStaff AdminStaff
setDiscount(x:
Integer) completeOrder()
printBill() 1 confirmDelivery(
BillItem o: Order,
completeBill()
x: OrderItem)
* name: String
cost: Integer createOrder(t: Table)
createOrder(t: Table,
n: String)

    !


  !
 $ %<;
. ?!A @ (     
     
  
  
  -4", 

 
  
 H
   
  +
 
 
   
 $7
!  
 
 '    
 
 
 

!     &


'   

 
    

 

 
 (" 

  
  
   
 3  
  
  
     
  '
 3  
    

("
 

. 24 
 

 
    
 ! 

 ("
       ?@ " 6  
 
 
 
 

 
    
   
  

 

  
 
 # 
  

 
    
     
 
 
  +
   
  


 
 
 
 
     

 

$ 

      

 
    
 
 6   4  
  
 
   
  
 
 
  "   ("
    

  

 



 H    
 F:?G "  
  
  

  

 
  
   
  
 
 $

     
 
  +
)


    

 


 *   (" 

  

 !       $ 

       
  
    
     6       

 
 

  
  
  
  
  (" 
 , 

,-
  
 1 A9 
 

 

   



  
 (   ) * 
 $ 

  
%<>
 !   $ %<A
(a)
(b)
instance
Platform−Independent
of PIM
Model
Metamodel
Platform−Independent Model

Define marking of elements

Mapping

Platform−Independent
Model with Markup
instance
of PSM
Metamodel
Platform−Specific Model

Platform−Specific Model

  %'


%  
! 
  

  
  !   

        

 

  
  
  

  ,  

 -    !   
  
   

   
 ! 
  

   
 


 -
 A:     $    

  
 ! 

  
 
(   )*   

     

  
 
    
    
     

 -
 A% 
!    -     
   
   

  
  
  
   

     

  
 



!  " 

  
 
    
 

   


 "     .%00
!      ?!@ " ,  
 
  
  

 
  
  
  
 
   


   
  
 

    




   
 J
 
  
 

  
 
 
 J
  '
   

 
J
 

  
     
 
     

 J
      
       

 

 
  
 
-

   
     
  ! 
 

    
 
     
 

 ! 




%=&   #     !  

    

 
      
 
 
- 
      

  
   

 

 

 
 
  
   '

 
 
       
     
   
 
 

  
      6
 ;        , 

 
    

!     "    , 

 
   


  
 0  ,           
+ 

 ,-      
     
 

        
 
  ,-  
    
 
  
    

 H 
 
 
  

,  

 
 

 
 
 )    
  

     

  
  
 

 *
" ,- 
 
 
 
  

  


  
     
 
  

       
 , 

 ,-    




   
 ,-    
   ,-

    
,  
 
   


    "  
        
  



 
  
8       F<AG
       
 
    
 
  

  

       
  


            

      /    
    
 , 
 ,-
  
    
 
 

  

 

B  
 " 
   
 H      

 
  
 
    
     
  (
,  
  
     


 ! +
  


 ,      
 
          
 

 




"  
 
 
   
      
       
 
   
  
 
   

  

   

   
 , 

,-   
 
      

  
   
    

 
  
       
   
    
   %=9
. 2  
 
  
     


 ("   

 
    
  ! 
   O   
,    

   ,  
 ,-  1   
 
  ,-
 , 
  
 #  
    

 
      
 #     



 
       
  
  

    !      
    

  

 

)77 


5      
  $  
 "    
   
 
 $ 
   !
 '
 
 

  



   1     
 

   



 
 
 )1 A%*
     
      
 )
*'
    1
A:
A * cr1 C
*
att : T cr2
*

B
*
att : T

   
  
1 A<  
 
 $ %& 
 
    
 
 




   $      !  
 

!
+
   
 "  
 
  
   



       
      
   
    2   
    
   


   

 
 1   
   
  
 
  
    
  
  
 )'
* 




 
 0
 
 
   


 .
 
  
 
 ,   
 
 
  
 
3  

 

  
   
    

 
 '
      )

 
* 1  

%=%   #     !  

att :Attribute owner A : Class


A

m1: Subsystem
B : Class

owner

A_C:
Association

C : Class

att :Attribute
B

 
 
   ! &


0..1 /owner

Element * Relationship
/ownedElement

/source 1..*

/target 1..* Directed


NamedElement MultiplicityElement Relationship
TypedElement name: String isOrdered: Boolean = false
visibility: [0,1] isUnique: Boolean = true
VisibilityKind lower: Integer = 1
upper: Integer = 1
*
/inheritedMember
type
0..1
Feature Namespace Type
/feature
*
Datatype
1..* specific {subset
Structural Behavioural Classifier source}
Feature Feature 0..1 isAbstract: Boolean Generalisation
general {subset source}
isReadOnly:
classifier
Boolean = false

Primitive Enumeration
/attribute Type
*
ownedAttribute Class
Property
* {ordered} Stereotype Association
isDerived: Boolean
= false Operation isDerived: Boolean
* {ordered} = false
* ownedEnd isQuery: Boolean Constraint
{ordered} ownedOperation 0..1
= false owningAssociation
*
* precondition
*
*
postcondition

    7 6 ! !



    
   %=:
         $  
 
  $  
 )
9
 
 
 

   '

  
 
'



 *  


 



       
   '

  

 
  
  
 
   
     
 


   
'
 1   
 K
 
 L
  
   
      )1
A=*          
  
 
AorB C
* cr
att : T *

A B

   
 

   
 
   
 
    


 
   
   
  
      
 


       
  
 

  
 
  )

 *     
 

   
   
 





 
    ! 
  
  




 
$     
 $   
 $
$     
 $   
 $
-  
  
$      $     $
$      $    $
%=<   #     !  
            
 
 K

   L
  
         



   1 A%

  
      

  
 
 
 

)77 
! 


 
   
 
  

      ("
  

9 @ 
   
   

   J
 ! 
   



% /
 

  

 J

   , 
  
 ,-
  ) 

 
 
*J
  
  
J
     
 J

     ! J
H



 

 
J
  
   
: "
 
  
/   ,-
   , 
  
3   
 

   
 
  
  


 
        
         
         
 
 
  
   


  
  
   
   
   

   

  
  
  
       



 H
 
  

 

     
  

6  1 A?    
 



    
      
 
 3
 
  


   
  
 

     
 

 
   
   
  


     



 
  -  
 
  


 
   
       
    
   

    
 
  
   
  


 
     

 
 )1 A;*
    
   %==

Ambulance * 0..1 Incident


casualties: 0..1
Integer
critical: Boolean
*
0..1 *

0..1
Ambulance
Station

0..1
Hospital
0..1
*
Patient
*

   1!  (   ! 0 


 

Ambulance * 0..1 Location 0..1

0..1

Ambulance
Station

Incident
casualties:
Integer
critical: Boolean
Hospital
*
Patient

  1!  (   ! 0 



%=?   #     !  
  

  
    
    
    
     

     

 
 

     


  
 
 

          

 
  
  
 
 
 
   

       

   
 
 
   
 )1 A>*

  
     )   '
 
 



   #
 
   
   
 C
 * 

 
  
  

 
 


   
    
 
   $    $           A9

     
  
 
      
c1 C
A att1 : T1
B
att2 : T2
c2
att1 : T1 op1(x: T3) : T4
op1(x: T3) : T4

c BorC
att1 : T1
op1(x: T3) : T4

A C B
att2 : T2 op1(x: T3) : T4
op1(x: T3) : T4

  1
 
&  (  
 


+ , + , + D ,
   )* )* )E*)E*
N   )*N )E*N
   N
   

%'  4


 
!  
 ! ( 

       
$     
  $     $   $

$  !     1 AA      



  

 
 
  
 

     
    
   %=;
br B

0..1
A

C
cr
0..1

BorC
r
1
A

C B

  6 (  






    
 
    
 
    
      
$       $    $   $

1       


         

            
       
  
 )1 A9&* 
     
 
   
    

  
                

            


  
  


       
  
        

   
     
 
   
 
   

 
$      $      $   
      
  
       
  
 )1 A99*   

   

  
  
  ,   
     
%=>   #     !  

A B
* *
br

A C B
1 * 1
*
ar br

 ) 4!


0  ! &! 
 


A
aatt : T

B 0..1 1 A
ar aatt : T

  4(      


 


    %=A
  
        

$    
 

 $  
 

 $

 

)
 

        

 


 
  *  
  
 



      

   
  

 
 


 
      C  3  
  
 )1 A9%* 
 
   
  
 
  

  



  !   

   ! 
 

    )
 , *    )
 ,-*
   
  

A A
akey : T akey : T
{identity} {identity}

br *
B B
bkey : S bkey : S
{identity} {identity}
akey : T

   4( 


 
 
 6

    
    
1
    
  
  
   


 
  
 
  

  
 



 !    + 

   !  


. 2& )


$    
 
 D  8  
 
  

 

 D0

. 5 8 D  !8  D8 "
%?&   #     !  
  
 


      
  

  
 ) 
* $ 
 


 
 1 A9: 

          


  "    

<<stereotype>>
Form

Class
<<stereotype>> <<stereotype>>
Explicit Persistent

Association
<<stereotype>> <<stereotype>>
Implicit Identity

Attribute <<stereotype>>
<<stereotype>>
ForeignKey
Add

<<stereotype>> Operation <<stereotype>>


Remove List

<<stereotype>>
<<stereotype>>
Create Edit

<<stereotype>>
<<stereotype>>
Get
Delete

 
 %

  (( 



 

 
 



  
 
 

  

  ) !* 


  -     
  
 
     ! D  

8
,     
  , 
 ,-   

 


 


  

 
  


  

. 3 


      

   
     6
 ;    


  
 
          
  
 
,  
 ,-
 , 
 ,-
  
 

 D !8

   
  

 ,      !
 
 


   
  

   !   


  
    
  
  
   $  %?9
      

      
 $      
 
  
  
     
  

 , 

 
  
   

  
  
 
/  
 
  
         
 
   

/      

 

   !   

  
  
   
 






  !
  
   

 
" ,    

        
 


     
           
      
   !      
 
  
  
 ,-

         

     


   
 
   0  
 
     
  
    
      
  

 
 
 
  #     !   
 



 
 
1  

 
     
  



 
   # 


  
  )
     * #
   !  
  # 


 
 )
   * #
   !  
   ! 

 ' 

 
 )   * #
   !  
   !

  ' 

 

 $ #
   !   
  



  
 
 ! ) *
 
       
     
    ), *
   
 
 
   ),-*     
 

  
 
 
  
 
 
     )


      
  
   
 
 
 
 
  
 
        
    
  
  
#
 
 8 
  


 

 
   


 
    

¼

  C 


   
    
  
 

  
 


  
 ¼ 
 
 
 
 
 
    
   





  


  
 
  -  
 

    
%?%   #     !  
." 

 
  
 
5   
  
  
  


 ("  

+     
 
  
 
  
 3  
 

       
  

)- *
 
 
)/0 *  /
  /   $ 
  

  
 .  
  

  


)7$7 -.      


! 
 8: 9

-    

      

     

)
   
* 
 

   
)1 A9<*


    
 D !  8   

  2  

    
        

  
 
 


  
)* $     ,  
  
  ,-    
Transformation
defined by XSL
file

Input XML Structure Output XML Structure

   :  (


    

  $   
  ) 



 * 
    
 $    
 



 

 $ 
 )1 A<* 1     
  

 
  

   
G15>= 0  #@ #   #- .#
   #  # ;    # #
3   # # 5  # #
   # # 

0  !  $  


)  
 
  

   
 
*    
   




 


 

 



 
  

" -  
  
   


 
 

 


   
  

 
 


   
  
 
  
 




 
 
1    
  
        
 

  
 D
8         

 .
  
 
  #    
   %?:
1-

   8< 9 *
8@
1-
  8 
 U)
+
U8@
1< 9 *
-   8" - #8 
 8 8
(   8" ( #8
7
   8" 7
 #8
  8"  #8 
  8" 
#8
/(   8" /(  #8@
1-@
1-
  8 
 U
U8@
1< 9 *
-   8" - #8 
 8%(
8
(   8" ( #8
7
   8" 7
 #8
  8"  #8 
  8" 
#8
/(   8" /(  #8@
1-@
1-
  8 
 UH
U8@
1< 9 *
-   8" - #8 
 8(
8
(   8" ( #8
7
   8" 7
 #8
  8"  #8 
  8" 
#8
/(   8" /(  #8@
1-@
1-

@
 

  



  
  
 $ 

   
      D 
8
  
 
$  

  
 

.&  '


 
 
  



 


  
  
    

 




     

 D
8 -  
 
 
 
 -   
   
 

  

 + 



 

 -
     0  M
 

  

      

  


   -      

2  
        
 

    +  
 
 

)

 

    
  
*
     


         



 Æ

  

  


   


 
 

 

   ! 
  

   
  

 

  

 
 
 


 
 
   
(  -   Æ



   
 F=<G

  
  
  -  


   



 
   
  



     
   
%?<   #     !  
" 
     
  Æ 

)7$7 4
 -.   '   84-'9

   

 
  

+  
 /
  /  6"-0

 /     
 
 
  /0 
     
 

 
   
  
 
 / 
  
    
F<&G  /0     
 
 /
  /     
  

 $ 
         /  

   
 
    
      
   

 
 
  /  
    5 -
    


 P   5      

  3 
   
/    

  
   5 -
  
" ! /0 
 

 
    
   

1
 


 
 5 -

 )
  

 
    '     ' )
  

 
 
 

     
  

 
 
  

 -
    
7%( ?+
9 *
? / ?
+ 
9 ? / ?
9 / (%
/ / (%

G W  4 * ? ?
 ?%
7
?  ? ?
 >
/ W
G W  4 * ? / (%
 ?%
7
/ (%
 ? / (%
 >
/ W
7

 ?
/ (%
*

?
8)
+
8
/ (%
*
 8 8
?
8
8
/ (%
*
 8%(
8
?
8H
8
/ (%
*
 8(
8
= 7


3
- W
3
- W
= 7%(

 
 
 
  
 
   
  


 
   


   
  

  



  , 
 ,- ). *
  
   

 -  
 /0 
   


  
 
    
 
I
  
        /0   
  !
  P   5    
  !  %?=

+       /
  / 
5
/0 
  
 
/0 
  
     
  
   

 

 
     

  

      
 
   

 )   *
! 

  

  

)7$7 B0    '   8B'9

"

  
   
  
 . 


  ). *
   . 
 
     
 
  

 $ %& 
 $ 
   $ 
 
  

   
  
  
 
   
  $
. 
 
  
 +   

   
  

 

  
 !
 /0  
 !

  
   
  


     - 
2  
 + .  
 
.   

!
$    !   . 9= (

 

 

HH'  H 


H'H

.+ 24 
  

  
   
(" 

 

  

 ("   -  
    

 
% =   
 6   F:=G 
  
  $

 

   

 

  ,   .%00
,-  
 
  
 .  
  ,-  4
 .

    

  
 1  







    ! 
         

  
   
  !  
  $  4
 .
  (

  
  .%00

   

  

 .%00 
  4
 .  
     
 
 
 - 

  4
 .  
 
   .%00

  .%00 ,-   
  

  ,  O

 
  

 )       
    ! 
 . H-@ !  K4L 
 *
   
  
 )

HH H 


H 

H*
 
$  

 
 +  
         
  
  $ 
 .  6 6EE  P   5 
%??   #     !  
.%00  

   
 ! 4
 . 
 

 
  
  
 
       
    


 
           

)

HH  *   $! 




      
    P   5   .    
 

 

  


       D
  8  


 
 
      ,

  I$ 8   

  
 
    

   




    
     
   
  

  

     
  !  I F9>G  
   


  
 ) 

 * 
    
 

 
  0
  

 
  
   


  
     
 9A>&8  9AA&8 F<;G  


  7 (-   
 
    
!

 ("     

HH+
H   
    

  
  +   
  
  4I 41 %& @P

 

$% 
+ 1   

  
  1 A9= 
  

    
 
   
  $  
 
"  
    

    '


  
 +  '



 
br.size > 0 =>
i : br
A
A index: Integer

0..1 1 index >= 0 &


1 index <= br.size

1 i * br {ordered} * br {ordered}
B B

   


! . 
 
 
   
  !  %?;
, 0   
   
 
   !
  

 
 
    
 
(    !
  




  
- ?!A @
$ ,  
 6EE ,-  6EE 
"    
        
 


 
  
B
 
 


  ( !   



 
   
 
   

   
  

  
 $%3 
 


/ 0   
) 
     
 
    1 9&9 
 
 

      1 9&%  
 

 
  46" 
Customer
Property Search System

create User

get User matches

create Property

Administrator

list Users

list Properties

 ) %'     !


(
(  !

9  K"     




&  
   + 

%?>
 %  $ $     %?A

User Property
<<implicit>>
userName: String * propertyPrice: Integer
*
userEmail: String matches propertyType: String
userMinprice: Integer propertyArea: String
userMaxprice: Integer propertyAvailable:
userArea: String C2 Boolean
userType: String propertyBedrooms:
Integer
userBedrooms: Integer

C1

 )  %'  !


(
(  !


    L
  &  
 &   &
$ 

   
 . 
% K"  
 
   +
 
  
  

   

  
 +   

 
   
   +L
 &      
 &
$       
  
    

      
       
  !

   

 
  

 .    
 


      
 
    
 

 


  
  
   
   
   
  
      1 9&9   
 

 
. #
       


 

 
   #
    
   


 

. #
 
   
 

   #
 
  
 
 

. 
 #
 
  



     +


5  
    

 
 
  
,  ! 
  
   


   


  
 
 
  
 
 

%;&    $+ %  $  $ 
0 
   
 
        

 
1 ! 
  
      
  

 

  
 .    
   
   
 



      ! 
 

   1 9&: 

  
Property
User
userId: Integer propertyId: Integer
{identity} {identity}
<<implicit>> * propertyPrice: Integer
userName: String *
userEmail: String matches propertyType: String
userMinprice: Integer propertyArea: String
userMaxprice: Integer propertyAvailable:
userArea: String C2 Boolean
userType: String propertyBedrooms:
Integer
userBedrooms: Integer

C1

 )
 4  !
(
(  !

/ 9  
 
 !   
 
 
 $%3
 
 

    
9 .    
   2 

 
 
 

 

% .  
    +

     

 
 
         

 

    
 
 
 
 
 +

 

: " 
  
      
  

  
  +

 

 
 

1 9&< 
 
 
 + 
 
 1 9&=

      
   
  
  


1 9&? 
  
   

  


  

  - $     %;9

createProperty.
html

createProperty create/add new


property record to
Property table

createUser
createUser.html command.html
create/add new
user record to getUsermatches
User table

listUser
listProperty

getUsermatches.
listUser.html listProperty.html
html

list list
get

userResult. propertyResult.
html html

 )  '  


 <
(
(  !

HtmlPage

BasePage

Property createUser create Command


User
Result Page Property Page
ResultPage
Page Page

listUser listProperty getUser


Page Page matches
Page

 )   


 &(  

%;%    $+ %  $  $ 
createProperty. create commands listUser. listProp getUser
html User .html html erty.html matches.html
.html

GUI
listProperty listUser createProp getUser
Page Page ertyPage matchesServlet

createProperty create Command listUser listProp


Servlet UserServlet Servlet Servlet ertyServlet
Property
Command UserResult ResultPage
createUser getUser
Page
Page Page matchesPage Functional
Core

Data
Dbi Repository

 )  
!(    
(
(  !

/   

    
 
   
  
%(  H
+

"  

 O +
+
 
 O +
'
 

 O O
 
 

 O O
8;
( 7
8'
 

 O H (  
 O H'

%( H
+

" +

O

'
+

H('
#

%( 7 + 7 +


"
%  +
+
O ' #
#
     +
 

)   *   !
      
   
 

%(  H
+

"  

 O +
+
 
 O +
'
 

 O O
 
 

 O O
8;
( 7
8'
 

 O H (  
 O H'

%( H
+

" ( 
G
8 
 7
  <S 1/ O=G 
!8  B0B0  !8@O
1/@8'

 # 
     %;:
( 
/ (%
8(+ 858
8'
+

O

'
+

H('
#

%( 7 + 7 +


"
%  +
+
O ' #
#

  
 
 !  !

     

  !
   
 
 
      
    
  
 
  
 



   
  



 
.   
   
. 

 
     
   
  

.   
  . 
  
 
    . , 

     
    
  
 
  
   , 

. 
   
  . 

  
 
 
     , 
 
     
 
   
%(  ?+

-
 H
+

"  
O G     
 O G '
 
O )% 

<
(%   
 O )% '
 
O )% 

 
(%   
 O )% '
 
O )%  <
(%   
 O )% '
 
O )%   
(%   
 O )% '
 
O )% +
<
 
(%   
 O )% '

%( ?+

" %
'
  
/ (%
8
858,7*8'
  
/ (%
8 85
8  B0B0

?7

8'


<
(%  
/ (%
8%
858

<
8'


<
(%  
/ (%
8
858

<
8'


<
(%  
/ (%
8 
858%( 8'
  

<
(% '


 
(%  
/ (%
8%
858

 
8'


 
(%  
/ (%
8
858

 
8'


 
(%  
/ (%
8 
858%( 8'
  

 
(% '
 <
(%  
/ (%
8%
858 <
8'
 <
(%  
/ (%
8
858 <
8'
 <
(%  
/ (%
8 
858%( 8'
   <
(% '
%;<    $+ %  $  $ 
  
(%  
/ (%
8%
858  
8'
  
(%  
/ (%
8
858  
8'
  
(%  
/ (%
8 
858%( 8'
    
(% '
+
<
 
(%  
/ (%
8%
858+
<
 
8'
+
<
 
(%  
/ (%
8
858+
<
 
8'
+
<
 
(%  
/ (%
8 
858%( 8'
  +
<
 
(% '
(  '
#
#

 
    1 9&;

 ) 
!! 7 !
   
     
 
   
%(  

<
+

-
 H
+

"  

 O G     
 O G '

 # 
     %;=
 

 O )% (%   
 O )% '

%( 

<
+

" %
'
O *
- 
+  
 O *
- 8

<
 85848'
( 05
+'
  
/ (%
8 85
8  B0B0



<
7

8'
O )
    
 O )
88'
  
/ (%
8
858,7*8'
(%  
/ (%
8 
858%( 8'
(%  
/ (%
8%
858

8'
(  '
O *
- %
) (
  
 O *
- 8%
)858 +8'
  %
) (
'
O )% %
)G
  
 O )% '
%
)G
 
/ (%
8 
858
- 8'
%
)G
 
/ (%
8
858%
)8'
  %
)G
'
   '
O *
- %
3
(
  
 O *
- 8%
3
858 +8'
  %
3
(
'
O )% %
3
G
  
 O )% '
%
3
G
 
/ (%
8 
858
- 8'
%
3
G
 
/ (%
8
858%
3
8'
  %
3
G
'
   '
O *
- %
= (
  
 O *
- 8%
=858 +8'
  %
= (
'
O )% %
=G
  
 O )% '
%
=G
 
/ (%
8 
858
- 8'
%
=G
 
/ (%
8
858%
=8'
  %
=G
'
   '
O *
- %
 
(
  
 O *
- 8%
 
858 +8'
  %
 
(
'
O )% %
 
G
  
 O )% '
%
 
G
 
/ (%
8 
858
- 8'
%
 
G
 
/ (%
8
858%
 
8'
  %
 
G
'
   '
O *
- %
- 
(
  
 O *
- 8%
- 
858 +8'
  %
- 
(
'
O )% %
- 
G
  
 O )% '
%
- 
G
 
/ (%
8 
858
- 8'
%
- 
G
 
/ (%
8
858%
- 
8'
  %
- 
G
'
   '
O *
- %
/
 (
  
 O *
- 8%
/
858 +8'
  %
/
 (
'
%;?    $+ %  $  $ 
O )% %
/
G
  
 O )% '
%
/
G
 
/ (%
8 
858
- 8'
%
/
G
 
/ (%
8
858%
/
8'
  %
/
G
'
   '
O *
- %
*
(
  
 O *
- 8%
*
858 +8'
  %
*
(
'
O )% %
*
G
  
 O )% '
%
*
G
 
/ (%
8 
858
- 8'
%
*
G
 
/ (%
8
858%
*
8'
  %
*
G
'
   '
O *
- %
H
  (
  
 O *
- 8%
H
 858 +8'
  %
H
  (
'
O )% %
H
 G
  
 O )% '
%
H
 G
 
/ (%
8 
858
- 8'
%
H
 G
 
/ (%
8
858%
H
 8'
  %
H
 G
'
   '
  (% '
#
#

 
    1 9&>
   

  
        



   
%(  

 
+

-
 H
+

"  

 O G     
 O G '
 

 O )% (%   
 O )% '

%( 

 
+

" %
'
O *
- 
+  
 O *
- 8

 
  85848'
( 05
+'
  
/ (%
8 85
8  B0B0



 
7

8'
O )
    
 O )
88'
  
/ (%
8
858,7*8'
(%  
/ (%
8 
858%( 8'
(%  
/ (%
8%
858

8'
(  '
O *
-  
) (
  
 O *
- 8 
)858 +8'
   
) (
'
O )%  
)G
  
 O )% '
 
)G
 
/ (%
8 
858
- 8'
 
)G
 
/ (%
8
858 
)8'
   
)G
'
   '
O *
-  
 
(
  
 O *
- 8 
 
858 +8'
   
 
(
'

 # 
     %;;

 )   7 !


%;>    $+ %  $  $ 
O )%  
 
G
  
 O )% '
 
 
G
 
/ (%
8 
858
- 8'
 
 
G
 
/ (%
8
858 
 
8'
   
 
G
'
   '
O *
-  
*
(
  
 O *
- 8 
*
858 +8'
   
*
(
'
O )%  
*
G
  
 O )% '
 
*
G
 
/ (%
8 
858
- 8'
 
*
G
 
/ (%
8
858 
*
8'
   
*
G
'
   '
O *
-  
/
 (
  
 O *
- 8 
/
858 +8'
   
/
 (
'
O )%  
/
G
  
 O )% '
 
/
G
 
/ (%
8 
858
- 8'
 
/
G
 
/ (%
8
858 
/
8'
   
/
G
'
   '
O *
-  
/(
(
 

 O *
- 8 
/(
858 +8'
   
/(
(
'
O )%  
/(
G
  
 O )% '
 
/(
G
 
/ (%
8 
858
- 8'
 
/(
G
 
/ (%
8
858 
/(
8'
   
/(
G
'
   '
O *
-  
H
  (
 

 O *
- 8 
H
 858 +8'
   
H
  (
'
O )%  
H
 G
  
 O )% '
 
H
 G
 
/ (%
8 
858
- 8'
 
H
 G
 
/ (%
8
858 
H
 8'
   
H
 G
'
   '
  (% '
#
#

    
    
 
    

  


%(   <
+

-
 H
+

"  

 O G     
 O G '
 

 O )% (%   
 O )% '

%(  <


+

" %
'
O *
- 
+  
 O *
- 8 <
 85848'
( 05
+'
  
/ (%
8 85

 # 
     %;A
8  B0B0

 <
7

8'
O )
    
 O )
88'
  
/ (%
8
858,7*8'
(%  
/ (%
8 
858%( 8'
(%  
/ (%
8%
858 8'
(  '
  (% '
#
#

  

        
 . , 
  
 
  2 
 
      


 $ : &'

%(  <



% +

-
 H
+

"  
O *(
(
 
 O *(
'
 
O *(
 

 
 O *(
'

%( <

% +

" (

/ (%
8( 
858A8'


?

 O *(
9 8%
)8'


?

 O *(
9 8%
3
8'


?

 O *(
9 8%
=8'


?

 O *(
9 8%
 
8'


?

 O *(
9 8%
- 
8'


?

 O *(
9 8%
/
8'


?

 O *(
9 8%
*
8'


?

 O *(
9 8%
H
 8'
(


'
(  (
'
#

%(  


% 7

% 7

" O *(
   
 O *(
'
 "
 ?

 O *(
9 88 6
% 7
+
) 8%
)8'
 ?

 O *(
9 88 6
% 7
+
7 +8%
3
8'
 ?

 O *(
9 88 6
% 7
+
7 +8%
=8'
 ?

 O *(
9 88 6
% 7
+
) 8%
 
8'
 ?

 O *(
9 88 6
% 7
+
) 8%
- 
8'
 ?

 O *(
9 88 6
% 7
+
7 +8%
/
8'
 ?

 O *(
9 88 6
% 7
+
7 +8%
*
8'
 ?

 O *(
9 88 6
% 7
+
) 8%
H
 8'
#   =-
 
 "
  7 * 
' #
(
 '
#
#

     


      
   


   
%>&    $+ %  $  $ 
%(  +
<
 
+

-
 H
+

"  

 O G     
 O G '
 

 O )% (%   
 O )% '

%( +
<
 
+

" %
'
O *
- 
+  
 O *
- 8+
<
 
  85848'
( 05
+'
  
/ (%
8 85
8  B0B0

+
<
 
7

8'
O )
    
 O )
88'
  
/ (%
8
858,7*8'
(%  
/ (%
8 
858%( 8'
(%  
/ (%
8%
858+
8'
(  '
O *
- %
) (
  
 O *
- 8%
)858 +8'
  %
) (
'
O )% %
)G
  
 O )% '
%
)G
 
/ (%
8 
858
- 8'
%
)G
 
/ (%
8
858%
)8'
  %
)G
'
   '
  (% '
#
#

/ 
1    
 
   
  
 +



 
   
 
  
  
  


  
  
 +
  
 $  &'
 $ %  &'
 $- 

  &'
 $- 

&'
%(  ?7


-
 O 7


" %( ?7

 "#

%(   7



?+ +
  7

=-
 
" %
 +' #

%(  >


O 7


:%

:5
O 7





  7

=-
 5 ),=-
 
"
 
?
 *
8
-  8'
  ; 
 
 +
; 
'
7 + 

<
? 
: +
 

8

<
8'
    %>9
 

<
? K %
"    
 

<
+
' #
7 + 

 
? 
: +
 

8

 
8'
 

 
? K %
"    
 

 
+
' #
7 +  <
? 
: +
 

8 <
8'
  <
? K %
"    
  <
+
' #
7 +   
? 
: +
 

8  
8'
   
? K %
"    
   
+
' #
7 + +
<
 
? 
: +
 

8+
<
 
8'
 +
<
 
? K %
"    
 +
<
 
+
' #
 
'
#

%(   O 7




:%

:5
O 7





  7

=-
 5 ),=-
 
" >

:5
' #

  

  
.  
  
 $  &'
 $ %  &'
 $- 

  &'
 $- 

&'

%(  

<
7


-
 O 7


"  
9( ('

%( 

<
7

 "#

%(   7



?+ +
  7

=-
 
" %
 +'
(  
 9('
#

%(  >


O 7


:%

:5
O 7





  7

=-
 5 ),=-
 
"
 
?
 *
8
-  8'
  ; 
 
 +
; 
'
=  +

 +
 
 =  +
'
7 + %
) 
: +
 

8%
)8'
 %
)  0'
 " %
)  )
+
 
) %
)' #
%>%    $+ %  $  $ 
  =-
 

"
 +

+
%
) 6 8    
+
8' #
7 + %
3

: +
 

8%
3
8'
7 + %
= 
: +
 

8%
=8'
7 + %
 

: +
 

8%
 
8'
 %
 
 0'
 " %
 
 )
+
 
) %
 
' #
  =-
 

"
 +

+
%
 
6 8    
+
8' #
7 + %
- 

: +
 

8%
- 
8'
 %
- 
 0'
 " %
- 
 )
+
 
) %
- 
' #
  =-
 

"
 +

+
%
- 
6 8    
+
8' #
7 + %
/
 
: +
 

8%
/
8'
7 + %
*

: +
 

8%
*
8'
7 + %
H
  
: +
 

8%
H
 8'
 %
H
   0'
 " %
H
   )
+
 
) %
H
 ' #
  =-
 

"
 +

+
%
H
  6 8    
+
8' #
 0 1 %
 
 " #



"
 +

+
8?   0 1 %
 

8' #
 %
 
1 %
- 
 " #



"
 +

+
8?   %
 
1 %
- 

8' #
 
 +
=  
"    
 +
' #




" ( 

<
%
)5 %
3
5 %
=5
%
 
5 %
- 
5 %
/
5 %
*
5 %
H
 '
?+
  
 ?+
'
   '
#   =-
 

"
  7 * 
'

 +

+
89 (

 8'
   
 +
' #
 
'
#

%(   O 7




:%

:5
O 7





  7

=-
 5 ),=-
 
" >

:5
' #

%(  
 
" ( +' #
#
    %>:
  
!
  
 



      
 
  
       

 .  
9 
 &   
% 
 &
$    & 
  
  
 
 
 

    

 
 
    


 
 
    
 
  
%(  =  +

-
 H
+

"  

   0'
O )
    
 O )
88'

%(  


+
7 + 
" ( 
 O *
-  58 +8'
(  '

 66'
#

%( (
 =   "
% 
  @ 0' #
#

(
  

 
  
        
 
     


 

  
 
  
   
 $- 

  &'
 $- 

&'

%(  

 
7


-
 O 7


"  
9( ('

%( 

 
7

 "#

%(   7



?+ +
  7

=-
 
" %
 +'
(  
 9('
#

%(  >


O 7


:%

:5
O 7





  7

=-
 5 ),=-
 
"
 
?
 *
8
-  8'
  ; 
 
 +
; 
'
=  +

 +
 
 =  +
'
7 +  
) 
: +
 

8 
)8'
  
)  0'
 "  
)  )
+
 
)  
)' #
  =-
 

%><    $+ %  $  $ 
"
 +

+
 
) 6 8    
+
8' #
7 +  
 

: +
 

8 
 
8'
  
 
 0'
 "  
 
 )
+
 
)  
 
' #
  =-
 

"
 +

+
 
 
6 8    
+
8' #
7 +  
*

: +
 

8 
*
8'
7 +  
/
 
: +
 

8 
/
8'
7 +  
/(

: +
 

8 
/(
8'
7 +  
H
  
: +
 

8 
H
 8'
  
H
   0'
 "  
H
   )
+
 
)  
H
 ' #
  =-
 

"
 +

+
 
H
  6 8    
+
8' #
 
 +
=  
"    
 +
' #




" ( 

 
 
)5  
 
5  
*
5
 
/
5  
/(
5  
H
 '
?+
  
 ?+
'
   '
#   =-
 

"
  7 * 
'

 +

+
89 (

 8'
   
 +
' #
 
'
#

%(   O 7




:%

:5
O 7





  7

=-
 5 ),=-
 
" >

:5
' #

%(  
 
" ( +' #
#

  
 
      
     
 


 +

   

    + 
  


 
   

  
  , 
 
 $  &'
 $ %  &'
 $- 

  &'
 $- 

&'
 $ : &'

%(   <


7


-
 O 7


"  
9( ('
    %>=
%(  <
7

 "#

%(   7



?+ +
  7

=-
 
" %
 +'
(  
 9('
#

%(  >


O 7


:%

:5
O 7





  7

=-
 5 ),=-
 
"
 
?
 *
8
-  8'
  ; 
 
 +
; 
'
 " 
% 7

% 7
 (  <
'
<

% +
%

% +
 
 <

% +
'


% 7

- 
" %

% +

% 7
' #
   %

% +
'

% 7

'
#   =-
 

"
  7 * 
'

 +

+
89 (

 8'
   
 +
' #
 
'
#

%(   O 7




:%

:5
O 7





  7

=-
 5 ),=-
 
" >

:5
' #

%(  
 
" ( +' #
#

  
 
  
  



  +

 
 $  &'
 $ %  &'
 $- 

  &'
 $- 

&'
 $ : &'

%(  +
<
 
7


-
 O 7


"  
9( ('

%( +
<
 
7

 "#

%(   7



?+ +
  7

=-
 
%>?    $+ %  $  $ 
" %
 +'
(  
 9('
#

%(  >


O 7


:%

:5
O 7





  7

=-
 5 ),=-
 
"
 
?
 *
8
-  8'
  ; 
 
 +
; 
'
=  +

 +
 
 =  +
'
7 + %
) 
: +
 

8%
)8'
 %
)  0'
 " %
)  )
+
 
) %
)' #
  =-
 

"
 +

+
%
) 6 8    
+
8' #
 
 +
=  
"    
 +
' #



 " 
% 7

% 7
 ( +
<
 
%
)'
 

% +
 

% +
 
  

% +
'


% 7

- 
"  

% +

% 7
' #
    

% +
'

% 7

'
#   =-
 

"
  7 * 
'

 +

+
89 (

 8'
   
 +
' #
 
'
#

%(   O 7




:%

:5
O 7





  7

=-
 5 ),=-
 
" >

:5
' #

%(  
 
" ( +' #
#

  , 
   
 

 
  
 
1 9&A 
  
 

 
 
   
1 9&9&
  
 

 

      
 

 O
 9&&&&&  
 
   

/" 4   
 
  
 
 
  
 
   
  

     
 + + 
  
   

    %>;

 ) 4 
  
%>>    $+ %  $  $ 

 )) 4 
. 

    %>A
  -@  



 $ : &'

%(  9(


"  
?
  
 '
 
   7 + 
% 9 
 88'
 
   7 + 
% 9(  88'
 


7 

 

<
7 

 '
 


7 

 

 
7 

 '
 


7 

  <
7 

 '
 


7 

   
7 

 '
 


7 

 +
<
 
7 

 '

%( 9( " 


% 9 
5
% 9(' #

%( 9(7 +  


5 7 + (
" 
" ?  3
 
'

   9 
+
+
?
 ('


<
7 

 

  

7 

 8)37=* )3*, <
8 6
8%
)5%
3
5%
=5%
 
58 6
8%
- 
5%
/
5%
*
5%
H
  L/ <=7 8 6
8T5T5T5T5T5T5T5T8'


 
7 

 

  

7 

 8)37=* )3*,  
 8 6
8 
)5 
 
5 
*
5 
/
58 6
8 
/(
5 
H
  L/ <=7 T5T5T5T5T5T8'
 <
7 

 

  

7 

 87= =?* & G, <
8'
  
7 

 

  

7 

 87= =?* & G,  
8'
+
<
 
7 

 

  

7 

 87= =?*  
)5 
 
58 6
8 
*
5 
/
5 
/(
58 6
8 
H
  G, <
5 
 8 6
8;O== <
%
 
1  
  
 
/39 8 6
8<
%
- 
@  
  
 
/39 8 6
8<
%
/
   
  
/
 /39 8 6
8<
%
*
  
  
*
/39 8 6
8<
%
H
  1  
  
H
  /39 8 6
8 
  
/(
 U %
U /39 <
%
)  T8'
#   =-
 
 " #
#

%(  2


  

<
 %
)5 7 + %
3
5
7 + %
=5  %
 
5  %
- 
5
7 + %
/
5 7 + %
*
5  %
H
 
" 
" 

<
7 

 
) 45 %
)'
%A&    $+ %  $  $ 


<
7 

 
7 +A5 %
3
'


<
7 

 
7 +D5 %
='


<
7 

 
) E5 %
 
'


<
7 

 
) J5 %
- 
'


<
7 

 
7 +F5 %
/
'


<
7 

 
7 +I5 %
*
'


<
7 

 
) B5 %
H
 '


<
7 


-
%
<
'

   '
#   =-
 
 "
  7 * 
' #
#

%(  2


  

 
  
)5   
 
5
7 +  
*
5 7 +  
/
5
7 +  
/(
5   
H
 
" 
" 

 
7 

 
) 45  
)'


 
7 

 
) A5  
 
'


 
7 

 
7 +D5  
*
'


 
7 

 
7 +E5  
/
'


 
7 

 
7 +J5  
/(
'


 
7 

 
) F5  
H
 '


 
7 


-
%
<
'

   '
#   =-
 
 "
  7 * 
' #
#

%(  2


 
% 7
 <

" 
"
%   <
7 


-
%
V%
'
#   =-
 
 "
  7 * 
' #

%  %' #

%(  2


 
% 7
  

" 
"
%    
7 


-
%
V%
'
#   =-
 
 "
  7 * 
' #

%  %' #

%(  2


 
% 7
+
<
 
 %
)
" 
" +
<
 
7 

 
) 45 %
)'

%  +
<
 
7 


-
%
V%
'
#   =-
 
 "
  7 * 
' #

%  %' #

%(  2


  +
"  " 
  
' #
  =-
 
 "
  7 * 
' #
#
  $ %A9
#

  
  
   

    
   
  + 1 
 
         
 $ : &'

%(  9(


"  
?
  
 '
 
   7 + 
% 9 
 8 +  +
: 9 
8'
 
   7 + 
% 9(  8$( +
: (8'

 

  
 

 
 % 
 
  
   
  
 40M \+  [ :  (
;

 :5 
 +
7V 
 



*
 ! +   (% 

!  
   7V 
!T  
  
  
!+ 

  
 
-
%
:%

!:  :%

 (P ?=/*= */H =  



 (.P  
) )3*A5
 (P  
 
)3*5
 (P  
*
?O/D05
 (P  
/
 ?O/D05
 (P  
/(
?O/405
 (P  
H
  )3*'





  
  

 

   

/+ 


3    
         
  
  

 
$   
 $%3
   C

 

      


  .%00  
 
  
%A%    $+ %  $  $ 
 


     


 


 
     

  


     
  
 

 
 
 ! 
  
  "

  
  
;
6! -  

  
 C

1/ -

 

  
      
6 

 
   
 

  

 , 




  

  

 


" 
  

 )        !  

  
*
  
    
 
  



     
       
     
  
  
 
9 @ 
   
  

% 0 

: /

< "
 

= (  ,



 (  

  
 

  
 
 
 
   


  
 ! 
   
      $ 

    

   
O
  
   

   
  + 
   

  
 
 
     
  
 
H  
  

%A:
%A<     
  
  
7 7 4!
0


 D
   8
  
      
   
          
 #

  


       
  
 
 !
  
    O   4
     
  


     

  
 
;     
6! 
       
   
   
 
 
   
   
 
    


1/   

  
    
 
             
  
  

    
    
6 1 999      
 
    

 


   
   
C
cr
1..8

A * B 0..5 cr
att: Integer att: Integer
att1: Real x: Boolean
op(): Integer y: Boolean *
op(): Integer
op2(x: Real)

AorB
att: Integer
*
op(): Integer
cr C
0..8

A B
att1: Real x: Boolean
op(): Integer y: Boolean
op(): Integer
op2(x: Real)

  > (  


 

  


   
   
 
 

   
 C
   

   

    
  
 
 
 
   
  '
 

 
 
       1   
  



 
 
 
 
 
   
 D


  
8 
 
 
 
   

  0 
  
 
        

 / $   
   %A=
  
 
       
$     1 
  
 
 '
 
    
   
 
    
 
 
  '
 

   


    
 


6 
 

          
   
P 
  

       
 

  
  
      
 
  

 
      

   
;       
6! "  

      
   

  
  
    
   

  

1/ - 
  
 
      



      
  
 

  

 
 
 
 
       

  
6 1 99%  

 
  

 

 
    
 
 
   1 99: 

   
 
 

br B
*
cr1
C
A *
*
cr2
cr2 = br.cr1

   4 


!(
 
 
 


br B
*

A
ar
*
x: br <=> self: x.ar

 
 4 0  
 

%A?     
  
  
     

 
     

 
 
      
 

 

  

 
    
 4  

  
  
   

         
    
  
 
 
     
     
 


     


    '

 



  
   
   !

   
;       
  
6!   

 
   C

  

    

   
1/ "  

    
 
 

  
  

 
6 1 99< 
   

    
 

      
        


   
      )       
.   
  
    *
C

   4   !


0
    
    
  +  

  
 
 


    

 
 +  
 
    

;     


 / $   
   %A;
6! 6      
  
   
   

 
   
  

 C
  )  * 
  
  
 
 
  
1/ ( 
      
      
Æ

     
6 1 99= 
            


            
B
/y: Integer y = cr.size
att: Real
A
/x: Integer
* cr
att: Real
C
cr
x = cr.size *

A
/x: Integer
att: Real
C
cr
x = cr.size *

   4  !


0

;   !  


6! 6      
 

 
 

       C
  
  
   

   


  
     
 
 
6 1 99? 
       .    
  


  
       

    
  99  9&9 
 
  
 
  
     
   



   )
    
  
    

 
 
   

   

 9  


*
"    
 -  
   ,* ) M
  * 
  ) 
   *      

 (   
%A>     
  
  
Person
name: String
1 address: String
User age: Integer
name: String 1
userId: String
password:
String

User
name: String
address: String
age: Integer
username: String
userId: String
password: String

    (   

7 7 ,


"
  
  
       
 


  
   
     
     
 
 
  


 
   


;      ?@    ?@
6!     
    
      8 
 

  
      
  
  
  


      !  
  
    
1/  
   
      

  
      


     C

  
 
 

6 1 99; 

  

  
   
 
   
    


  


"     
  


  
 
C

    
C

  
  )1 99>*       
 
   
*   
  

 
 

  

  
    
; &    
6! "    
 
  
  
1/ "            
     

 
 
 
  

       

H
            


 
  

6 1 99A     
 / $   
   %AA

B
A
* op1(...): T1
op2(...): T2
br op3(...): T3

B_I
op1(...): T1
*

br

B
A
op1(...): T1
op2(...): T2
op3(...): T3

  ' 


    

Administrator
UserInterface
Interface
check(uId: String,
delete(uId: String)
pwd: String): Boolean
post: create(uId: String,
setPassword(uId: String, check(uId,pwd)@pre = true => pwd: String)
pwd: String, check(uId,newpwd) = true
newpwd: String)

PasswordDatabase

  -.!(


   

:&&     
  
  

A
att1: T1
att2: T2
att3: T3
att4: T4
att5: T5
att6: T6
att7: T7

AAux1
1 att1: T1
att3: T3
att4: T4
A
att2: T2
att7: T7

AAux2
1 att5: T5
att6: T6

    




   H 


'
  

 
 
'

  



3       

  

  
     . 
 

  
   

  
 
 "
    

     !      


       )1 999&
     


 *
; C    
6! "  
   
 
  
 
1/ "  
          
  

 
      
 
 
    
 
   
 ! 
  

6 1 9999           
$   
 

  
  
  

  !


    
  
 


    
   
  


  
  
 K
   L  

 




 
  


 
  
    
 
  

   
    
 

"  
  
 
   
 
;    &  C
6! "     
   
     
   
  
         

 
   
 
 
   
 / $   
   :&9

PersonalDetails
1 address: String
name: String
age: Integer
AccommodationBooking
bookingId: Integer {identity}
CourseDetails
1 course: String
year: Integer

1
Preferences
hall1: String
hall2: String
hall3: String
smoking: Boolean
selfcatering: Boolean

 )   



 
!

C
y:P
m(x: T) : S

post:
y = f1(exp(x,y)) & C
result = f2(exp(x,y))
y:P
m1(x: T, y: P): Q
m(x: T) : S

post: post:
y = f1(m1(x,y)) &
result = exp(x,y) result = f2(m1(x,y))

  ,


 
( 

:&%     
  
  
1/ 6   
     
 Æ
 

 
"   
   

        

   
 
   
"    
 -  
 
 

 
    

   

;    


6! 

     

 
    



  
    
 
  
  


 
  
 ½ ½    ½  
 

    
  
  

  
     
 



 
 
 
 

  
      
    
  
    
 



 


     

     
 


6   

 

      
  


1/  
  
 
    )
  
  

        *    
 
   





 

 
   
6 1 999% 

  

α1/ act1 T1
S1
α2 [G]

α1/act1
α1/act1
S2 α2 [G]
T2

α2[G]
S3
T1
α1/ act1

S1
S2
α2 [G]
S3 T2

   ' 


 (  
  

     
  
 
  




 )

  

 
   
 *
;             
6!  
  
     


   
   
+
  
   

  
 
 
 
  

 
 
 
!   
  
 
      
  


 
   
 

   
¼
 / $   
   :&:
1/  
  
    
   

   
  Æ
 


6 1 999:      

  

S4 S4

S1 S1
e1/act/act1/act2 e1/act
e3/act5/act6 e3/act6

S5 S5
S3
S3 e4/act5 entry: e4
act1/act2
exit: act5
S2 S2 e2/act3/act4
e2/act3/act4/act1/act2 e4/act5/act7/act8 e4/act7/act8

S6 S6

 
 ' 
    .  


7 7   < ! 


! 


;        )


6!     
        !  

 
       
   
  
1/           
 
  
  

 
   ! 
  
 
6 1 999< 

  

C
op1(...): T1

A
* B
op1(...): T1
br
op2(...): T2
op3(...): T3

C
op1(...): T1
*

br

B
A
op1(...): T1
op2(...): T2
op3(...): T3

   4  ((   



:&<     
  
  
  

   

  

 

 
;  %)   6

6! /  

  
 
 + 
   

1/  !
  
 
   
   

              
H   
     
0    
 
 
 
 
     
 

 
     

 

 
  
  

  !  
 
  +
     

 
$

   

 
 
   
    
    
    
  
 
 
   D


8

  


      
   $  
       

   
 


   

)
 




   

   
 
    

 
 D 8*
; $ !   
6! " &9 
 
       
 
 9

 
   
  
 
    




    
 
 
     


 


1/ 
 
     
  
   

  
  
 
6 1 999= 
 D  

8   

  

 1 999?
 D    8  
 
 
   
 

     

;     


6! I

 
   
  
) $
!    
*
1/     
  
6 1 999; 

  

    
  


    
      
   
 
   

       
 
 
 
  
 
) 
H     *

  
       
  
  
 0.5 
;   !   
 / $   
   :&=

br B

0..1
A

C
cr
0..1

BorC
r
1
A

C B

   6 (  



 89

C
A cr
0..1

C
A cr
1

   6 (  



 89
:&?     
  
  
Move letterMoves LetterMove
*

*
Word
wordsFormed

Move
addLetterMove(m: Move, lm: LetterMove)
validateMove(m: Move, b: Board)
calculateScore(m: Move, b: Board) : Integer
Move letterMoves LetterMove
*

*
Word
wordsFormed

  ' 


 !


6! "    


  
       


    

   


 

 

           

  

     
 

 

          

     

 
     

   1 


 


     
 
  


 


    
 1 
1/
  


  ! 

     
 
      
    


 $  


 
  
   
 
  
  
  
  
  


   


             )  
 
 

  *  
 

    


  

 

    ! 
 
    



 
      



   


  
    
  
 
       



;         
6! " N 
 
 
    
     

  
      !     

!

 
        '





 "  :&;

   !
   '
  
       


1/ / 
 
 
 

  +


 
     
      


 )  

   
*
    
  
  
 

  ! F%=G
6 1 999> 

  

A B p
*
br

A B p
0..p
br

  4 ! ( 

 *)

 
  
   

   , 
 ,- 
  !

,    

  
 ,-
;       
6! 
  
       
 

  
   
 
1/ 0 
   
  
  
  
 !  
  
  #  
 
  

    
  
  
 
 '

 + 

 
 

6     1 999A
    
!  

  '


 


   
  

 
  ! 
       
  
        

;      


6! 
  
     
  
 
 
 
 
1/ " 
    
   
 
    '


      
6     1 99%&
:&>     
  
  

A B
* *
br

A C B
1 * 1
*
ar br

  4!


0  ! &! 
 


A B

* 1
ar br

att : T

A A_B
B
a 1 att : T
* b
1 br’ ar’ 1

ar = ar’.a br = br’.b

  ) 4!


0  
 
 

 "  :&A
    
!  

  '


 


   
  

 
  ! 
         
  
        

; 8$        


     
6! "  
 
     ! ) 


 

     

 

* H 





 ) 


C
 
   * 5
 


   
 
  
  


6 1 99%9    



A { P1 => P2, Q2 => Q1 }

op(x: T): S pre: P1


post: Q1

op(x: T): S pre: P2


post: Q2

   /6 (


 
 C   (

 



    


 
 
  
   

     
 
  


 
 
 3!
    ) !* 
    
            
 
 
 
   


 
  
 

  
 
   
  

 

 ) 

 
 *
  
 
   
 
;   
      
6! 
  
    
     

  
 
 

   
1/    
   

  
  
 
,    
  

 .   ,-   


 
  
   
6     1 99%%
;        
6!  $ %&


    + 

 
 
 
 
   0  
 
  


     

   
 





  
:9&     
  
  

B 0..1 1 A
ar

   4(      


 


A B
br
* m

A B
br: B[m]

 
 -<0
    
 


 "  :99
6 1 99%: 
 +   
 


 

 
   
 
      %  
 
 

 
 


 
          


 

 
 
 


 


 @  
  
   



 

    


 

     



   

 
 


  

   

  
      



   1
  



 
 
      






 
;    !  3
6! 
  
 
   

  
 
 
      ! 

  





  

  
  

 
 
  



 
      

  
 

    




1/     
 
   

  
 

  
 
6     1 99%<

A A
att1: T1 akey: Integer
att2: T2 {identity}
att1: T1
att2: T2
getakey(): Integer

   ' 


 (! 6

;       C  3 


6! 
  
 
   
  


  

  


  !   


   ! 
 

  
 
  
  
 ! 
 



 D8  
 



 



 D 8 
1/     
 
   

  
 

  
 
6     1 99%=
 
  + 


  
 
  
  

    
  
   


  !  
 
 
  !  

;       


:9%     
  
  

A A
akey : T akey : T
{identity} {identity}

br *
B B
bkey : S bkey : S
{identity} {identity}
akey : T

   4( 


 
 
 6

6! 
  
 
   
   '

 
 
  
   
 
     
O 
 
  
 
'
  

1/   

    
      

  
 
6     1 99%?
A
atta : T1

1 Y
B C *
1 attc: T3
attb: T2 InvC
*
X

AType <<enumeration>>
isA
isB
isC
A
atta : T1
1 attb: T2
attc: T3
flag = isB
flag: AType flag = isC => InvC
* flag = isC =>
ay.size = 1

* ay
X flag = isC 0..1 Y

   1!! 



  
! 


; $      



 "  :9:
6!      
 


   

 


      
 
1/   
 


      Æ


 

6 1 99%; 

  
   
 
 
 
  $  
 
br.size > 0 =>
i : br
A
A index: Integer

0..1 1 index >= 0 &


1 index <= br.size

1 i * br {ordered} * br {ordered}
B B

   


! . 
 
 
   

;     


6! 
  
 
   

 
 

 

 

   


  

  
  
    
  

 
1/ "       
   
   
6 "     



    1 99%>
    #  

  '
     
 

  
  2
   #  #   #  #    # 
;     
6! 
  
 
   

 
 

 

 

   


  
   

     
  

 
1/ "       
   
   
6 "     



    1 99%A
;  
  !E!  
6! 
  




 
  
 


  
  
  
    

 

 


 
  


 
  
  



  
   

   
    



 

  
 
  

  
     

 
    





 
      
   #    # 
  



 
   
 

 


     #     
     # 
:9<     
  
  

e[G]/act
A B

e[G1]/act
B1
A

e[G2]/act B2

    ( 

e[G]/act
A B

A e[G]/act
B
A1

e[G]/act

A2

  
 ( 

 "  :9=

 

  
  '


 \      #  \   
  

      
1/   


 
 

  



    


 
  
 
  

'


  
     
  
; C   

6! 
  
     


    

 
 
 
 

 
 
  
    



     

  
    

 

 )
  
   
  
 

 
*
"
  


   


   
  

 

 

 


1/ 
  
 
  
 
 

 

        !
    
 


 M 
     
6 1 99:& 
      
    



1 99:9 
 
  
  


 




  
 
   

  

  

  


 
  )
   
 


 $ #  
  
  
 
   
 
    
     *
B
A e3

A1 e1
e4
e2
C
A2 A3 e5

B
e3

A1 e1
e4
e2
C
A2 A3 e5

e5
e5

 
) -!   
!(
   
:9?     
  
  
A B
e3
A4
A1
e4
e6 e2
e1 e2
C
A2 A3 e5

e5
B
e4
e3
A1,A3 e6 A1,A4
e4
e1 e2 e5
e1 C
A2,A3 A2,A4 e5
e6
e5

 
 ,   
 
!(
   

 4    
   

     


  
  
 

    
 1   
 

   

 
  

   
 
  


 K 
L
  
 
 
 



    
 
 K 
  
 L  K
   L

     
;     !
6! "  
    
          

  

    

       
 
        

     
  
  
  
6 1 99:%    


   
  

 )   
 * 

    






  





 )
  
 * 
   
     :9;
T <<enumeration>>
state1
A state2
att: T
op(x: S)
post: att = state1 =>
Pred1
post: att = state2 =>
Pred2
A
op(x: S)

A1 A2
op(x: S) op(x: S)
post: Pred1 post: Pred2

 
 ' 
    ( 
) ! 

"$ .  , %   


% /,   & 
 0 ( 1%
"+$ .  , ( ) * (  )  
(  ( * 2 34(  )  % 
  % /,   & 
 0 ( 11%
"5$ 6  %   

  % *  

( 7+%
"-$ 4 6%  
 % 38 ( %
"$ 6 6%      
   
 
%  
 (
 %
"9$ : 6%  !
    " #  
% 0 
 ; ( -%
"1$ : 6(  <(  * %  $% &
   $ ' %
38 ( %
"$ 63.  &4 '
%(  6  
( +##+%
"$  .
% $!  "% 38 ( +##%
"#$ ) .   = % "    (  ! &
 #
 
 % 0 
 ; ( )
-%
"$  . % )  ** 
    
%  8 ( %
"+$  . ( =   (  =  % 
 +, % 0 
 ; ( +##%
"5$ .)3<< )
  & <> 
 =
( -%
"-$ = %          % 
% 0 
 ; ( 1%
"$  =,(  2 ( :  (  < 6 % - !
   
% 0 
 ; (
%
"9$ ? :( < ; ( < (   @ % " ( 
. 
 ! 
#%  8 ( %
"1$  : %   +)/ 0
1 2% 8 ( %
"$ = : %    

% )  3@ ( %
"$ 

ABB 359%%B   B  B%


"+#$ *
' *


( 

ABB %
% B%
"+$  + 0 
 ( ?
   ?
( 

ABB %!%%B!+B( +##-%


"++$ * %  ! 
# (  $  ") 
 %
38 ( +%
"+5$   
 % 

ABB %!%%B 


B!B( )  3

( +##-%

:9>
     :9A
"+-$ 4 '%     &
(  '  
   3
 ")
%
)  @ ( 9%
"+$ 4 '( = .  (  4  
 % &'
 6A 2   
  !
3
 
  % * 3& ,445( 'C.)% )  3@ ( +##-%
"+9$ 4 '  ; ;
%  !  % 
   % 0 
 ; (
5%
"+1$  %  
$    "% 8 ( 1%
"+$ /:  3   

 % /:( 

ABB %% BB( +##-%


"+$ )   %   =( 

ABB %% B B( +##-%


"5#$ 6  %     

%  
 (  -#7( /
+%
"5$ 6  %  ! 
# 
 
% 38 ( +%
"5+$ 6 !% 
6( 
 
  
 % 0  ?
( +##%
"55$ 

ABB% 
%B  B%
"5-$  !


   +%#% 

ABB %% B%


"5$ .   /
  ; 0( %  %B 
B
 !B%
"59$  

     %  =   

  D=E( /: 

 B+##3#13#( +##%
"51$ /8' 8 /
  '( 

ABB % 5% B <B 3  B%


"5$ 00 ( 

ABB % %%


"5$ < 0 % 
# (   
7 
 % :  ; ( +###%
"-#$ <
 < ?,
 
 *
  D<?*E( 

ABB 3
5#9%%B
 B 
 B%
"-$ 8 <% 
  
   
  
% * 


8% *??? 0 ( 1#%
"-+$  <(  6 ( 8 ' ( 2 ?(  8 0  %  !
&
  "% 0 
 ; ( -%
"-5$  <
 & 0 ( 

ABB % 
 %B 
B B( +##+%
"--$    

 % 

ABB %!%%B  
B( )  
( +##-%
"-$   
    % 

ABB % 



%B%
%
"-9$ 6 ) % 8 33    % %   ( D5-EA+-7
+1( +##+%
"-1$ = )
  . : %     
  
  
  
% * 3&
79:/ 3
 &
  
#   (  575( 9%
"-$ 

ABB!%%B  B%


"-$ '   = 6
 % ?  !
3 
  
  
 % 

( & 
  ,%
"#$  % 
   
 

%   &  &
 (
D9EA7(  %
"$ /:     
 +%#% /:(


ABB %% B
 B
B   B %
( +##-%
"+$ 8    

    7
 ,

   
  3( )
3
 +###% #9%%B    B B   %
"5$ ?,
     D, E% 

ABB % 5% BF'B%


"-$ F  
 ( 

ABB %  
%%
"$ F&*( 

ABB,%   %
B%


 

  *
  + 

 3     


     -    
  "  

"  
5

 
 9A:&8  2  

 
    
 

 ! #      #    #
   
  



   2  
 

 +       


C


   
  `!    
  

   D-8 


  !
     2   '
 
    
    
 

 .  5




 
   

    9A<>


 
   
 !
 5 9A=: 
      
   
 


   8  




5
 
     


  ' "      
        
  



 0   !    

 


  
   
  

  '    

  
-      
!      9AA9

 Æ   


      
 -  !     



    

4 '           9= +   9= +  )1
 %%%* 6
 +    
  +    
 !    C
 
     + 
     

 +   

  

 + 
  !    +   

   +  
 ! 
8    9&& 


     ! 
 

 
   

)  !* 
  

 1 0  - 
 

 
 )  "9*
:%&
  Æ   :%9
2  
   

 
  1  !    
   
  0      

  ! 
    
 


  !  
5& 0
 % :  <     4  

 
!   !
 ! 
   
     

)      


 ! & %
" 9 A
5 : %
6 : %
( % <
0 9 9%
1 < %
I % :
2 < %
9 A
. > 9
7 = 9
 9 <
 : %
 9 ?
4 9 >
, : %
@ 9& 9
/ 9 ?
- 9 <
9 ?
$ 9 <
P < %
3 < %
 > 9
` < %
a 9& 9
%' (   8-  0 
9
"      
    


 
9 -


          
 
   
  

   
   

 )

  !  D 8*

   

 

  
     

 
   
 
  !  
 


   

  


    
  !H ]
%     0   

 

 

     



   

  !    

     
 
:%%    0 $  "
 
 
  ! 
 
 
   M
 

    
       
  
 



 
   
 
 +  4  +

 


 
      
   
 + 

     
     ! 

     
  
  
   

 !   


 8

  4
  
  
  
 
  
  !    
: 0
   3       

 
  ! 

    

   


    
  
  
             


      
 

         !


    
 
 


  

   
  

  



  
   

 

 !
1 "9         
  
T New letter

T E A Existing letter
B E E T
A T New words formed = Tea, at, ch, teach

C H
H

 (  (  !


0

 
 
    
" 

      
   
 
   
M
  
        
+  
  
 

    

   

   
   

 

          
   +  


 
      

 
  
  
"   
   
 

  -  

    
        
   M

+  

 
      

 
 




  



 

  
  
   
   
9      
  
  
   

   =& 
        

 
  !
%         
  
 

  



 
  
   
  
     
 +    
    
  
   
 
  +    
  
  Æ   :%:
: "    

   

  
 

 
 

 
      +    
   +   

  
    
 

      


+  


   

   
 

    

  

  
 


   

 
-  

   
9 "    

  
 !   
     
   

 
  !  
  


 


 
 
% 4 

    
   
 
    


  D

  8  
:   !
       

    
 

   

  
 
    
   

  
   
 
 
  C




   
    M
-6/"550  

   !  . 3 -   _ - ,6


 

% '!!   & ! !!


,

   
 .    
   +   
   
   ) 
   - 
  
 *
 
   

  



1 59 
      
 
  
HtmlComponent *

HtmlItem HtmlText HtmlBody HtmlHead HtmlForm HtmlTableData

HtmlPage HtmlTable HtmlTableRow


HtmlInput

 2  


 3  


<9   
    2   +  2 
 
 "  
 

  
  

  
  


<  
    
     2 


 
 


       


   
     !
   
 -   
2 


 


  !


 
 2   

 
     

 "-6


 2  

   
  

       
<C     2    
 2   


         
    
 
   
:%<
:%=
 


      
<<    
 

   2   

 

 
  
  
 
 

 
< <   I < <&#  #*7

< (    





   

 
  
    )  $  
*     *    
    
 



 
 


<     2  



   
 !     M
     
   
 



< -   I < -&##*7
   
<!       
    
     

       
 
 
   
    
  

  

 

<    
2 
 
 
 
  
,*

     

  

 
 

,* * 
 
,* 

<&    
   2 
 

  

 
 

  


    
 

 

  
'

$    
<    
   2 

 
 

     


'


  "    

  

  
 

     
'


<   

 
 


 

 
  
 

  $ $     
     1   
< =0 5  I < =0&#E#(# .#*7




K L    
 4
 +    
M
           


 


   

 
 
   46"

        

  

 
   

 46 %& 
 


 46"    
 46
  )  )
  
     
 
 *  
    ,
    
  

 
            %    )1 69*
 
 
   ,
   
      


   
   
 
 
Collection OclAny

Real Boolean
Set Sequence String

Integer

  1 ( 

 69 


    46" 

   46 
  ¼




  
   

  
     
         
     
   46  46" 6     $
   
    

    

  

  
    $  !   
     


 
  
   
     

 
    C 

:%?
:%;

  


  ¼  ¼
   ¼ ¼ 
 
  ¼ ¼ '

  
 

  ¼ ¼ '

    

 

 ¼ 
 '

 .       
½ 
    
½¼  ¾¼   ¼
   :

.
 ½      

½ 
     
½  ¾    
¼ ¼ ¼
  :

.
 ½      

½ 
    ½¼  
¼
: 
  ½      

+   

    %

   
 ¼   ¼  '

 

 
  
 ¼  
   
 ¼    ¼ 




¼





¼





¼
 



   ¼   
.   ¼    ¼ 
. 8   ¼    ¼ 
   ¼    ¼ 
 "5#  ¼   ! ¼ 
  ¼   

   ¼     
½         ½¼ ¼




 
  ¼     ¼ 

 
  ¼      ¼ 

 

   ¼    ¼ 

7 

   ¼    ¼ 

 7 
  ¼   ¼

 ½         ½¼ ¼
 

;<     
¼ ¼


 1
 ¼    
    ¼    ¼ 
(-
- - 3 
"#


 


%'  
 (

  1
:%>     

      46" 
 '

    
  



 ¼  
  46
%     %  46" +
  

 %    
%
¼

     9 
 
     %    
 

¼

 



  

  
 
 
¼


%

  

 % 
 
% 
¼

  

+  
  46"    

 46 -+  
  

 46 -
    5 
  
  46" )      +    *
!   +  
     
    ) 


    
  


   
 
  
  
    
  
 
*
4
    
 +  
      


 
 
    46  +  $%3
  

 
  46"    6
 :  
1 46" 
 
 

  
  
  !
     
 
  

 46     $   $

   
       
 

  
9  

 ! 
  
   

   

+ 


$      $ 

       
 9 
 
   


$    $   
     9 
 

%   

 
      $ 

  
 

 
 + 






   $ 

  

  
 

 ¼

 
      
  
 $    ¼

1   
 
  !  
 !
  
 
    
  


 

    $

 $      $
 $  
  !  
   $ 
  !
       

   
 
 
   
 
 -$  !1 :%A
 9   & :
46"       
 46 

468  


 

  

   
  + 
  
      
 


 
  
 
  H 
      



 


    
 320/0     -@


  46"     


   46 

   

    


      46  



        
       
  
 

 
    

 
  
 
  
 ) 
 
 
* 
 
 !  
  
  

 + 
 

  46 
           

         

  !


   
 !     46" 

     
  



 5       

 F>G   
 


 

  

  



 

#$
   

  
+             1 (9 
      1
(%
Applicant Staff
Register with system

Apply for accommodation

Check application

Check applicant data

Modify applicant data

Modify hall data

Perform allocation

Inform of allocation

 6 1


!!
 
 !    

,    

 
 +

  C
 '
 

#  
   
 

 


- (C
              
 &9 




    
 
 
   

%& C

  )
 9&&      
 %&  '

 M =*
::&
::9

Residence
Applicant name : String
preferences
name: String
stnumber: String 3
course: String {ordered}
*
year: Integer

1
0..1

Allocation
*
Room
0..1 id: String

 6  1
!!
 
 !  !

" 1 (: 


     " 
 

     

  

 



  !
  &  

. 1 (< 
    
/ 1 (= 
 '
  
0 1 (? 
 '
  
1 1 (; 
       
2 1 (> 
    
+# 1 (A 
    

  
+ "    
   1 (9&  
  '

 9%  '

  '
 


        
   
 
    '
    
   
  


 C
8 )
   
 


    9* 


  8  

::%   )    

Style <<enumeration>> Glass <<enumeration>>


Victorian DoubleGlazed
Conservatory Contemporary SingleGlazed

height: Integer
width: Integer
depth: Integer
style: Style
glassType: Glass 0..1
doors: Integer

Module
height: Integer
* width: Integer
mstyle: Style
parts
mglassType: Glass

Door Window Wall

 6
 
 0
 !  !

Room
capacity: Integer
*
*

* *
Facility
Slot
startTime: Integer name : String
* endTime: Integer
date: String

1
Booking
price: Integer
Customer
paid: Integer * 1
name : String
phone: String
email: String

 6  
  !  !
:::

c1: Company
p1:Person

boss

p2: Person

boss boss

p3: Person p4:Person

c2: Company
boss
p5:Person

 6    & 



 !


p2 : Player

p1:HumanPlayer

p3: HumanPlayer

p4: HumanPlayer

 6  

 !

::<   )    

Emergency services
Ambulance system Dispatcher

Register incident

Find ambulance

Notify ambulance position

Ambulance crew

 6 1!  (      !

Translation
hint: String
1 *
Word
from
text: String
language: String 1 *
gender: String to
case: String
tense: String

*
Letter
symbol: String

*
{ordered}

 6   


 !  !
::=
Space
kind: String
Property photograph: String
askingPrice: Integer consistsOf description: String
minPrice: Integer 1 * widthft: Integer
location: String widthmt: Integer
freehold: Boolean depthft: Integer
sizemtsq: Integer depthmt: Integer
sizeftsq: Integer

1 owner
Person
name: String
address: String
phone: String
email: String

 6 -    !  !

,  $   




     '    
 

 '
    ' 

    $   $  $   

     $   




       
 $     




  ' 
-         1 (99  
 

     

 

$     
  $ 

"         1 (9%
.   
9 %       
% 
 );  
 

  +*
:  
<  
=  

/   
       
::?   )    

b1: B
b2: B

a1: A
b3: B

b4: B

b5: B

b7: B
b6: B

a2: A b8: B

b9: B

b10: B
b12: B
b11: B

 6) -.!(


D
&

0 
 


2 parents
Person
age: Integer
name: String
*
children

age >= 0
age > children.age

 6 
   !

::;

post: lotteryNumbers.size = 6

Lottery IntegerObject
lotteryNumbers
score: 0..6 value: 1..30
0..6
generateNumbers() {identity}
guesses
addGuess(x: Integer)
0..6
calculateScore() correct
0..6
pre: guesses.size < 6 & x: 1..30
post: x : guesses.value

pre: lotteryNumbers.size = 6 & guesses.size = 6


post: correct = lotteryNumbers /\ guesses &
score = correct.size

 6  
   !


0   
 $     

1   
:  :8

&  
  :  :AB  :8A: O  6 B*

2   
  %    
%   !
  %   !


+# 1  
 

  
     
     


     
1  
    

   *               *

     

* 
    
 
 
++        
      $     


    


 $  
 - $     

  $     

2      




  !
 $     
 !
 $$ 
 !
     $$  $       $$      
 


 
     !
 $    
::>   )    
     


$    $   

 




  
+,    
   



 
     

 
      
 
    1  
 

  
  
 
  
   
  
   
  
 '

1 %
  
  
  %%=    ( %

   

 >     %

   
  9%  ' ( %


  
  9;  '  %
 
 %<   ) 
%
 

9?<

  
+    
  
  '! 
 &
  


'! 

  
 

  &


  1 (9: 

    
birth Alive
Marriageable
Single2
birthday[ age = 15]
Single1 [age >= 16]
[age < 16]
Widowed

birthday[age < 15]

marry partner dies

Married

divorce

separate
reunite
partner dies
Divorced
divorce
Separated

death

 6
 40  !  

,     1 (9<


-     1 (9=
"     1 (9?
::A

b1pressed b1On
Off

b1pressed
b3pressed
b1pressed

b3pressed
b2pressed
b2pressed b3pressed b3On

b2On
b2pressed

 6  4



  

S1

α
γ
S2
β

S3

 6  40  .    

Sw1 Sw2 Lt

Off sw1off[lt = Off]/lton Off


Off sw2off[lt = Off]/lton
sw1off[lt = On]/ltoff ltoff
sw2off[lt = On]/ltoff

sw1on[lt = Off]/lton
sw2on[lt = Off]/lton lton
sw1on[lt = On]/ltoff
sw2on[lt = On]/ltoff
On
On
On

 6    


:<&   )    
. 

 
   1 (9;
deposit(x)

Not
Overdrawn

withdraw(x)[balance−x < 0]
withdraw(x)[balance−x >= 0]
deposit(x)[balance+x >= 0]
Overdrawn

deposit(x)[balance+x < 0]

 6 56 


  

/   
  ! 

  

 
  
 
   !   ! 
        
 







 
  
 
!       


 

     

 

   !    
 
 

        

0 -      
  

 

  

  

  
   

9&&       

 
       

    
   
1  
  
 
   
    


  
   
 
 
 
 
   

     
  )  
8 
 
 
 

  



 
   #    


      
 
   *  





    '        '

    
2 "   



 
  


 
   
 

 '
    
  #   
   

D  8 ) 
 *   
  
  5

    
:<9


 
  
  

     
     


 
  
     
  
        
   
   

 
     
  
    
 

 


 
$



    




  
   
$ 
+#  
 


    

   
  
 
 
 
     


 
    ! 
  
    
 
 
  

 
  
  


    
 

   

 

     

  "
+ 
 
     
 
  




 

 #  
 
 

   
 

"
0 
 
 

  
 


  


   )*  
 

  
% 
  


  )*  
 

  
9   


 

 

%

  
 

 .
  
 $ %   '
 $ %  /   '
 $ %  )
  '
 $ %   )
  '

%(   )


  

  )
 
"  
)
   4'
 
)
   A'
 
,($
 -4'
 
,($
 -A'
 
(
 % 
  %
'
 
  A'

%(  )
    45  A
"  4  4 
  '
 A  A 
  '
% 
  %
'
 A  A'
#

%( (
 3
- 
"
%   4 3
-    A 3
- ' #
:<%   )    

%( ,($
 
- 
" 
  
 /   '
 % 
  >
   
" -4   4 
- '
-A   A 
- '
% 
  
'

 -4'

 -A'

% 
'
#
  A 3
- 
" -A   A 
- '

 -4'

 -A'

% 
'
#
  4 3
- 
" -4   4 
- '
 A   A 
  '
-A   A 
- '

 -4'

 -A'

% 
'
#

 -4'

 -A'

% 
'
#

%( 

 " #

%(     7 +  +


"    
 /   '
   
 /   '
 848'  8A8'  8D8'
 88'  8(8'
 )
    
  )
  5'
 -  
 /   '

 3
- 
" -      
- '
7
 %   -'
#
#
#

,   
        


 



9 " 

 
   
 

  
:<:
%  

 
   
  
  

:  

 
   
 

 
"   !

 
  
    ) 
  *
   
 

 
  

 


 
 
  

 

 
   

   
 
   
$ 

  
 



 

 

 
 


   
 .
  
 $ %  &'

%(  7%( )


 
"  
 '   
%(  
(
+
 

 

 
 
-  0'     
 
 %
  
 /   '
 
,($
 
'  
  

 
 %(  %'    

 
7%( )
  %( )
   %'

%( 7%( )
    
"   '

-  0'
  2
 @ 0
" %
     /     
'
%(     /     
'

  %( +
0'
%(

0'
%( )
   
 7%( )
  %( '
#
#

%(  +
?%
 
"
%  %
 ' #

%( (
  =
"   2
  0
"
%  %
' #

%  
-   2
 . 4 CC
%( )
   ='
#

%(  



"   2
  0 "
% ' #  U 

 %( )
   =
"  
-   2
 . 4
" %
  
 /   '
:<<   )    

% '
#  U 


-66'

  %( +
0'
%
     /    %(  
'
%(

0'
%( )
   
 7%( )
  %( '

% '
#
%( )
  
'
 (  %( )
  +
?%
 '
%
     /    ( 
'
%
 05 +

-'
#

%(     7 +  +


"    
 /   '
 8/8'  8H8'
 88'  8(8'  88'  88'
7%( )
    
 7%( )
  '

" 7
 %    +
?%
 '
 
'
# 
K  ='
#
#

- "    


 
   
,9< = H 
/3/>=7 9/*/ H 5 7:%

?,37*/)3*7
?J 4  7:%
C
A  7:%
C 4 ,%
 C
A ,%
 @
A  4 $
 %

,=/*),37


( H 5  

 
 " / :%
 %


 
 


#
    


 @
 ( ( 7:%
 -5  :%


 "#
 
 "
 
(  
 5   
 

  $
  
- + 
#
 ( ( 7:%
:%


 "# 
    


 C
 ( ( 7:%
 -5  $
 :%


 "#
  
    


 @
 ( ( 7:%
 -5  :%



  


:<=
,%
( H 5  4 4J5
$ 4 4J  H

  

% 
 ( ( 7:%
5$ ,%


+
7:%
( H 5  4 4J5 $ 4 4J 7:%

  
%  ( ( 7:%
5$
=39

"         


 

 
  
    
 
   
     

    
 1 (9> 
  
BorC
r
10
A 1
aatt : Real

B_D
C B
catt: Real batt: Integer *
1 dr’
br’ *

 6 '!(


0  !

. 1 (9A   '


   
 
 
Button
boardPanel: Panel
text: String
gui: GameGUI i: 0..2 1 enabled: Boolean
j: 0..2 board
Buttons 1 clearButton

 6  !


: >'

/        '    
   1 (%&
0     1 (%9
1     
:<?   )    

AType <<enumeration>>
isA
isB A
isC
isD att1: Real
att2: Boolean
att3: Integer
att4: Real 1 E
flag: AType er
*

er /= {} => flag : {isC, isD}

 6 )  !   !! 




00
11
11
00
00
11

loadImage(f)/sampled = 0 selectSamplePoint(x,y)/sampled++
Initial

Loaded

translateImage[sampled >= 10]


analyse[sampled >= 10]

Translated
analyse
Analysing

 6   
 
 
 !
:<;
%( (   

"  
 %
  0'

%(  %


 % 
" %
 6 % '
 
 %

" 7
 %   8Q% 

%  K8' #
#

%( (  (


 
  -'

%( 


" %
  0' #
#

 

-
 

" %( (
 
  -
"
%  - @ AB' #
#

 G


-
 

" %( (
 
  -
"
%  - @ A4' #
#

2   
  
       5
     

 
 
 
 

 

        

 
0
   
    
       
 

     &9
 9 
 
 
 !  )
   
   *  
 

+#         

   

   
   
 ,
 
 

  $ 
 
   
 ,
 
    


   
   
 ,
 
   

  $    
  
  


  +
+    
:<>   )    
 $ %  &'

%(  H 


"  
7 + 
'
 
7 +  ?
'
 
 % 
  
 /   '   /% O

#

 $ %  &'

%(  /% O



"  
7 + 
'
 
 
/%   
 O '  7 + .@ /%
#

%( (   /%


"  
 (
'
 
 -,
  '
#

%(  
%/%
-
 /%
"  
 

 
'
 
 H
'
#

%(  ,  /%


-
 /%
" #

,    
%( 

)
" %(  4 -' #

%(  H
"  
7 + ' #

%(  / 



  )
"  
 -'
 
 '
 
 (  
 /   '   H

%(  
- --
" -  --'
  40&--'
#
#

-  . 
 
 
 

 
    
  
 
  


      
 

 $ %  &'
:<A

%(  

"  
7

3%(
  
 O7
'   )
+

 
7
+%

  
 O7
'   )
+

 
7

  
 O7
'   )
+

 
 
 0'  
 
 2


%(  +


3%(

"    
 '


3%(
 2
 1 F
"  
-   
- ) AM 6 4'

3%(
 
 )
+

-'
#
#

%(  >%


 -
"  +%

 2
 @ F "
% ' #
+%

 
 )
+
-'
#

%(  %


7

" 
  7
 O7
 
3%(
 
'


/+%

'

 
 2
'
7
 %   8Q% +%

 8 6 +%

'
7
 %   8 
 %(
 

 8 6 
3%(
'
7
 %   8
  8 6 
 '
7
 %   8
 8 6 
'
#

%(     7 +  +


" 
   
 
'
 +


3%(
'
 >%
D'
 >%
40'  >%
D'
 >%
4D'  >%
AD'
 >%
D0'  >%
4D'  >%
D4'
 %
7
'
#
#

"  .  


 
  
%(  

"  
7 + 
'
 

 ('
 
?

'

%(  
=
? 5 
 
(
"  
 
(

 


 '
:=&   )    
(  
('
#
#

%(  ?


" #

.      1 (%%


D
DId datt
Integer String
AorB
AorBId aatt batt catt flag
Integer Real Integer Real String

BD
AorBId DId
Integer Integer

 6  4 
    !

/     1 (%:


B D
batt: int * * datt: String
A ar dr
aatt : double 1

C
0..1
catt: double

 6
 % 
 B0

0  ( (  
1K= = =3*  

5 

&5% 
&@
1K= = =3* 
P?9/*/@
1K= = =3*  

:%  5
5 % @
1K= = =3* :%   P?9/*/@
1K= = =3* 
P?9/*/@
1K= = =3*  % 
  5 
5 % G+@
1K= = =3*  % G+ = *Q@
1K/** )7*  % G+ %
/
(
  7
/
(@
1K= = =3* 
   P?9/*/@
:=9
1K= = =3*  
P?9/*/@
1K= = =3* % 

5
@
1K= = =3* 
P?9/*/@
1K= = =3* 
 P?9/*/@

"      


 
1 
@
1
@D.J.0D1
@
1 

@
1:%  @E1:%  @
1
@
1
@
1 %  % G+  8/
(
8@
1
  @ 
  1
  @
1 
@DJ1 
@
1 % @
1 

@
1 

@
1:%  @41:%  @
1
@( 1
@
1 %  % G+  87
/
(8@
1
  @ 
 (
1
  @
1 
@IJ1 
@
1 % @
1 

@
1% 
@
1
@H ;(1
@
1
@4D  
9 
5  
;++5 7%
1
@
1% 
@
1 
@

  ,
,    Æ
 



 

  !
     




 
     


 
    !  

   
   
 
    
  

  !     Æ


  



 
 
  
 

  
  
    

  !   


 

 
   


 


-   
%(  ++

-
 H
+

"  
O G     
 O G '
 
O )% (%   
 O )% '
 
O *
-
- 
 

 O *
- 8/
858
- 
8'
:=%   )    

%( ++

" %
'

- 
 
/ (%
8858A08'

- 
 
/ (%
8 858B8'
O )
    
 O )
88'
  
/ (%
8
858,7*8'
(%  
/ (%
8 
858%( 8'
(%  
/ (%
8%
858%( (
8'
(  '

O *
- % 
(
  
 O *
- 87% 
858 +8'
  % 
(
'
O )% % 
G
  
 O )% '
% 
G
 
/ (%
8 
858
- 8'
% 
G
 
/ (%
8
858% 
8'
  % 
G
'
   '

O *
- 
(
  
 O *
- 8G  
858 +8'
  
(
'
O )% 
G
  
 O )% '

G
 
/ (%
8 
858
- 8'

G
 
/ (%
8
858
8'
  
G
'
   '

O *
- 
(
  
 O *
- 8
858 +8'
  
(
'
O )% 
G
  
 O )% '

G
 
/ (%
8 
858
- 8'

G
 
/ (%
8
858
8'
  
G
'
   '

O *
- 
 (
  
 O *
- 8/
858 +8'
  
 (
'
  
- 
'
   '

O )% > % +(-


  
 O )% > %8
(-858+2
8'
+(-
 , 8/ +% ; 858 +% 85
'
+(-
 , 8L2858285 %
'
+(-
 , 8>  858+  85
'
+(-
 , 8

 9+
 858

+
 85
'
+(-
 , 8*
858 
85
'
+(-
 , 8? 85885
'
  +(-
'
   '
:=:
O *
-
 (
  
 O *
- 8= 
858 +8'
  
 (
'
O )%
G
  
 O )% '

G
 
/ (%
8 
858
- 8'

G
 
/ (%
8
858
8'
  
G
'
   '

O *
- - (
  
 O *
- 8G-858 +8'
  - (
'
O )% -G
  
 O )% '
-G
 
/ (%
8 
858
- 8'
-G
 
/ (%
8
858-8'
  -G
'
   '

  (% '
#

%(     7 +  +


" ++
  
 ++
'
7
 %   '
#
#
1 (%< 
  
  
" "

 

 
     1 (%=
.   
1 @ 1
@
1  
@G    1  
@
1  +%+
 8N7  8@
%    
"  - 
 
) %
  4 
4 %
'
%
  
814@*
    8 6  - 6 814@8'
#

%   -


"  - 1 4
"
%  4' #

%  -& -.4'
#
1  @
1
@

1(@
1  
 8 48    88@
:=<   )    

 6  D
  (

Register[invalid payment]
index.html Login [invalid name and email]

NewUser
Login
[valid name Remove
and email]

register.html command.html

Register[valid payment]/
add member to
Members table
Search Messages

Lists all members


results.html message.html
matching users
requirements

Send/sends message
to selected
Read message member

 6  '  


  
   !
:==
1@
1 +@=

+
1 +@
1% 
 8
48 
 8
- 8@1@

1@1% 
 8(% 8
%
 8G  8   8  8@1@
1 @
1(@
1 @

/   
1 @ 1
@
1  
@ 

  1  
@
1  +%+
 8N7  8@
%  

"  

%
  4 
4 %
 ?
/ 0 CC


%
  4 
4 %
 ?
/ 4 
9+ %
  4 
4 %
 ?
/ 4


"  
8,5     
8' #



"  
8=,    
K8' #
#

%  

 
"   @ FJ CC  1 M0
"
%  %
' #



"
%  
' #
#

%  9+  


"   @ EB CC  1 JI
"
%  %
' #



"
%  
' #
#
1  @
1
@

1(@
1  
 8 48
   88@

1@
1 +@=
 
 (


1 +@
1% 
 8
48 
 8
- 8@1@

1@1% 
 8(% 8
:=?   )    
%
 8?
8   8
8@1@
1 @
1(@
1 @

0 1 (%? 


 
 


 
  1 (%;
 





index.html Login [invalid name and email]

NewApplicant
Login
[valid name
and email]
Register/add new
personalDetails. command.html
html record to
Applicant table

Check Allocation
courseDetails.
html

check.html

preferences.html

 6  '  


  

!!
 
 !

index. personal command course preferences. check Staff


html Details. .html Details.html html .html GUI
html

GUI

Check
Functional
Login
Page Page Core
Allocation check
Initial Personal Command Course Preferences Module Servlet
Servlet DetailsServlet Servlet DetailsServlet Servlet

Course Preferences
Personal DetailsPage Page Command
DetailsPage Page

Data Repository

Mailer
DBI

 6  1  



!!
 
 !

1  
  !  
1 @ 1
@
:=;
1  
@3) 
  1  
@
1  +%+
 8N7  8@
%  

"  

%
  4 
4 %
 ?
/ 0 CC


%
  4 
4 %
 ?
/ 4 CC
9+ %
  4 
4 %
 ?
/ A CC
9+ %
  4 
4 %
 ?
/ D CC
9+ %
  4 
4 %
 ?
/ E CC
9+ %
  4 
4 %
 ?
/ J CC
9+ %
  4 
4 %
 ?
/ F CC
9+ %
  4 
4 %
 ?
/ I CC


%
  4 
4 %
 ?
/ B 
"  
8,5    3) %(
8' #



"  
8=,   3) %(
8' #
#

%  

 
"   @ FJ CC  1 M0
"
%  %
' #



"
%  
' #
#

%  9+  


"   @ EB CC  1 JI
"
%  %
' #



"
%  
' #
#
1  @
1
@

1(@
1  
 8 48
   88@

1@
1 +@=
3)  (


1 +@
1% 
 8
48 
 8
- 8@1@

1@1% 
 8(% 8
%
 8?
8   8
8@1@
1 @
1(@
1 @

      ! 


   
? 


  / 0 CC
? 


  / 4 CC
:=>   )    
? 
9+   / A CC
? 
9+   / D CC
? 
9+   / E CC
? 
9+   / J CC
? 
9+   / F CC
? 
9+   / I CC
? 


  / B

2 "   
 


      
  


 
    
      
   

 



 
  
  !   
    

 
   

  !    
  - 
 

 
   
 
        !
"  
 
 9? 




 
   

       

   
+#   
1 @
1
@1  
@ 
 )+
1  
@
1(@

1 
 88@
1
 
 88    8FB5E45FA5DF5JJ5DF5J45E45JF5EJ5FA5EJ5FB5E48

  8  8
  8>

8 @
1
 
 88    8J45E45E054005J054J05F054J05F05EJ5JF5EJ5J45E48

  8  8
  87%
-5 7%
5
8 @
1
 
 88    8F05EJ5F054J054J054D054D054005FB5E45FA5EJ5F05EJ8

  8
  8
  8S
 8 @
1@

1+   8
 $+8   8E008 
+  8A008
  8)+
  
 
  
8 %
  88@
1(@
1 @

++ -    


 


!
 
 
), 

   

    

   
 
   
 

* 
!

 * 

 


:=A
  -
+     1 (%>
register.
.html
message.
html results.
html command.
CLIENT html
TIER

Results
Messages Create Page
Servlet Member
Servlet

Command Message Command


Page Page Servlet
PRESENTATION
TIER

Member
createMember(...)
getMatches(...)
sendMessage(...)
BUSINESS readMessage(...)
TIER

INTEGRATION
TIER DBI
Mailer

 6      B--   

,         1 (%A 


 

  1
(:&
   
 
   
 )1 (:9*
" 
    


      
"    
 

     
 


      
 
   
 
 
)
* ' ) *  !
   

 )  

*  !  
      
    
 
 H  

   



  



 
  
  
 
1 3
  

      
    

  
    
          
       
-   
%(     

+
7 + /5
:?&   )    

State <<enumeration>> WebCam


off state: State
on panning: Boolean
*
cams *

1 monitors
1
Area
Controller
pollingInterval: Integer name: String
panningInterval: Integer

1 monitors
1

* sensors *
Sensor
User detecting: Boolean
name: String state: State
password: String lastDetection: Integer

 6   !

  !

commands.
html
report. parameters.
html html
login.html

Command Report Parameter


Login Servlet Servlet Servlet
Servlet
Login
Page

Parameter
Command
Page
Page
Report
Page

User Controller

WebCam Sensor

Area

 6
)  !

   
:?9
report.html
login.html
Name Area Last Detecting Cam
Cam pages
Password opened
in new
browser
windows
Login
[invalid
login] Back
[valid login]

Cat Monitor Commands


parameters.html
Set Polling and Panning
Check Polling Logout
Polling Interval

commands.html
Panning Interval

Set

 6
 / (
 !

 !

7 + /5
7 +
- 
" 7 +   8  ++
  %8'
 

    7
 +
 

'
  % 8    85 '
 7/% 
   %   
  7/% 
   '
7
 
 
7
 +
9
% ) 
 5% '


+

  
 

+

'

" 
 
7%($
 8
+
  8 6 /'

 
*
- 
- '
/
   

 )

/
/ 6
8  ++
  %8'

 
G  '

% 7

  ( +

(
 /'


 
- 
" 7 + 

 +
7 +8
(
3
8'
7 +
 
 +
7 +8
8'
/
   
 )

/

5
'

 

 
+


 *
*,5 '

 
?+
'
#
*  

'

 
'
#
 =-
 

" 
=-
 
' #
#
:?%   )    
"  
         0.5 


     
   
-  
  )    0

   
  
 
)      0.5 
 

1 
   
  
          




  .
+          
 
   
   
 
   
    
 
    
 
    

  
 
  $ 

 
  
 $

, " 
      !  
     
  
   
  ! 
 
   


 '



!  

   
 
 !

"         


 

$

!
 ?&       %9
   =<   9A
 %&< 9,9 %:%
<> 9    %?<
   9; 9 <;
     9;  %<>
  %9 B %%9 %%?
 %=:    9A
  9;&  9A
 %&<  A:
0
 %&<   %&
 9;& &   %:?
0
 %&< && 9=&
   <& &    %9
 <; &  ! %A:
7 %%& &     %A>
E' <;   : =, %9?
E' <; =9 %9=
E
<>   %A:
' <;       
   %A?
' <;   = 9 %9=
F  =9  %)   6

% 9?% :&<
! 9?:  
  !E! 
   %=< %A:   :9:
     9;<  !   =
       C% 9?%
:9% C! %%9
 () A< C     :&&
   
   ?> C   %A>
      %& C    =9
   9A C   %&;

:?:
:?<   #
6 9?& ! %=&
6  C 9&% ! %
<! 9?& !  %<A
  <? !   9;:
   ?: >     
          :&: %A:
      %A> >   %=<
     :&< &C %<9
   !  3 :99  %?<
    ! :9? (! <
     9&9 %=: %A<        ) :&:
    :&%    A< %?<
      :&&  <?
   *     AA          :&?
  9&<     %=&
=, %9=  %=< %A:
=, %<:       :&;
=;! %::       
= %9= :&;
=& %9=       %=;
=! 9?:        %A?
=   9?%      %A;
=  %9= %:;       AA
=   9?%         :99
=  99&       C  3 
)%  ?& %=A :99
)%  %)   :%>   
       AA
)% <& %=; :&A
) $ %9     %=&
   %<% 
 A<
& %   %&
& %<:       %=&
B 99& = %:?
$       :9: ): >) 9%<
$ !    %=? :&<  %<:
  !   %A; %! %%%
     99<  8 %<9
     <>  9?: 9A=
  ;?   !    :&?
%) <&     99%
%6 9<      :9:
%8) %<9     <
%A    :9    ;;
%  9&> 
  ;:
! % %<A 
    ;<
!% 9?%   99:
:?=
  <;     %9?
     9&9 :9:      <:
 
  9&%    %:<

   
  99     %9=
 
E= A<   %< 99<
(&& %%%  ==
(),8 %&>     >%
() 9<    
: ;! ?
( %<%  %
(   9;:    ;?
B9   9?%    :&
B %A   %9;  $ ?9
8! %<:    %>
8 %<:    ;>
8)   %<:    >%
8) %<:     9;:
8&) %%%   A9
8    :   : (! <
8$     E 
     9&%
    :&A    9%
8   %9: 
  >&
; %?%    ;<
;) %      :&
;! =     ?>
;) %?%      %<
   %>     %&
    %>   >%
  <%     99
    ?>   %%%
     9;= A    <9
   ;=  <?
  
   9>        %:?
  9=     %:?
 % <%  : (! <
    :&    %9?

    A     ;;
    ?9   %?
  %9   =%
     %%:      ;;
   
 %%:      ?%
    99>   %?9
 <;  %=:
     %9;    %9=

  
 ;<  %<

   9&%    99>
   ;<  =%
:??   #
5 <%   
   %>
 9&=   ??
 ;=    9;<

  ;A   ?>

    %9> :     >%


    =A A     >:
  <%  %<9
   9>A      %=
  
   ?<    %=
     ?%   %<
  %?9      %A
  : (! <     <9
      AA    <;

   %?  $  ??
      :9      : ;! ?
     %9?    ?>
    <& =:   
  9&9
     >%   %?&
     9%     %<A
   ?<  9;&
   A:   9?%
  <&    9;<
    99?     <&
 : C
9A9   : ;! =
 <%     <&
 $ %9 >%     %9?
 
    %9>   $ ?&
     %9>  %?&
   99?   
 ;<
     %% 

 %:;
$     %<A *     %A
$  %<A *   <9
  >% *   %<
     %<A * <%

: ;! =  % <%

   9%>  5  ?:
 : (! =     : ;! ?
   $  ??       99&
     %<>    ?>
  %=9     %9;
    99   %&;
     99     %9?
  99  9><
 <?     %%
    9A% *    >%
    ;> *  <%
:?;
        %:: A  %&>
   %9?
   : ;! ?
   
   %>
 5 <;
   
 :
$
  :%
     %9?
    %9?
    %:?
 <%
  %?
  %%A
   9&%
  %?
    9?%
   99>
   <9
    99
   $  ??
: = %>
  %?
  %< 99<
    ?>

   %9=
) <;
( <;
  %&;
    9%
  >%
       ;A
  : (! =
  9A&
    <9
  <%
 * <%
    %=
   9;<
  9=
   ?>
  
   9>
  
 %=&
   %9=
   %9:
  : =, %9?
   9;=

You might also like