Monday, December 2, 2013

PseudoCode ATM

DEKLARASI
integer: pin, option, proses, saldo=650000, no_rekening=0, jum_transfer=0, penarikan=0, saldo_min=50000, sisa_saldo=0

DESKRIPSI
Begin
                        Writeln ("------------ATM-----------")   
                        Writeln ("       SELAMAT DATANG     ")   
                        Writeln ("        BANK 29 JAYA      ")   
                        Writeln ("                          ")   
                        Writeln ("--------------------------")   
                        Writeln ("SILAHKAN INPUTKAN PIN ANDA")   
                         
                         if (pin == 1234) 
                         do
                            Writeln ("\n--------------------------")   
                                  Writeln ("MENU TRANSAKSI ANDA")   
                                  Writeln ("A/n OCTAVIA R GULTOM\n")   
                                  Writeln ("SILAHKAN PILIH OPTION")   
                                   
                                  Writeln  ("-> 1. INFO SALDO")                                 
                                  Writeln  ("-> 2. TRANSFER")   

                                  Writeln  ("-> 3. PENARIKAN")   
                                  Writeln  ("-> 4. TRANSAKSI LAIN")   
                                  Writeln  ("-> 5. KELUAR")                            
                                  Writeln ("--------------------------")   
                                  System.out.print ("OPTION -> ")   
                                  option=input.nextInt()   
                        switch (option)     
                        case 1: 
                        Writeln ("================================")   
                        Writeln ("SALDO ANDA SAAT INI : "+saldo)   
                        Writeln ("================================")    
                        break   
                         
                        case 2: 
                         
                        Writeln ("=================================")   
                        Writeln ("TRANSFER UANG ")   
                        Writeln ("=================================")   
                        System.out.print( "Masukan No Rekening     : " )   
                        no_rekening = input.nextInt()  
                        System.out.print( "Masukan Jumlah Transfer : " )   
                        jum_transfer = input.nextInt()  
                         
                        for
                         
                        if (pin == 1234)       
                        Writeln  ("> PIN MATCH : OK ")    
                          
                        else      
                        Writeln ("> PIN NOT MATCH. Transaksi Batal")    
                          
                         
                        if (jum_transfer > 50000)      
                        Writeln  ("> SALDO : OK")    
                        Writeln (" -> No Rekening      = "+no_rekening)    
                        Writeln (" -> a/n              =  Pratiwi")    
                        Writeln (" -> Jumlah Transfer  = "+jum_transfer)  
                        Writeln (" -> Sisa saldo Anda saat ini = "+sisa_saldo)
                        sisa_saldo = saldo - jum_transfer
                        Writeln (" TRANSAKSI BERHASIL !")     
                         
                        else if (jum_transfer < 50000)
                        Writeln ("--> SALDO MINIMUM TRANSFER ADALAH 20000. TRANSAKSI GAGAL")    
                        saldo=saldo-jum_transfer    
                        break   
                         
                        case 3: 
                        Writeln ("=================================")   
                        Writeln ("PENARIKAN UANG ")   
                        Writeln ("=================================")   
                        Writeln ("Saldo Awal        : "+saldo)   
                        Writeln ("Penarikan         : "+penarikan)  
                        if(penarikan <= 50000)  
                        Writeln("Maaf saldo minimum penarikan 50000")
                        Writeln("masukkan nominal yang lebih besar") 
                        if (penarikan > 600000 )
                        saldo=saldo-penarikan   
                        Writeln ("Saldo akhir       : "+saldo)   
           



                        for
                          
                         
                        if (pin == 1234)      
                        Writeln ("-> PIN MATCH ")    
                          
                        else      
                        Writeln ("-> PIN NOT MATCH. Transaksi Batal")    
                          
                         
                        if (penarikan >= (saldo-50000)) 
                             
                        Writeln ("-> SALDO TIDAK CUKUP : TRANSAKSI GAGAL !")    
                            
                         
                       
                         
                        break
                       
                        case 4: 
                        Writeln ("=================================")   
                        Writeln ("HISTORY TRANSAKSI")   
                        Writeln ("=================================")   
                        Writeln ("Transksi Terakhir")   
                        Writeln ("Penarikan Uang :"+ penarikan)   
                        Writeln ("Transfer Uang   :"+ jum_transfer)   
                        Writeln ("Saldo Akhir    :"+ saldo)   
                        break   
                        default
                        Writeln ("TERIMA KASIH TELAH MENGGUNAKAN BANK 29 JAYA")   
                          
                        Writeln ("\nTEKAN 0 UNTUK KEMBALI KE MENU")   
                         
                         
                          
                                    while ( proses <= 1)     
                        else
                        Writeln ("PIN ANDA SALAH ! ATM ANDA DIBLOKIR. \nHUBUNGI KANTOR CABANG TERDEKAT atau CALL 085642760001")   
                          

END



No comments:

Post a Comment