1 / 20

Persiapan UTS

Persiapan UTS. Review Materi Widodo.com. Definisi dari Algoritma yang benar ialah :

lam
Download Presentation

Persiapan UTS

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Persiapan UTS Review Materi Widodo.com

  2. Definisi dari Algoritma yang benar ialah : • A procedure used to solve a mathematical or computational problem or to address a concurency issue. In the latter sense, an algorithm is a set of step-by-step commands or instructions designed to reach a general goals. • A procedure used to solve a mathematical or computational problem or to address a data processing issue. In the latter sense, an algorithm is a set of step-by-step commands or instructions designed to reach a particular goal.

  3. 2. Yang bukan termasuk karakteristik Algoritma adalah: • Input • Output • result • Finiteness • Effectiveness

  4. 3. Definisi pseudocode yang tepat ialah : • Pseudocode adalah detail deskripsi dari apa yang program komputer atau algoritma harus lakukan yang diwujudkkan dengan bahasa berstyle alami (bukan dari suatu bahasa pemrograman). • Pseudocode adalah detail deskripsi dari apa yang program komputer atau algoritma harus lakukan yang diwujudkkan dengan bahasa berstyle suatu bahasa pemrograman tertentu dengan alur yang jelas.

  5. 4. Yang bukan termasuk karateristik bahasa Java : • Object-oriented • Distributed • Interpreted • Robust • Multi OS

  6. 5. Java runtime environment (JRE) adalah software yang : • Mengkompilasi program java di Windows • Mengeksekusi program java • Mengompilasi program java di DOS

  7. 6. Yang tidak termasuk modifier pada Java adalah : • Public • Static • Private • Final • System.out.

  8. 7. Yang tidak termasuk data type di java adalah : a. Based on Complexity : • Atomic DT (boolean, byte, char, short, int, long, float, double) • Composite DT (Array, Struct, List, Queue, Stack, String, Tree) b. Based on Source: • Native / primitive / basic DT • Abstract DT c. Based on function: • String datatype

  9. 8. Perhatikan kode berikut double d = 4.5; inti = (int) d; Konversi diatas berupa : a. Mengubah d menjadi integer b. Mengubah i menjadi double c. Mengubah d dibuatlkan ke atas

  10. 9. Apa hasil dari program berikut :

  11. Method terima input

  12. Penting • Final is a keyword in Java to declare constant. • Declaration : • finaldatatype CONSTANTNAME = VALUE; • Example: final double PHI = 3.1415;

  13. Apa hasil dari program ini

  14. Penting

  15. Penting • Starts i=8; and j=3; • i+=(++j); Equal to: j=j+1;  j=4 i=i+j;  i=12 • i+=(j++); Equal to: i=i+j;  i=16 j=j+1;  j=5

  16. Penting • String comparison

  17. Essai • Buat : • Flowchart danpseudocode • program java menggunakan switch-case untuk terima input 2 bilangan, dengan terlebih dahulu menerima pilihan input : a= operasi pertambahan b=operasi pengurangan

  18. Buat program untuk membangkitkan bilangan random antara 0-100 menggunakan while: int number=(int)(Math.random() *101) Dengan looping menggunakan while Program Tebak bilangan atara 0 dan 100 Masukkan tebakkan :50 Tebakannya ketinggian Masukkan tebakkan : 6 Tebakan kerendahan Masukkan tebakan : 9 Ya, tebakannya adalah 9

More Related