Anda di halaman 1dari 38





  


|

  
!     
 

!   

!    
 
   
!  

!  

!  
! ! 

! 

!   

R
   

!          "


!  # $  $  $ %  

! &   ' '  $  $ (


!   '   $ $ 
!  # )       '   

          *  


         "

!             


       

 
  +$ ,,"

þ
     

!            


   "
!  # ! %   !   
 "
""            "

float calculate_average (float a, float b) {


float result;
result = (a + b)/2;

return result;
}

±
 

 
!  

         


! -).$             
"
!   )! -).         
         "
!  +$            ! "
! 

 !/
!          $      

!                

!               


 "
!       *      !       

      "


"" $  $ $  "

Î
  % 



 

  

  

     

 0  

å
 
// Pseudo Code for Account class

class Account {
String accountName;
double accountBalance;

withdrawCash();
depositCash();
checkBalance();
} // Class Account


  % 



 



 

     



X
 
// Pseudo Code for Circle class

class Circle {
double cetreX, centreY;
double radius;

area();
circumference();
move();

} // Class Circle

o
 
 

! 
       "
"" )  2 3 4       "
)  2 3 4       
 "

!
          "
"" 3 4 
 5 6 3 
 7 6 |Î$111

!                   


   "

! 
 
   !        
 "

|1
%   
 

Ô    
Ô

    

ë  
  

||
 2
    
    
r 

  r  


Y  
 *   
 
 
 
  

  

  U 
 
Y  
 *   
 
  
 
  

r 

r 
   
   
Y   
 
 ï 
  
 

ë       |R


  
!  # `  

!                 
       !$       "

!           "

! 8     ! 9 & #


! :! 7 $ + 9   +


 ;!
! |oo± # :! 7  + 9    9
     
! :! 7 # 7   
! + 9 #
    )  <

! |ooÎ #  + +    


!
 '
   &  

!  =    # 1"X

! |ooÎ
     : -
:.    0 
 "

! |ooå #       "

!        R"1



 5
!    %    0$       
      
 
    "
 ) 4 !  



 
   2   

!  

!  

!  

! ! 

! 

!   


 
!   -     .       
!    >      > "

!             


  > #     "       
   "

!
     ; # &   
          "

! )     !     "

|
  ' % 

 

  5

7


 07 -.

 

|X
  ' % 

!
!       -.$    -.   07 -.
    -    !. 5 
7 "

class Account {
private String accountName;
private double accountBalance;

public withdrawCash();
public depositCash();
public checkBalance();
} // Class Account

|o
 
! )   <       !          
 "
!  !      "

!             ! $  


       !    "

%  2               


!           !  "

R1
 ' % 

class Account {
private String accountName;
private double accountBalance;     
! 
public withdrawCash();  ?/
public depositCash();  @/
public checkBalance();
} // Class Account

R|
 
! 5   !  - .       %  
 !    ! "
!    -&  . #   -& .
! &          "

 

  
 !



RR
  ' %  
!  
!     %      2
5  7 "
!   0 2

!    5  7 "


!  2     <    - 0." ) 
 !       !   "
!          0    
   $     0     
      
!       5  7
   "
!    &    0   & "


   
! 0    -    .      #
"



0


  ' %  
!  
!     %        "

!    9  "       "

! ;  $        "

! 9            "

! ;          "

! )     -.$    -.   -.    


        9  "
!         9       
   "
!       &  "
!        &  "
!    9           
    &  "


     ' 9 

!         >  $  


           '   "

! )               "

%  2 9              -.$


   <        "


     ' & 

! &             "

!                   "


! "" )       -.        
     9  "

!  -.               


       "

R
     #   

! 5        9     


 "

! &             4"


!  -.          
       "
!    -.$  -.    !   
               "

! ) &            þ


   -.$    -.   -."

RX
     ' % 

! %  !   "


!                
       "

! "" 9             !


        '  o1  -.

Ro
     #    

!           "


! )         "

:  & 



þ1
      
! )                  
 !"
! )            "

! "       -.   &   
-.   :  "

!           +=      


,,"

þ|
! 
! !      A! B
! ! # !

!   ' "

! 

$ !     ! "

! !      $   $    


     !     !      "

þR
! 
!     !   9        & 
 " )             
 "

  6    -./        


&    6  /
  " -./  -.      %  

   6   9  -./         


  6   /
  " -.  -.         %  "

þþ
!  #   
 

!               $  


      "
   | ' * - .
   R ' * - $  .

! )                


 "
* -R.    |    "
* -R$±.    R    "

þ±
!  #

 

!        ,$ '$ C$ >     


      ! "

! "" ,       '  


  6  , R/

! 5     +=" ,,     "

þÎ

!               
         "
! )  !         "

%  2

)   9    !      


" )             
      9  "
D



D 9 

þå
    
!              "

!            "


!            "

!         !  "

!      "

!           !   "

!        !        

  "

þ
8 !

(
! :   9 !
! 7 0   %     $  ' $ 

  


! !
!    0    $      

    
! :   !   9  E
!       

þX