Wednesday, February 10, 2010

Object Oriented - 1st day

Now is the time to shape your stories! Your fate is in your hands!!
- Auron, Final Fantasy X -

Morning Class - Early Rise - yeah, whatever...
1st OOP class and here's what i've got...
open it, read it, whatever....hope u got what u need....

OOP
11 february 2010

class and objects
class -> gambaran umum akan sesuatu dengan ciri2 tertentu
ex : students, cats
object -> sesuatu yang lebih spesifik berdasarkan ciri2 dari class
ex : edward, garfield

properties and method
properties : ciri2nya, misal u/ cats -> color, weight, race
ada 2 properties :
- variable : berubah-ubah
- constant : ga bisa berubah
method : apa yang bisa dilakukan, misal u/ cats -> eat, jump, walk
ada 2 jenis :
- without argument/value, ex : jump()
- with argument/value, ex : jump(5) -> jump 5 times

inheritance
inheritance : mekanisme OOP dimana ada 2 atau lebih entity yang beda tapi punya banyak kesamaan
- superclass/ancestor : yang bersifat lebih umum
- subclass/descendant : yang bersifat lebih khusus dengan sifat mirip dengan superclass

software engineering
seperti membangun sesuatu, perlu disiplin ilmu, perlu langkah dan desain, langkah/stages nya :
- analysis : cari gambaran umum nya
- design : di bentuk design nya
- coding : programmingnya
- testing : di tes
- operation and maintenance : bagaimana di pakai orang lain dan perbaikan2nya

practice makes perfect
1. open cmd prompt
2. type "notepad HelloWorld.java" -> create new file
3. type :
public class HelloWorld {
public static void main(string[] args){
system.out.println("I Rule !");
system.out.println("The World !");
}
}
4. save
5. compile using "Javac HelloWorld.java"
6. run using "Java HelloWorld"

activating java
go to C:\Program Files\Java\jdk1.6.0_11\bin
go to system properties(right click @ my comp)
choose advanced
choose environment variables
double click path (system variables)
add ";C:\Program Files\Java\jdk1.6.0_11\bin" at the end of variable value
OK to the end

that's it for now...

No comments:

Post a Comment