Tips for heathy life

Tips for heathy life

Kamis, 22 Januari 2009

What is UML?

Unified Modeling Language (UML) is a standard specification language for the document, specify, and build software systems. UML is not based on a specific programming language. UML standard specification used as the de facto standard by the OMG (Object Management Group) in object-oriented 1997.UML have some standard notation.

These specifications and standards became popular because prior to the UML, there have been a wide variety of different specifications. It is difficult for communication among software developers. For that some very influential specification developers gathered to create a new standard. UML pioneered by Grady Booch, James Rumbaugh in 1994 and later Ivar Jacobson.

UML to describe OOP (Object Oriented Programming) with some diagrams, including:

Structure diagram:

1 Diagram class

2 Diagram object

3 Diagram component

4. deployment diagram

Diagram of behavior:

1. use-case diagram

2 Diagram order / sequence

3 Diagram collaboration

4. statechart diagram

5. activity diagram

Quoted from various sources.

Rabu, 21 Januari 2009

Recurrence program in C++

public class Recurrence program {

public static void main(String[] args) {

int i;
for(i=0;i<=100; i++)
{
System.out.println("angka : "+ i);
}

}

}

Determine Prime Numbers in Java programme

I want to share program that Determine Prime Numbers in Java programme. You can use this code but if you copy this code and paste in your blog/website, please insert this link of article.

package prima;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class BilPrima {

public BilPrima() {
}

public static void main(String[] args) throws IOException{
int i,batasBil=0;
BufferedReader bf=new BufferedReader(
new InputStreamReader(System.in));
System.out.println("Masukkan Batas Bil:");
batasBil=Integer.parseInt(bf.readLine());
for(i=2;i<=batasBil;i++){
int j;
for (j=2;j<=i;j++){
int n=i%j;
if(n==0){
break;
}
}
if (i==j){
System.out.println(i);
}

}

}

}