Presentation is loading. Please wait.

Presentation is loading. Please wait.

Review Materi Widodo.com. 1. Definisi dari Algoritma yang benar ialah : a. A procedure used to solve a mathematical or computational problem or to address.

Similar presentations


Presentation on theme: "Review Materi Widodo.com. 1. Definisi dari Algoritma yang benar ialah : a. A procedure used to solve a mathematical or computational problem or to address."— Presentation transcript:

1 Review Materi Widodo.com

2 1. Definisi dari Algoritma yang benar ialah : a. 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. b. 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 : a. Pseudocode adalah detail deskripsi dari apa yang program komputer atau algoritma harus lakukan yang diwujudkkan dengan bahasa berstyle alami (bukan dari suatu bahasa pemrograman). b. 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 : a. Object-oriented b. Distributed c. Interpreted d. Robust e. Multi OS

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

7 6. Yang tidak termasuk modifier pada Java adalah : a. Public b. Static c. Private d. Final e. 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; int i = (int) d; Konversi diatas berupa : a. Mengubah d menjadi integer b. Mengubah i menjadi double c. Mengubah d dibuatlkan ke atas

10 ClassKonversi ke tipe dataPemakaian BooleanbooleanBoolean.parseBoolean(…); BytebyteByte.parseByte(…); CharactercharString.charAt( ); ShortshortShort.parseShort(…); IntegerintInteger.parseInt(…); LonglongLong.parseLong(…); FloatfloatFloat.parseFloat(…); DoubledoubleDouble.parseDouble(…);

11 9. Apa hasil dari program berikut :

12 Method terima input MethodUse next();Input String (word) nextLine();Input String (sentence) nextByte();Input number (byte) nextShort();Input number (short) nextInt();Input number (int) nextLong();Input number (long) nextFloat();Input number (float) nextDouble();Input number (double)

13 Penting  Final is a keyword in Java to declare constant.  Declaration :  final datatype CONSTANTNAME = VALUE;  Example: final double PHI = 3.1415;

14 10. Apa hasil dari program ini

15

16 Penting OperatorNameDescription ++varpreincrementvar is incremented by 1 first before its value is used. var++postincrementvar is incremented by 1 after its value has been used. --varpredecrementvar is decremented by 1 first before its value is used. var--postdecrement var is incremented by 1 after its value has been used.

17 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

18 Penting  String comparison

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

20 2. 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


Download ppt "Review Materi Widodo.com. 1. Definisi dari Algoritma yang benar ialah : a. A procedure used to solve a mathematical or computational problem or to address."

Similar presentations


Ads by Google