Programming Concepts - Bina Darma e-Journal

advertisement
Programming Concepts
(Konsep Pemrograman)
Leon Andretti Abdillah
02
Programming Concepts Environment
2016
Required Softwares
JRE (Java Runtime Environment), Java, eClipse –
Kepler/Luna/Mars/Neon
2. DevC++
3. Windows Free Pascal IDE
1.
2
Leon Abdillah - PC - Installing Java & Eclipse
19/09/2016 9:30:57
Download Java Runtime Environment
(JRE)
1.
3
Kunjungi URL 
http://www.oracle.com/technetwork/java/javase/downloads
/jre8-downloads-2133155.html,
maka akan muncul “Java SE Runtime Environment 8u101”
Leon Abdillah - PC - Installing Java & Eclipse
19/09/2016 9:30:57
2.
4
Accept License Agreement
Leon Abdillah - PC - Installing Java & Eclipse
19/09/2016 9:30:57
3.
5
Pilih JRE sesuai dengan spesifikasi PC/Laptop masingmasing (misalnya; untuk contoh Windows 64 bit)
Leon Abdillah - PC - Installing Java & Eclipse
19/09/2016 9:30:57
4.
6
Download JRE 8u101 tersebut
Leon Abdillah - PC - Installing Java & Eclipse
19/09/2016 9:30:57
5.
7
Save di lokasi directory yang diinginkan
Leon Abdillah - PC - Installing Java & Eclipse
19/09/2016 9:30:57
6.
8
Install JRE tersebut
Leon Abdillah - PC - Installing Java & Eclipse
19/09/2016 9:30:57
Download Java Version 8 Update 101
(Release date July 19, 2016)
1.
9
Kunjungi URL  https://www.java.com/en/download/,
klik “Free Java Download”
Leon Abdillah - PC - Installing Java & Eclipse
19/09/2016 9:30:57
2.
10
Accepted the terms of the end user license agreement
Leon Abdillah - PC - Installing Java & Eclipse
19/09/2016 9:30:57
3.
11
Download
Leon Abdillah - PC - Installing Java & Eclipse
19/09/2016 9:30:57
Letakkan file hasil download ke Folder yang diinginkan
5. Install file tersebut
4.
12
Leon Abdillah - PC - Installing Java & Eclipse
19/09/2016 9:30:57
Download Eclipse
Kepler/Luna/Mars/Neon
1.
2.
13
Kunjungi URL  http://www.eclipse.org/downloads/eclipsepackages/
Pilih Package yang diinginkan (;Eclipse Neon)
Leon Abdillah - PC - Installing Java & Eclipse
19/09/2016 9:30:57
3.
14
Unzip
Leon Abdillah - PC - Installing Java & Eclipse
19/09/2016 9:30:57
4.
15
Buka Path Eclipse
Leon Abdillah - PC - Installing Java & Eclipse
19/09/2016 9:30:57
5.
16
Jalankan Eclipse, maka unucl Splash Eclipse Neon
Leon Abdillah - PC - Installing Java & Eclipse
19/09/2016 9:30:57
6.
Tentukan Folder Workspace
Jika tidak ingin diubah silahkan
saja menggunakan alamat
workspace tersebut, jika ingin
diubah silahkan klik tombol
Browse dan tentukan alamat path
folder-nya.
7.
Jika mau diubah, misalnya  d:\\workspaceNeon
Jangan lupa klik “Use this as the
default and do not ask again”
17
Leon Abdillah - PC - Installing Java & Eclipse
19/09/2016 9:30:57
8.
18
Loading
Leon Abdillah - PC - Installing Java & Eclipse
19/09/2016 9:30:57
9.
Eclipse Neon IDE Tab Welcome
10. Close Tab Welcome, maka akan muncul Eclipse Neon IDE
19
Leon Abdillah - PC - Installing Java & Eclipse
19/09/2016 9:30:57
11. Eclipse Neon IDE (Integrated Development Environment)
Eclipse IDE terdiri atas:
1. Tittle Bar (worksapceNeon – Java – Eclipse)
2. Main Menu Bar (File, Edit, Source, ...)
3. Tool Bar (New, Save, Save All, ...)
4. Package Explorer
5. Code Editor
6. Console
20
Leon Abdillah - PC - Installing Java & Eclipse
19/09/2016 9:30:57
Create Java Project
1.
21
Pada Main Menu Baru klik File  New  Java Project
Leon Abdillah - PC - Installing Java & Eclipse
19/09/2016 9:30:57
2.
22
Input Java Project Name
Leon Abdillah - PC - Installing Java & Eclipse
19/09/2016 9:30:57
3.
23
Setelah klik Finish maka pada Package Explorer muncul Java
Project “JavaPC-SI1H”
Leon Abdillah - PC - Installing Java & Eclipse
19/09/2016 9:30:57
Create Java Package (Optional)
1.
Pada Java Project yang sudah ada (JavaPC-SI1H) klik kanan
New Package
Muncul kotak dialog New Java Package 
24
Leon Abdillah - PC - Installing Java & Eclipse
19/09/2016 9:30:57
2.
Input Name untuk New Java Package
Pada Name ketikkan “aHello”, kemudian klik Finish
25
Leon Abdillah - PC - Installing Java & Eclipse
19/09/2016 9:30:57
3.
26
Maka akan muncul New Java Package “aHello” dibawah Java
Project
Leon Abdillah - PC - Installing Java & Eclipse
19/09/2016 9:30:57
Create New Java Class
1.
27
Jika ada mau memasukkan java class ke dalam package  Pada
Java Package “aHello” klik kanan dan pilih New  Class
Leon Abdillah - PC - Installing Java & Eclipse
19/09/2016 9:30:57
2.
Maka akan muncul kotak dialog New Java Class
Pada Name ketikkan Hello, kemudian klik “public static void main”
28
Leon Abdillah - PC - Installing Java & Eclipse
19/09/2016 9:30:57
3.
Pada Name ketikkan Hello, kemudian klik “public static void
main”
Tekan tombol Finish,
29
Leon Abdillah - PC - Installing Java & Eclipse
19/09/2016 9:30:57
4.
30
Maka akan muncul template atau struktur program Java
Leon Abdillah - PC - Installing Java & Eclipse
19/09/2016 9:30:57
Ketikkan Java Code

1. package aHelloWorld;
2.
3. public class HelloWorld {
4.
5.
public static void main(String[] args) {
6.
// TODO Auto-generated method stub
7.
8.
System.out.print("Hello World");
9.
}
10.
11. }
31
Leon Abdillah - PC - Installing Java & Eclipse
19/09/2016 9:30:57
Compile Java Code
 Compile, Build dan Run Program Java pertama Anda
 Secara default, Eclipse compiles the code automatically as you
type.
 Result
32
Leon Abdillah - PC - Installing Java & Eclipse
19/09/2016 9:30:57
Homework
1.
Download and install
a) DevC++
b) Windows Free Pascal IDE
Write a documentation of download and install above
documentation in Word 2007
3. Store it in the cloud repository (dropbox)
4. Paste the URL in class group
2.
33
Leon Abdillah - PC - Installing Java & Eclipse
19/09/2016 9:30:57
References
Abdillah, L. A. (2009a). Pemrograman II (Delphi Dasar) Edisi 4. Palembang: Pusat
Penerbitan dan Percetakan Universitas Bina Darma (PPP-UBD) Press.
Abdillah, L. A. (2009b). Pemrograman III (Delphi Database) Edisi 4. Palembang: Pusat
Penerbitan dan Percetakan Universitas Bina Darma.
Abdillah, L. A. (2013). Algorithms & Programming. Retrieved from
http://blog.binadarma.ac.id/mleonaa/teaching/programming/algorithm-andprogramming-2/
Abdillah, L. A. (2014). Data Structures & Algorithms. Retrieved from
http://blog.binadarma.ac.id/mleonaa/teaching/programming/datastructures/
Abdillah, L. A. (2016a). Algorithms & Data Structures. Retrieved from
http://blog.binadarma.ac.id/mleonaa/teaching/programming/algorithmsand-data-structures/
Abdillah, L. A. (2016b). Programming Concepts. Retrieved from
http://blog.binadarma.ac.id/mleonaa/teaching/programming/programmingconcepts/
34
Leon Abdillah - PC - Installing Java & Eclipse
19/09/2016 9:30:57
Eclipse. (2016). Eclipse Downloads, from
http://www.eclipse.org/downloads/eclipse-packages/
Holowczak, R. Programming Concepts: A Brief Tutorial for New
Programmers, from http://holowczak.com/programming-conceptstutorial-programmers/
Oracle. (1995). About the Java Technology, from
http://docs.oracle.com/javase/tutorial/getStarted/intro/definition.ht
ml
Oracle. (2016a). Free Java Download, from
https://www.java.com/en/download/
Oracle. (2016b). Java SE Runtime Environment 8 Downloads, from
http://www.oracle.com/technetwork/java/javase/downloads/jre8downloads-2133155.html
Sedgewick, R., & Wayne, K. (2011). Algorithms: Addison-Wesley
Professional.
35
Leon Abdillah - PC - Installing Java & Eclipse
19/09/2016 9:30:57
Download