Presentasi sedang didownload. Silahkan tunggu

Presentasi sedang didownload. Silahkan tunggu

:: BAHASA PEMROGRAMAN :: USING JAVA

Presentasi serupa


Presentasi berjudul: ":: BAHASA PEMROGRAMAN :: USING JAVA"— Transcript presentasi:

1 :: BAHASA PEMROGRAMAN :: USING JAVA
PROGRAMMING LANGUAGE :: BAHASA PEMROGRAMAN :: USING JAVA

2 Tentang saya Nur Cahyo Wibowo, S.Kom, M.Kom
S1 Teknik Informatika ITS 1998 – 2003 S2 Teknik Informatika ITS 2006 – 2009 HP Griya Pesona Asri E-21, Medokan Ayu atau (YM) Face book : Nur Cahyo Wibowo MK : BP, BP2, Struktur Data

3 BAHASA PEMROGRAMAN PENILAIAN: NILAI AKHIR = (NA UTS + NA UAS) / 2
UTS/UAS 60 % TUGAS/QUIZ 30 % KEHADIRAN 10 % NILAI AKHIR = (NA UTS + NA UAS) / 2

4 INTRO TO PROGRAMMING

5 PROLOG: THE COMPUTER SYSTEM
HARDWARE SOFTWARE BRAINWARE PROGRAMMING O/ S GAMES APPLICATIONS

6 PROGRAMMING FRAMEWORK
FILE APLIKASI COMPILING RUNNING SOURCE CODE MEMORI/ RAM OPERATING CODING USER PROGRAMMER

7 PROGRAMMING HISTORY

8 LANGUAGE GENERATION 1ST GENERATION – Machine Language ASSEMBLER
2ND GENERATION – Human Language FORTRAN, C, PASCAL, BASIC 3RD GENERATION – Visual, OOP DELPHI, JAVA, VISUAL BASIC 4TH GENERATION – DBMS SQL (STRUCTURED QUERY LANGUAGE)

9 ALGORITHM & FLOWCHART Tujuan :
Mahasiswa dapat menjelaskan apa itu algoritma dan flowchart. Mahasiswa dapat menyebutkan beberapa simbol dasar flowchart. Mahasiswa terampil dalam membuat algoritma dan flowchart untuk suatu studi kasus.

10 Lee & Lu

11 Algorithm is… A computable set of steps to achieve a desired result. Paul E. Black An explicit, precise, unambiguous, mechanically-executable sequence of elementary instructions. Jeff Erickson An effective method for solving a problem using a finite sequence of instructions. Wikipedia A list of well-defined instructions for completing a task. Wikipedia

12 ALGORITHM Adalah urutan langkah-langkah logika yang menyatakan suatu tugas dalam menyelesaikan suatu masalah atau problem. Contoh: Buat algoritma untuk menentukan apakah suatu bilangan merupakan bilangan ganjil atau bilangan genap. Algoritmanya : Bagi bilangan dengan bilangan 2. Hitung sisa hasil bagi pada langkah 1. Bila sisa hasil bagi sama dengan 0 maka bilangan itu adalah bilangan genap tetapi bila sisa hasil bagi sama dengan 1 maka bilangan itu adalah bilangan ganjil.

13 Some Example Buatlah algoritma untuk: Membuat mi instan Sarapan
Berangkat ke kampus Menyalakan komputer Mencetak file dokumen Note: definisikan terlebih dulu kondisi awal dan akhir

14 Buka file dokumen Cek printer Jika lampu menyala klik tombol printer Jika lampu tidak menyala maka ulangi langkah 2.

15 What is Flowchart A diagram that uses graphic symbols to depict the nature and flow of the steps in a process. Another name for this tool is flow diagram. Maps or graphical representations of a process. Steps in a process are shown with symbolic shapes, and the flow of the process is indicated with arrows connecting the symbols.

16 What Flowchart for Promote process understanding by explaining the steps pictorially. People may have differing ideas about how a process works. A flowchart can help you gain agreement about the sequence of steps. Flowcharts promote understanding in a way that written procedures cannot do. One good flowchart can replace pages of words.

17 Flowchart & Programming
The flowchart is a means of visually presenting the flow of data through an information processing systems, the operations performed within the system and the sequence in which they are performed. Program flowchart, which describes what operations (and in what sequence) are required to solve a given problem. The program flowchart can be likened to the blueprint of a building. As we know a designer draws a blueprint before starting construction on a building. Similarly, a programmer prefers to draw a flowchart prior to writing a computer program.

18 MEANING OF A FLOWCHART Flowcharts are generally drawn in the early stages of formulating computer solutions. Flowcharts facilitate communication between programmers and business people. These flowcharts play a vital role in the programming of a problem and are quite helpful in understanding the logic of complicated and lengthy problems. Once the flowchart is drawn, it becomes easy to write the program in any high level language. Often we see how flowcharts are helpful in explaining the program to others. Hence, it is correct to say that a flowchart is a must for the better documentation of a complex program.

19 FLOWCHART Biasa disebut dengan diagram alir.
Salah satu metode untuk merepresentasikan algoritma selain pseudocode dan urut-urutan langkah. Menggunakan simbol-simbol bangun datar beserta anak panah sebagai penunjuk arah proses.

20 Some Guidelines The flowchart should be clear, neat and easy to follow. There should not be any room for ambiguity. The usual flow direction is from left to right or top to bottom. Only one flow line should come out from a process symbol. Only one flow line should enter a decision symbol, but two or three flow lines should leave the decision symbol. Only one flow line is used in conjunction with terminal symbol. Write within standard symbols briefly. As necessary, you can use the annotation symbol to describe more clearly. If the flowchart becomes complex, it is better to use connector symbols to reduce the number of flow lines. Avoid the intersection of flow lines. Ensure that the flowchart has a logical start and finish. It is useful to test the validity of the flowchart by passing through it with a simple test data.

21 SIMBOL NAMA FUNGSI TERMINATOR (FLOW LINE) PREPARATION PROSES
Permulaan/ akhir program GARIS ALIR (FLOW LINE) Arah aliran program PREPARATION Proses inisialisasi/ pemberian harga awal PROSES Proses perhitungan/ proses pengolahan data

22 Proses input/ output data, parameter, informasi PREDEFINED PROCESS
(SUB PROGRAM) Permulaan sub program/ proses menjalankan sub program DECISION Perbandingan pernyataan, penyeleksian data yang memberikan pilihan untuk langkah selanjutnya ON PAGE CONNECTOR Penghubung bagian-bagian flowchart yang berada pada satu halaman OFF PAGE CONNECTOR Penghubung bagian-bagian flowchart yang berada pada halaman berbeda

23 Hitung sisa bagi antara bilangan dengan angka 2
Contoh: Flowchart untuk menentukan bilangan genap atau ganjil Y T Start Input Bilangan Hitung sisa bagi antara bilangan dengan angka 2 A Apakah Sisa = 0 Cetak Genap Cetak Ganjil End

24 AKAR PERS. KUADRAT Mulai Masukkan nilai variabel A, B, C
Hitung D = B2 – 4*A*C Jika D = 0 maka X1 = X2 = – B/(2*A) Tapi jika D < 0 maka X1, X2 Imaginer selain itu maka X1,2 = (– B ± √D)/(2*A) Tampilkan X1, X2 Selesai

25 FLOWCHART AKAR PERSAMAAN KUADRAT
Start Input Nilai A, B, C D = 0 ? Cetak X1, X2 End X = (– B ± √D)/(2*A) D = B2 – 4*A*C X1 = X2 = – B/(2*A) Y T D < 0 ? X1, X2 Imaginer DIKET: Y = AX2 + BX + C FLOWCHART AKAR PERSAMAAN KUADRAT

26 Bilangan Faktorial Mulai
Masukkan N (N adalah bilangan yang akan dihitung nilai faktorialnya) Set variabel Faktorial  1 Set variabel Angka  1 Hitung Faktorial  Faktorial * Angka Angka  Angka + 1 Apakah Angka > N ? Jika TIDAK kembali ke langkah (5). Jika YA tampilkan nilai Faktorial. Selesai

27 Faktorial = Faktorial * Angka
FLOWCHART FAKTORIAL EX. 4! = 4 x 3 x 2 x 1 = 24 Start Input N Faktorial = Faktorial * Angka A Angka > N ? Cetak Faktorial End Faktorial  1 Angka  1 Angka = Angka + 1 T Y

28 LATIHAN SOAL Buatlah flowchart untuk memasak mi instan!
Buatlah flowchart untuk naik angkot/ lyn! Buat algoritma untuk menghitung jumlah N suku dari deret aritmatika dengan pola berikut : Sn = …… + (4n-1) Buat flowchart untuk mencetak pasangan nilai X dan Y dimana hubungan antara X dan Y memenuhi persamaan Y = X3 – 2X +1 dan nilai x berubah dari –10 sampai 10 ! Buat algoritma + flowchart untuk menentukan apakah suatu bilangan merupakan bilangan prima atau bukan! Buat algoritma + flowchart untuk mencetak N buah bilangan prima yang pertama!


Download ppt ":: BAHASA PEMROGRAMAN :: USING JAVA"

Presentasi serupa


Iklan oleh Google