google

Sabtu, 27 Desember 2008

Biggest Number

public class B{
public static void main(String[]args){

Integer a=6;
int b=14;
int c=18;

int x=(a>b)?a:b;
int y=(b>c)?b:c;

if (x>y){
System.out.println("Angka terbesar:"+x);
}
else {
System.out.println("Angka terbesar:"+y);
}




}
}


http://dayaprime.com

Get Date

import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;

public class DateUtility {

/* Add Day/Month/Year to a Date
add() is used to add values to a Calendar object.
You specify which Calendar field is to be affected by the operation
(Calendar.YEAR, Calendar.MONTH, Calendar.DATE).
*/

public static final String DATE_FORMAT = "dd-MM-yyyy";
//See Java DOCS for different date formats
// public static final String DATE_FORMAT = "yyyy-MM-dd";

public static void addToDate() {
System.out.println("1. Add to a Date Operation\n");
SimpleDateFormat sdf = new SimpleDateFormat(DATE_FORMAT);
//Gets a calendar using the default time zone and locale.
Calendar c1 = Calendar.getInstance();
Date d1 = new Date();
// System.out.println("Todays date in Calendar Format : "+c1);
System.out.println("c1.getTime() : " + c1.getTime());
System.out.println("c1.get(Calendar.YEAR): "+ c1.get(Calendar.YEAR));
System.out.println("Todays date in Date Format : " + d1);
c1.set(1999, 0, 20); //(year,month,date)
System.out.println("c1.set(1999,0 ,20) : " + c1.getTime());
c1.add(Calendar.DATE, 20);
System.out.println("Date + 20 days is : "+ sdf.format(c1.getTime()));
System.out.println();
System.out.println("-------------------------------------");

http://dayaprime.com
}

Colour TUner

/*
* FormColor.java
*
* Created on 22 November 2008, 21:15
*/

package com.nawolo.colortuner;

import java.awt.Color;
import javax.swing.JPanel;
import javax.swing.SpinnerNumberModel;


/**
*
* @author Gateway
*/
public class FormColor extends javax.swing.JFrame {
int red,green,blue;
SpinnerNumberModel modelRed, modelGreen,modelBlue;

/** Creates new form FormColor */
public FormColor() {
initComponents();

Integer value=new Integer(225);
Integer min=new Integer (0);
Integer max=new Integer (225);
Integer step=new Integer (1);

modelRed=new SpinnerNumberModel(value,min,max,step);
modelGreen=new SpinnerNumberModel(value,min,max,step);
modelBlue=new SpinnerNumberModel(value,min,max,step);

jSpinner1.setModel(modelRed);
jSpinner2.setModel(modelGreen);
jSpinner3.setModel(modelBlue);
red=green=blue=255;
changePanelColor();

}

private void changePanelColor(){
Color clr=new Color (red, green, blue);
jPanel1.setBackground(clr);
}
/** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
*/
// //GEN-BEGIN:initComponents
private void initComponents() {
jLabel1 = new javax.swing.JLabel();
jLabel2 = new javax.swing.JLabel();
jLabel3 = new javax.swing.JLabel();
jSpinner1 = new javax.swing.JSpinner();
jSpinner2 = new javax.swing.JSpinner();
jSpinner3 = new javax.swing.JSpinner();
jPanel1 = new javax.swing.JPanel();
jButton1 = new javax.swing.JButton();

setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setTitle("ColorTuner");
jLabel1.setText("Red");

jLabel2.setText("Green");

jLabel3.setText("Blue");

jSpinner1.setFont(new java.awt.Font("Courier New", 0, 18));
jSpinner1.addChangeListener(new javax.swing.event.ChangeListener() {
public void stateChanged(javax.swing.event.ChangeEvent evt) {
jSpinner1StateChanged(evt);
}
});

jSpinner2.setFont(new java.awt.Font("Courier New", 0, 18));
jSpinner2.addChangeListener(new javax.swing.event.ChangeListener() {
public void stateChanged(javax.swing.event.ChangeEvent evt) {
jSpinner2StateChanged(evt);
}
});

jSpinner3.setFont(new java.awt.Font("Courier New", 0, 18));
jSpinner3.addChangeListener(new javax.swing.event.ChangeListener() {
public void stateChanged(javax.swing.event.ChangeEvent evt) {
jSpinner3StateChanged(evt);
}
});

jPanel1.setBackground(new java.awt.Color(204, 255, 51));
jPanel1.setBorder(javax.swing.BorderFactory.createMatteBorder(1, 1, 1, 1, new java.awt.Color(255, 255, 255)));
javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
jPanel1.setLayout(jPanel1Layout);
jPanel1Layout.setHorizontalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 157, Short.MAX_VALUE)
);
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 90, Short.MAX_VALUE)
);

jButton1.setText("Clear");
jButton1.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
jButton1MouseClicked(evt);
}
});
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});

javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel2)
.addComponent(jLabel1)
.addComponent(jLabel3))
.addGap(28, 28, 28)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jSpinner1, javax.swing.GroupLayout.PREFERRED_SIZE, 56, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jSpinner2, javax.swing.GroupLayout.PREFERRED_SIZE, 56, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jSpinner3, javax.swing.GroupLayout.PREFERRED_SIZE, 56, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(37, 37, 37)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jButton1))
.addContainerGap())
);

layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {jSpinner1, jSpinner2, jSpinner3});

layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(21, 21, 21)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jButton1)
.addGap(43, 43, 43))
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(jLabel1)
.addComponent(jSpinner1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(jSpinner2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel2))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 10, Short.MAX_VALUE)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(jSpinner3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel3))
.addGap(64, 64, 64))))
);
java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
setBounds((screenSize.width-337)/2, (screenSize.height-219)/2, 337, 219);
}//
//GEN-END:initComponents

private void jButton1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton1MouseClicked
// TODO add your handling code here:
red=green=blue=255;
changePanelColor();
}//GEN-LAST:event_jButton1MouseClicked

private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
// TODO add your handling code here:

}//GEN-LAST:event_jButton1ActionPerformed

private void jSpinner3StateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_jSpinner3StateChanged
// TODO add your handling code here:
blue=modelBlue.getNumber().intValue();
changePanelColor();

}//GEN-LAST:event_jSpinner3StateChanged

private void jSpinner2StateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_jSpinner2StateChanged
// TODO add your handling code here:
green=modelGreen.getNumber().intValue();
changePanelColor();
}//GEN-LAST:event_jSpinner2StateChanged

private void jSpinner1StateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_jSpinner1StateChanged
// TODO add your handling code here:
red=modelRed.getNumber().intValue();
changePanelColor();
}//GEN-LAST:event_jSpinner1StateChanged

/**
* @param args the command line arguments
*/
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new FormColor().setVisible(true);
}
});
}

// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JButton jButton1;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel3;
private javax.swing.JPanel jPanel1;
private javax.swing.JSpinner jSpinner1;
private javax.swing.JSpinner jSpinner2;
private javax.swing.JSpinner jSpinner3;
// End of variables declaration//GEN-END:variables

}

http://dayaprime.com

Parse from String to Integer

Count1.java

import javax.swing.JOptionPane;
public class Count1{


public static void main (String [] args){


String jml1=JOptionPane.showInputDialog("Enter first number:");
String jml2=JOptionPane.showInputDialog("Enter Second number:");
Integer number=Integer.parseInt(jml1);
Integer number1=Integer.parseInt(jml2);
JOptionPane.showMessageDialog(null,"Hasil:"+(number+number1));
}

}


CobaCount.java

import javax.swing.JOptionPane;
public class CobaCount{
public static void main (String[]args ){
Count1 Countdoank=new Count1();
JOptionPane.showMessageDialog(null,Countdoank.Hasil());
System.exit(0);
}
}

http://dayaprime.com

Date Format

import java.awt.*;
import java.awt.event.*;
import java.util.*;
import java.text.*;

/**
* A simple AWT GUI to let you try out the
* SimpleDateFormat class.
*/
public class TryDateFormat extends Frame
{
private Label timeCaption;
private Label formatCaption;
private TextField timeValue;
private TextField formatValue;
private Button formatButton;
private Button helpButton;
private Button exitButton;
private TextArea resultArea;
private Dialog helpDialog;

public TryDateFormat() {
super("Try Java SimpleDateFormat!");
Date now = new Date();
Panel ucPanel = new Panel();
Panel uwPanel = new Panel();
Panel usPanel = new Panel();
Panel uPanel = new Panel();

ucPanel.setLayout(new GridLayout(2,1));
uwPanel.setLayout(new GridLayout(2,1));
usPanel.setLayout(new FlowLayout(FlowLayout.RIGHT));
uPanel.setLayout(new BorderLayout());
uPanel.setBackground(Color.green);

timeCaption = new Label("Time value:", Label.RIGHT);
timeValue = new TextField("" + now.getTime());
timeValue.setBackground(Color.white);
formatCaption = new Label("Format specifier:", Label.RIGHT);
formatValue = new TextField("yyyyMMddHHmmss");
formatValue.setBackground(Color.white);
formatButton = new Button("Do Format");
helpButton = new Button("Help");
exitButton = new Button("Exit");
resultArea = new TextArea(12,52);
resultArea.setFont(new Font("Monospaced", Font.PLAIN, 12));
resultArea.setBackground(Color.white);

uwPanel.add(timeCaption);
uwPanel.add(formatCaption);
uPanel.add("West", uwPanel);
ucPanel.add(timeValue);
ucPanel.add(formatValue);
uPanel.add("Center", ucPanel);
usPanel.add(formatButton);
usPanel.add(helpButton);
usPanel.add(exitButton);
uPanel.add("South", usPanel);
this.add("North", uPanel);
this.add("Center", resultArea);

helpDialog = new Dialog(this, "TryDateFormat Help", false);
StringBuffer buf = new StringBuffer(1500);
int maxlen = 0;
for(int i = 0; i < help.length; i++) {
buf.append(" "); buf.append(help[i]); buf.append("\n");
if (help[i].length() > maxlen) maxlen = help[i].length();
}
TextArea helptext = new TextArea(20, maxlen + 2);
helptext.setText(buf.toString());
helptext.setEditable(false);
helptext.setFont(new Font("Monospaced", Font.PLAIN, 11));
helpDialog.add("Center", helptext);
Button dismissButton = new Button("Dismiss");
helpDialog.add("South", dismissButton);
helpDialog.pack();


// event handlers
exitButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
System.exit(0);
} });
helpButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
helpDialog.show();
} });
dismissButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
helpDialog.hide();
} });
helpDialog.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
helpDialog.hide();
} });
this.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
System.exit(0);
} });
formatButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
doFormat();
} });

this.pack();
this.show();
}

String help[] = {
"To use this program, enter a time value",
"in the top text field, and a SimpleDateFormat",
"format specifier in the second text field,",
"then click on the Format button. Results",
"appear in the text area at the bottom of",
"the window.",
"",
"The time value must be in seconds since the",
"epoch, midnight 1/1/1970.",
"",
"The format specifier is simply a pattern",
"string; certain letters in the pattern will",
"be replaced by values of time or date, ",
"giving complete control over the formatting.",
"The most useful format codes are:",
"",
"Symbol Meaning Presentation Ex.",
"------ ------- ------------ ----",
"G era designator (Text) AD",
"y year (Number) 1996",
"M month in year (Text) July",
"M month in year (Number) 07",
"d day in month (Number) 10",
"h hour in am/pm (Number) 12",
"H hour in day (Number) 0",
"m minute in hour (Number) 30",
"s second in minute (Number) 55",
"S millisecond (Number) 978",
"E day in week (Text) Tue",
"D day in year (Number) 189",
"a am/pm marker (Text) PM",
"z time zone (Text) PST",
"' quote text (Text) 'at'",
"",
"So, for example this format: h:mm a",
"gives this result: 12:08 PM",
};

public void doFormat() {
long tv = 1;
String tvs = timeValue.getText();
try { tv = Long.parseLong(tvs); }
catch (NumberFormatException nfe) { timeValue.setText("1"); }

String fmt = formatValue.getText();

Date d = new Date(tv);
/* this uses the current Locale, supposedly */
String res = "";
try {
SimpleDateFormat sdf = new SimpleDateFormat(fmt);
res = sdf.format(d);
}
catch (Exception e) {
res = "<<" + e.getMessage() + ">>";
}

resultArea.append("At time: " + tv);
resultArea.append("\n");
resultArea.append("Using format: ");
resultArea.append(fmt);
resultArea.append("\n");
resultArea.append("gives result: ");
resultArea.append(res);
resultArea.append("\n\n");
}

public static void main(String [] args) {
TryDateFormat tdf = new TryDateFormat();
}
}
http://dayaprime.com

Swich function

import javax.swing.JOptionPane;

public class Latihan{

public static void main (String [] args) {

String angka = JOptionPane.showInputDialog("Masukkan Angka : ");
int nilai = Integer.parseInt(angka);
char nilHuruf;

switch(nilai){
case 4 : nilHuruf = 'A';break;
case 3 : nilHuruf = 'B';break;
case 2 : nilHuruf = 'C';break;
case 1 : nilHuruf = 'D';break;
case 0 : nilHuruf = 'E';break;
default : nilHuruf = 'E';break;
}

JOptionPane.showMessageDialog(null, "Nilai Angka = " + nilai +"\n"+ "Nilai Huruf = " + nilHuruf );

}
}
http://dayaprime.com

Prime number

import javax.swing.JOptionPane;

public class Prima {
public static void main (String [] args) {
String numString;
int numInt;
int i;
int jum=0;

numString = JOptionPane.showInputDialog("Masukkan Angka Bilangan Prima : ");
numInt = Integer.parseInt(numString);

for (i=1 ; i<=numInt ; i++){
if (numInt % i == 0) {
jum = jum + 1;
}
}

if (jum==2 && numInt !=1){
JOptionPane.showMessageDialog(null, "Bilangan Prima","Pesan",1);
}

else{JOptionPane.showMessageDialog(null, "Bukan Bilangan Prima","Pesan",1);
}
}
}

Get Input Keyboard

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

public class Tugas2 {
public static void main (String[]args){
BufferedReader dataIn=new BufferedReader(new InputStreamReader(System.in));

String n1=" ";
String n2=" ";



System.out.println("Please Enter First Number :");
try {
n1=dataIn.readLine();
// Integer numi=Integer.parseInt(n1);
}
catch (IOException e){
System.out.println("Error");
}
//------------------------------------
System.out.println("Please Enter Second Number :");
try {
n2=dataIn.readLine();
Integer numis=Integer.parseInt(n2);
Integer numi=Integer.parseInt(n1);
System.out.println(numi+numis);
}
catch (IOException e){
System.out.println("Error");

}




}
}

http://dayaprime.com

Calculator

import java.awt.*;
import javax.swing.*;
import java.awt.event.*;



/* 25Oct2005: Designed and programmed by jfernandez.ph */
/* 13Nov2005: Designed and programmed by jfernandez.ph */



public class Calculator implements ActionListener{


char o;
int ctr=0;
String value="", cv="", oBtn;
Double answer, v1, v2;
Double NumberConverted;


Frame f;
Panel p1, p2, p3, p4, p5, p6;
private TextField tField;
private Menu EditMenu;
private MenuBar menuBar;
private MenuItem fmi1, fmi2, fmi3;
private Button num0, num1, num2, num3, num4, num5, num6, num7, num8,
num9;
private Button bAdd, bSub, bMul, bDiv, bPer, bSqrt, bFrac, bInt, bDot,
bCE, equals, backspace, clear;



/* 25Oct2005: Designed and programmed by jfernandez.ph */
/* 13Nov2005: Designed and programmed by jfernandez.ph */


Calculator(){
f = new Frame("Calculator");

menuBar = new MenuBar();
EditMenu = new Menu ("Edit");

fmi1 = new MenuItem(" Copy ");
fmi2 = new MenuItem(" Paste ");
fmi3 = new MenuItem(" Quit ");

EditMenu.add(fmi1);
EditMenu.add(fmi2);
EditMenu.addSeparator();
EditMenu.add(fmi3);

p1 = new Panel();
p2 = new Panel();
p3 = new Panel();
p4 = new Panel();
p5 = new Panel();
p6 = new Panel();

tField = new TextField(35);

num0 = new Button ("0");
num1 = new Button ("1");
num2 = new Button ("2");
num3 = new Button ("3");
num4 = new Button ("4");
num5 = new Button ("5");
num6 = new Button ("6");
num7 = new Button ("7");
num8 = new Button ("8");
num9 = new Button ("9");
bAdd = new Button ("+");
bSub = new Button ("-");
bMul = new Button ("x");
bDiv = new Button ("/");
bPer = new Button ("%");
bSqrt = new Button ("sqrt");
bFrac = new Button ("1/x");
bInt = new Button ("+/-");
bDot = new Button (".");
bCE = new Button ("CE");
equals = new Button ("=");
backspace = new Button ("Backspace");
clear = new Button ("C");
}



/* 25Oct2005: Designed and programmed by jfernandez.ph */
/* 13Nov2005: Designed and programmed by jfernandez.ph */



public void launchFrame(){

tField.setText("0.");
tField.setEnabled(false);

menuBar.add(EditMenu);

p2.add(backspace);
p2.add(bCE);
p2.add(clear);

p3.add(num7);
p3.add(num8);
p3.add(num9);
p3.add(bDiv);
p3.add(bSqrt);

p4.add(num4);
p4.add(num5);
p4.add(num6);
p4.add(bMul);
p4.add(bPer);

p5.add(num1);
p5.add(num2);
p5.add(num3);
p5.add(bSub);
p5.add(bFrac);

p6.add(num0);
p6.add(bInt);
p6.add(bDot);
p6.add(bAdd);
p6.add(equals);

p2.setLayout(new GridLayout (1, 3, 2, 2) );
p3.setLayout(new GridLayout (1, 3, 2, 2) );
p4.setLayout(new GridLayout (1, 3, 2, 2) );
p5.setLayout(new GridLayout (1, 3, 2, 2) );
p6.setLayout(new GridLayout (1, 3, 2, 2) );

f.setLayout(new GridLayout (6, 1) );
f.setResizable(false);
f.setSize(300,250);
f.add(tField);
f.add(p2);
f.add(p3);
f.add(p4);
f.add(p5);
f.add(p6);
f.setVisible(true);
f.setMenuBar(menuBar);
f.pack();

// ACTION LISTENERS
clear.addActionListener(this);
bCE.addActionListener(this);

num0.addActionListener(this);
num1.addActionListener(this);
num2.addActionListener(this);
num3.addActionListener(this);
num4.addActionListener(this);
num5.addActionListener(this);
num6.addActionListener(this);
num7.addActionListener(this);
num8.addActionListener(this);
num9.addActionListener(this);

bAdd.addActionListener(this);
bSub.addActionListener(this);
bMul.addActionListener(this);
bDiv.addActionListener(this);
bPer.addActionListener(this);

bInt.addActionListener(this);
bSqrt.addActionListener(this);
bFrac.addActionListener(this);
bDot.addActionListener(this);

equals.addActionListener(this);
backspace.addActionListener(this);

fmi1.addActionListener(this);
fmi2.addActionListener(this);
fmi3.addActionListener(this);
}



/* 25Oct2005: Designed and programmed by jfernandez.ph */
/* 13Nov2005: Designed and programmed by jfernandez.ph */




/* |------------ START OF ACTION EVENTS ------------| */


public void actionPerformed(ActionEvent a){


try{
/* |-------- Handling Exceptions ---------| */


if(a.getSource()==num0){
value+=0;
tField.setText(value);
}
if(a.getSource()==num1){
value+=1;
tField.setText(value);
}
if(a.getSource()==num2){
value+=2;
tField.setText(value);
}
if(a.getSource()==num3){
value+=3;
tField.setText(value);
}
if(a.getSource()==num4){
value+=4;
tField.setText(value);
}
if(a.getSource()==num5){
value+=5;
tField.setText(value);
}
if(a.getSource()==num6){
value+=6;
tField.setText(value);
}
if(a.getSource()==num7){
value+=7;
tField.setText(value);
}
if(a.getSource()==num8){
value+=8;
tField.setText(value);
}
if(a.getSource()==num9){
value+=9;
tField.setText(value);
}



/* 25Oct2005: Designed and programmed by jfernandez.ph */
/* 13Nov2005: Designed and programmed by jfernandez.ph */



if (a.getSource() == bAdd){
v1 = Double.parseDouble( tField.getText() );
ctr=0;
o = '+';
value="";
tField.setText("" +value);
}

if (a.getSource() == bSub){
v1 = Double.parseDouble( tField.getText() );
ctr=0;
o = '-';
value="";
tField.setText("" +value);
}

if (a.getSource() == bMul){
v1 = Double.parseDouble( tField.getText() );
ctr=0;
o = 'x';
value="";
tField.setText("" +value);
}

if (a.getSource() == bDiv){
v1 = Double.parseDouble( tField.getText() );
ctr=0;
o = '/';
value="";
tField.setText("" +value);
}

if (a.getSource() == bPer){
v1 = Double.parseDouble( tField.getText() );
ctr=0;
value="";
answer = (v1/100);
tField.setText("" +answer);
}



/* 25Oct2005: Designed and programmed by jfernandez.ph */
/* 13Nov2005: Designed and programmed by jfernandez.ph */



/* |-- EQUALS ACTION --| */

if(a.getSource()==equals){
value="";
v2 = Double.parseDouble(tField.getText());

if(o=='+'){
ctr=0;
answer = v1 + v2;
tField.setText("" +answer);
value=""; v1=null; v2=null;
}
else if(o=='-'){
ctr=0;
answer = v1 - v2;
tField.setText("" +answer);
value=""; v1=null; v2=null;
}
else if(o=='x'){
ctr=0;
answer = v1 * v2;
tField.setText("" +answer);
value=""; v1=null; v2=null;
}
else if(o=='/'){
ctr=0;
answer = v1 / v2;
tField.setText("" +answer);
value=""; v1=null; v2=null;
}
else if(o=='%'){
ctr=0;
answer = v1 % v2;
tField.setText("" +answer);
value=""; v1=null; v2=null;
}
else{}
}

/* |-- EQUALS ACTION --| */



/* 25Oct2005: Designed and programmed by jfernandez.ph */
/* 13Nov2005: Designed and programmed by jfernandez.ph */



/* |-- Clear --| */
if(a.getSource()==clear){
ctr=0;
v1=null;
v2=null;
value="";
answer=0.;
tField.setText("0.");

}

if(a.getSource()==bCE){
ctr=0;
value="";
tField.setText("0.");
}


/* |-- Point --| */
if(a.getSource() == bDot){
if(ctr==0){
value+=".";
ctr+=1;
tField.setText("" +value);
}
else{
System.out.print("");
}

}



/* |-- Back Space --| */
if(a.getSource() == backspace){
value = value.substring(0, value.length()-1 );
tField.setText("" +value);
}



/* |-- Square Root --| */
if(a.getSource() == bSqrt){
ctr=0;
value = "";
v1 = Math.sqrt( Double.parseDouble( tField.getText() ) );
tField.setText("" +v1);
}



/* |-- Integer --| */
if(a.getSource() == bInt){
ctr=0;
NumberConverted = ( Double.parseDouble(tField.getText()) * -1 );
value = "";
tField.setText("" +NumberConverted);
}



/* |-- Reciprocal --| */
if(a.getSource() == bFrac){
ctr=0;
value = "";
Double NumberContainer = ( 1 / Double.parseDouble(
tField.getText() ) );
tField.setText("" +NumberContainer);
}


// ------------ Menu Item Actions ------------ //

if(a.getSource() == fmi1){
cv = tField.getText();
}

if(a.getSource() == fmi2){
tField.setText("" +cv);
}

if(a.getSource() == fmi3){
System.exit(0);
}

} // End of Try


/* |-------- Attempting To Catch Runtime Errors ---------| */

catch(StringIndexOutOfBoundsException str){}
catch(NumberFormatException nfe){}
catch(NullPointerException npe){}

} // END OF ACTION EVENTS



/* 25Oct2005: Designed and programmed by jfernandez.ph */
/* 13Nov2005: Designed and programmed by jfernandez.ph */


public static void main (String args[]){
Calculator s = new Calculator();
s.launchFrame();
}
}

http://dayaprime.com

Calculator

//


http://dayaprime.com

Rabu, 03 Desember 2008

Pengenalan JAVA

Sejarah perkembangan Java

Bahasa pemrograman Java pertama lahir dari The Green Project, yang berjalan selama 18 bulan, dari awal tahun 1991 hingga musim panas 1992. Proyek tersebut belum menggunakan versi yang dinamakan Oak. Proyek ini dimotori oleh Patrick Naughton, Mike Sheridan, James Gosling dan Bill Joy, beserta sembilan pemrogram lainnya dari Sun Microsystems. Salah satu hasil proyek ini adalah maskot Duke yang dibuat oleh Joe Palrang.

Pertemuan proyek berlangsung di sebuah gedung perkantoran Sand Hill Road di Menlo Park. Sekitar musim panas 1992 proyek ini ditutup dengan menghasilkan sebuah program Java Oak pertama, yang ditujukan sebagai pengendali sebuah peralatan dengan teknologi layar sentuh (touch screen), seperti pada PDA sekarang ini. Teknologi baru ini dinamai "*7" (Star Seven).

Setelah era Star Seven selesai, sebuah anak perusahaan TV kabel tertarik ditambah beberapa orang dari proyek The Green Project. Mereka memusatkan kegiatannya pada sebuah ruangan kantor di 100 Hamilton Avenue, Palo Alto.

Perusahaan baru ini bertambah maju: jumlah karyawan meningkat dalam waktu singkat dari 13 menjadi 70 orang. Pada rentang waktu ini juga ditetapkan pemakaian Internet sebagai medium yang menjembatani kerja dan ide di antara mereka. Pada awal tahun 1990-an, Internet masih merupakan rintisan, yang dipakai hanya di kalangan akademisi dan militer.

Mereka menjadikan perambah (browser) Mosaic sebagai landasan awal untuk membuat perambah Java pertama yang dinamai Web Runner, terinsipirasi dari film 1980-an, Blade Runner. Pada perkembangan rilis pertama, Web Runner berganti nama menjadi Hot Java.

Pada sekitar bulan Maret 1995, untuk pertama kali kode sumber Java versi 1.0a2 dibuka. Kesuksesan mereka diikuti dengan untuk pemberitaan pertama kali pada surat kabar San Jose Mercury News pada tanggal 23 Mei 1995.

Sayang terjadi perpecahan di antara mereka suatu hari pada pukul 04.00 di sebuah ruangan hotel Sheraton Palace. Tiga dari pimpinan utama proyek, Eric Schmidt dan George Paolini dari Sun Microsystems bersama Marc Andreessen, membentuk Netscape.

Nama Oak, diambil dari pohon oak yang tumbuh di depan jendela ruangan kerja "bapak java", James Gosling. Nama Oak ini tidak dipakai untuk versi release Java karena sebuah perangkat lunak sudah terdaftar dengan merek dagang tersebut, sehingga diambil nama penggantinya menjadi "Java". Nama ini diambil dari kopi murni yang digiling langsung dari biji (kopi tubruk) kesukaan Gosling.

[sunting] Versi Awal

Versi awal Java ditahun 1996 sudah merupakan versi release sehingga dinamakan Java Versi 1.0. Java versi ini menyertakan banyak paket standar awal yang terus dikembangkan pada versi selanjutnya:

* java.lang: Peruntukan kelas elemen-elemen dasar.
* java.io: Peruntukan kelas input dan output, termasuk penggunaan berkas.
* java.util: Peruntukan kelas pelengkap seperti kelas struktur data dan kelas kelas penanggalan.
* java.net: Peruntukan kelas TCP/IP, yang memungkinkan berkomunikasi dengan komputer lain menggunakan jaringan TCP/IP.
* java.awt: Kelas dasar untuk aplikasi antarmuka dengan pengguna (GUI)
* java.applet: Kelas dasar aplikasi antar muka untuk diterapkan pada penjelajah web.


[sunting] Kelebihan

* Multiplatform. Kelebihan utama dari Java ialah dapat dijalankan di beberapa platform / sistem operasi komputer, sesuai dengan prinsip tulis sekali, jalankan di mana saja. Dengan kelebihan ini pemrogram cukup menulis sebuah program Java dan dikompilasi (diubah, dari bahasa yang dimengerti manusia menjadi bahasa mesin / bytecode) sekali lalu hasilnya dapat dijalankan di atas beberapa platform tanpa perubahan. Kelebihan ini memungkinkan sebuah program berbasis java dikerjakan diatas operating system Linux tetapi dijalankan dengan baik di atas Microsoft Windows. Platform yang didukung sampai saat ini adalah Microsoft Windows, Linux, Mac OS dan Sun Solaris. Penyebanya adalah setiap sistem operasi menggunakan programnya sendiri-sendiri (yang dapat diunduh dari situs Java) untuk meninterpretasikan bytecode tersebut.

* OOP (Object Oriented Programming - Pemrogram Berorientasi Objek) yang artinya semua aspek yang terdapat di Java adalah Objek. Java merupakan salah satu bahasa pemrograman berbasis oebjek secara murni. Semua tipe data diturunkan dari kelas dasar yang disebut Object. Hal ini sangat memudahkan pemrogram untuk mendesain, membuat, mengembangkan dan mengalokasi kesalahan sebuah program dengan basis Java secara cepat, tepat, mudah dan terorganisir. Kelebihan ini menjadikan Java sebagai salah satu bahasa pemograman termudah, bahkan untuk fungsi fungsi yang advance seperti komunikasi antara komputer sekalipun.

* Perpustakaan Kelas Yang Lengkap, Java terkenal dengan kelengkapan library/perpustakaan (kumpulan program program yang disertakan dalam pemrograman java) yang sangat memudahkan dalam penggunaan oleh para pemrogram untuk membangun aplikasinya. Kelengkapan perpustakaan ini ditambah dengan keberadaan komunitas Java yang besar yang terus menerus membuat perpustakaan-perpustakaan baru untuk melingkupi seluruh kebutuhan pembangunan aplikasi.

* Bergaya C++, memiliki sintaks seperti bahasa pemrograman [C++] sehingga menarik banyak pemrogram C++ untuk pindah ke Java. Saat ini pengguna Java sangat banyak, sebagian besar adalah pemrogram C++ yang pindah ke Java. Universitas-universitas di Amerika juga mulai berpindah dengan mengajarkan Java kepada murid-murid yang baru karena lebih mudah dipahami oleh murid dan dapat berguna juga bagi mereka yang bukan mengambil jurusan komputer.

* Pengumpulan sampah otomatis, memiliki fasilitas pengaturan penggunaan memori sehingga para pemrogram tidak perlu melakukan pengaturan memori secara langsung (seperti halnya dalam bahasa C++ yang dipakai secara luas).

[sunting] Kekurangan

* Tulis sekali, perbaiki di mana saja - Masih ada beberapa hal yang tidak kompatibel antara platform satu dengan platform lain. Untuk J2SE, misalnya SWT-AWT bridge yang sampai sekarang tidak berfungsi pada Mac OS X.

* Mudah didekompilasi. Dekompilasi adalah proses membalikkan dari kode jadi menjadi kode sumber. Ini dimungkinkan karena koe jadi Java merupakan bytecode yang menyimpan banyak atribut bahasa tingkat tinggi, seperti nama-nama kelas, metode, dan tipe data. Hal yang sama juga terjadi pada Microsoft .NET Platform. Dengan demikian, algoritma yang digunakan program akan lebih sulit disembunyikan dan mudah dibajak/direverse-engineer.

* Penggunaan memori yang banyak. Penggunaan memori untuk program berbasis Java jauh lebih besar daripada bahasa tingkat tinggi generasi sebelumnya seperti C/C++ dan Pascal (lebih spesifik lagi, Delphi dan Object Pascal). Biasanya ini bukan merupakan masalah bagi pihak yang menggunakan teknologi terbaru (karena trend memori terpasang makin murah), tetapi menjadi masalah bagi mereka yang masih harus berkutat dengan mesin komputer berumur lebih dari 4 tahun.

[sunting] Contoh Kode Program Sederhana Dalam Java

Contoh program Halo dunia yang ditulis menggunakan bahasa pemrograman Java adalah sebagai berikut:

class HaloDunia
{
public static void main(String[] argumen)
{
System.out.println("Halo Dunia");
}
}

[sunting] Tahap Kompilasi Java

1. Tulis / Ubah. Pemrogram menulis program dan menyimpannya di media dalam bentuk berkas '.java'.
2. Kompilasi. Pengkompilasi membentuk bytecodes dari program menjadi bentuk berkas '.class'
3. Muat. Pemuat kelas memuat bytecodes ke memori
4. Verifikasi. Peng-verifikasi memastikan bytecodes tidak mengganggu sistem keamanan Java
5. Jalankan. Penerjemah menerjemahkan bytecodes ke bahasa mesin

[sunting] Integrated Development Environment

Banyak pihak telah membuat IDE (Integrated Development Environment - Lingkungan Pengembangan Terintegrasi) untuk Java. Yang populer saat ini (Juli 2006) antara lain:

* Dr. Java, program gratis yang dikembangkan oleh Universitas Rice, AS
* BlueJ, program gratis yang dikembangkan oleh Universitas Monash, Australia
* NetBeans (open source- Common Development and Distribution License (CDDL))

NetBeans disponsori Sun Microsystems, dan versi terkininya memilki Matisse, sebuah GUI Editor yang menurut pendapat umum merupakan yang terbaik.[rujukan?]

* Eclipse JDT (open source- Eclipse Public License)

Eclipse dibuat dari kerja sama antara perusahaan-perusahaan anggota 'Eclipse Foundation' (beserta individu-individu lain). Banyak nama besar yang ikut dalam 'Eclipse Foundation', termasuk IBM, BEA, Intel, Nokia, Borland. Eclipse bersaing langsung dengan Netbeans IDE. Plugin tambahan pada Eclipse jauh lebih banyak dan bervariasi dibandingkan IDE lainnya.

* IntelliJ IDEA (commercial, free 30-day trial)
* Oracle JDeveloper (free)
* Xinox JCreator (ada versi berbayar maupun free)

JCreator ditulis dalam C/C++ sehingga lebih cepat (dan menggunakan memori lebih sedikit) dari kebanyakan IDE.

http://dayaprime.com

Use if && in JAVA

Script Tugas3.java

public class Tugas3 {
public static void main (String[]args){

//variabel Ket untuk mendeklarisakan hasil proses1
String Ket=" ";
//variabel usia untuk menentukan inputan usia
int usia=20;
//variabel input untuk menentukan inputan 1 & 0
String input="0";
//variabel Kel untuk
String Kel="";


//Proses1
Ket=(!(usia>17)?"ABG":"Dewasa");

//jika variabel input benilai 0 dan variabel Ket bernilai ABG
if ((input=="0") && (Ket=="ABG")) {

System.out.println("Keterangan: " +Ket+" dan Anak cowok");
}
//jika variabel input benilai 0 dan variabel Ket bernilai Dewasa
else if ((input=="0") && (Ket=="Dewasa")) {
System.out.println("Keterangan: " +Ket+" dan Perjaka");

}
//jika variabel input benilai 1 dan variabel Ket bernilai ABG
else if ((input=="1") && (Ket=="ABG")) {
System.out.println("Keterangan: " +Ket+" dan Anak Cewek");

}



//jika variabel input benilai 1 dan variabel Ket bernilai Dewasa
else if ((input=="1") && (Ket=="Dewasa")) {
System.out.println("Keterangan: " +Ket+" dan Gadis");

}

//jika variabel input tidak bernilai 0 & 1
else {
System.out.println("Keterangan: " +Ket+" dan status tidak diketahui ");
}


}
}

Penjelasan :Pada variabel input 0=Laki-laki & 1=Perempuan
• Jika pada variabel usia diisikan tidak lebih dari 17 dan pada variabel input diisikan 0.Maka akan pada program akan dicetak “Keterangan :ABG dan status Anak Cowok”.
• Jika pada variabel usia diisikan lebih dari 17 dan pada variabel input diisikan 0.Maka akan pada program akan dicetak “Keterangan :Dewasa dan status Perjaka”.
• Jika pada variabel usia diisikan tidak lebih dari 17 dan pada variabel input diisikan 1.Maka akan pada program akan dicetak “Keterangan :ABG dan status Anak Cewek”.
• Jika pada variabel usia diisikan lebih dari 17 dan pada variabel input diisikan 1.Maka akan pada program akan dicetak “Keterangan :Dewasa dan status Gadis”.
• Jika pada variabel input tidak diisikan 1 atau 0.Maka akan pada program akan dicetak “Keterangan :***** dan status tidak diketahui”.



Tampilan program pada command prompt




















http://dayaprime.com

Implementation Control-if in JAVA programing

Berikut contoh penggunan control if pada Java programming




Script Tugas3.java

import javax.swing.JOptionPane;
public class Tugas3{
private Integer jmlinput;
private String datamahasiswa;

public Tugas3(){
jmlinput=0;
datamahasiswa="Data sahabat:\n";

String jml=JOptionPane.showInputDialog("Berapa data yang akan di inputkan!");
if (!jml.equals("")) jmlinput=Integer.parseInt(jml);

int i=1;
while (i<=jmlinput){ String nama =JOptionPane.showInputDialog("Silahkan isikan Nama:?"); String nilai=JOptionPane.showInputDialog("Silahkan isikan Nilai:?"); Integer angka=Integer.parseInt(nilai); String grade=""; if (angka<60){ grade="E" grade="D" grade="C" grade="B" grade="A" grade="tdk valid" grade="" tugas3ku="new" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipCS30c7WBycBj4Aghyphenhyphent8zMAoarrFgT-T94E-ocT2bT17D8ZAho4CI061XR4a9-8CaGJqPOXsHyTkC_I2JRhCfPJoKY7z6um6qJP3Jr7Rhz97NsQWxUKNPzSz1Fq2e4UAYy58bQxvbBUI/s1600-h/Slide1.JPG">
















http://dayaprime.com

Jumat, 28 November 2008

Education is?

Education encompasses both the teaching and learning of knowledge, proper conduct, and technical competency. It thus focuses on the cultivation of skills, trades or professions, as well as mental, moral and aesthetic development.[1] Formal education consists of systematic instruction, teaching and training by teachers. This consists of the application of pedagogy and the development of curricula. In a liberal education tradition, teachers draw on many different disciplines for their lessons, including psychology, philosophy, linguistics, biology, and sociology. Teachers in specialized professions such as astrophysics, law, or zoology may teach only in a narrow area, usually as professors at institutions of higher learning. There is much specialist instruction in fields of trade for those who want specific skills, such as required to be a pilot, for example. Finally, there is an array of educational opportunity in the informal sphere- such as with museums and libraries. Informal education also includes knowledge and skills learned and refined during the course of life, including education that comes from experience in practicing a profession.

The right to education has been described as a fundamental human right: since 1952, Article 2 of the first Protocol to the European Convention on Human Rights obliges all signatory parties to guarantee the right to education. At world level, the United Nations' International Covenant on Economic, Social and Cultural Rights of 1966 guarantees this right under its Article 13.



Education is a broad concept, referring to all the experiences in which students can learn something:

  • Instruction refers to the intentional facilitating of learning toward identified goals, delivered either by an instructor or other forms.
  • Teaching refers to the actions of a real live instructor designed to impart learning to the student.
  • Training refers to learning with a view toward preparing learners with specific knowledge, skills, or abilities that can be applied immediately upon completion.

[edit] Primary education

Main article: Primary education
Primary school in open air. Teacher (priest) with class from the outskirts of Bucharest, around 1842.

Primary (or elementary) education consists of the first years of formal, structured education. In general, primary education consists of six or seven years of schooling starting at the age of 5 or 6, although this varies between, and sometimes within, countries. Globally, around 70% of primary-age children are enrolled in primary education, and this proportion is rising.[2] Under the Education for All programs driven by UNESCO, most countries have committed to achieving universal enrollment in primary education by 2015, and in many countries, it is compulsory for children to receive primary education. The division between primary and secondary education is somewhat arbitrary, but it generally occurs at about eleven or twelve years of age. Some education systems have separate middle schools, with the transition to the final stage of secondary education taking place at around the age of fourteen. Schools that provide primary education, are mostly referred to as primary schools. Primary schools in these countries are often subdivided into infant schools and junior schools.

[edit] Secondary education

Main article: Secondary education

In most contemporary educational systems of the world, secondary education consists of the second years of formal education that occur during adolescence.[citation needed] It is characterised by transition from the typically compulsory, comprehensive primary education for minors, to the optional, selective tertiary, "post-secondary", or "higher" education (e.g., university, vocational school) for adults.[citation needed] Depending on the system, schools for this period, or a part of it, may be called secondary or high schools, gymnasiums, lyceums, middle schools, colleges, or vocational schools. The exact meaning of any of these terms varies from one system to another. The exact boundary between primary and secondary education also varies from country to country and even within them, but is generally around the seventh to the tenth year of schooling. Secondary education occurs mainly during the teenage years. In the United States and Canada primary and secondary education together are sometimes referred to as K-12 education, and in New Zealand Year 1-13 is used. The purpose of secondary education can be to give common knowledge, to prepare for higher education or to train directly in a profession.

[edit] Higher education

Main article: Higher education
The University of Cambridge is an institute of higher learning.

Higher education, also called tertiary, third stage, or post secondary education, is the non-compulsory educational level that follows the completion of a school providing a secondary education, such as a high school, secondary school, or gymnasium[citation needed]. Tertiary education is normally taken to include undergraduate and postgraduate education, as well as vocational education and training. Colleges and universities are the main institutions that provide tertiary education. Collectively, these are sometimes known as tertiary institutions. Tertiary education generally results in the receipt of certificates, diplomas, or academic degrees.

Higher education includes teaching, research and social services activities of universities, and within the realm of teaching, it includes both the undergraduate level (sometimes referred to as tertiary education) and the graduate (or postgraduate) level (sometimes referred to as graduate school). Higher education in that country generally involves work towards a degree-level or foundation degree qualification. In most developed countries a high proportion of the population (up to 50%) now enter higher education at some time in their lives. Higher education is therefore very important to national economies, both as a significant industry in its own right, and as a source of trained and educated personnel for the rest of the economy.[citation needed]

[edit] Adult education

Adult education has become common in many countries. It takes on many forms, ranging from formal class-based learning to self-directed learning.

[edit] Alternative education

Main article: Alternative education

Alternative education, also known as non-traditional education or educational alternative, is a broad term that may be used to refer to all forms of education outside of traditional education (for all age groups and levels of education). This may include not only forms of education designed for students with special needs (ranging from teenage pregnancy to intellectual disability), but also forms of education designed for a general audience and employing alternative educational philosophies and methods.

Alternatives of the latter type are often the result of education reform and are rooted in various philosophies that are commonly fundamentally different from those of traditional compulsory education. While some have strong political, scholarly, or philosophical orientations, others are more informal associations of teachers and students dissatisfied with certain aspects of traditional education[citation needed]. These alternatives, which include charter schools, alternative schools, independent schools, and home-based learning vary widely, but often emphasize the value of small class size, close relationships between students and teachers, and a sense of community[citation needed].

[edit] Indigenous education

Increasingly, the inclusion of indigenous models of education (methods and content) as an alternative within the scope of formal and non-formal education systems, has come to represent a significant factor contributing to the success of those members of indigenous communities who choose to access these systems, both as students/learners and as teachers/instructors.

As an educational method, the inclusion of indigenous ways of knowing, learning, instructing, teaching and training, has been viewed by many critical and postmodern scholars as important for ensuring that students/learners and teachers/instructors (whether indigenous or non-indigenous) are able to benefit from education in a culturally sensitive manner that draws upon, utilizes, promotes and enhances awareness of indigenous traditions.[3]

For indigenous students/learners and teachers/instructors, the inclusion of these methods often enhances educational effectiveness, success and learning outcomes by providing education that adheres to their own inherent perspectives, experiences and worldview. For non-indigenous students/learners and teachers/instructors, education using such methods often has the effect of raising awareness of the individual traditions and collective experience of surrounding indigenous communities and peoples, thereby promoting greater respect for and appreciation of the cultural realities of these communities and peoples.

In terms of educational content, the inclusion of indigenous knowledge, traditions, perspectives, worldviews and conceptions within curricula, instructional materials and textbooks/coursebooks has been shown to have largely the same effects as the inclusion of indigenous methods in education. Indigenous students/learners and teachers/instructors benefit from enhanced academic effectiveness, success and learning outcomes, while non-indigenous students/learners and teachers/instructors often have greater awareness, respect, and appreciation for indigenous communities and peoples in consequence of the content that is shared during the course of educational pursuits.[4]

A prime example of how indigenous methods and content can be used to promote the above outcomes is demonstrated within higher education in Canada. Due to certain jurisdictions' focus on enhancing academic success for Aboriginal learners and promoting the values of multiculturalism in society, the inclusion of indigenous methods and content in education is often seen as an important obligation and duty of both governmental and educational authorities.[5]

[edit] Emotional/Human education

As academic education is more and more the norm and standard, companies and individuals are looking less at normal education as to what is deemed a good solid educated person/worker. Most well-educated and successful entrepreneurs have high communication skills with humanistic and warm "emotional intelligence".

In certain places, especially in the United States, the term alternative may largely refer to forms of education catering to "at risk" students, as it is, for example, in this definition drafted by the Massachusetts Department of Education. [6]

[edit] Process

[edit] Curriculum

An academic discipline is a branch of knowledge which is formally taught, either at the university, or via some other such method. Functionally, disciplines are usually defined and recognized by the academic journals in which research is published, and by the learned societies to which their practitioners belong.[citation needed] Professors say schooling is 80% psychological, 20% physical effort.[citation needed]

Each discipline usually has several sub-disciplines or branches, and distinguishing lines are often both arbitrary and ambiguous. Examples of broad areas of academic disciplines include the natural sciences, mathematics, computer science, social sciences, humanities and applied sciences.[7]

[edit] Learning modalities

There has been a great deal of work on learning styles over the last two decades. Dunn and Dunn[8] focused on identifying relevant stimuli that may influence learning and manipulating the school environment, at about the same time as Joseph Renzulli[9] recommended varying teaching strategies. Howard Gardner[10] identified individual talents or aptitudes in his Multiple Intelligences theories. Based on the works of Jung, the Myers-Briggs Type Indicator and Keirsey Temperament Sorter[11] focused on understanding how people's personality affects the way they interact personally, and how this affects the way individuals respond to each other within the learning environment. The work of David Kolb and Anthony Gregorc's Type Delineator[12] follows a similar but more simplified approach.

It is currently fashionable to divide education into different learning "modes". The learning modalities[13] are probably the most common:[14]

  • Kinesthetic: learning based on hands-on work and engaging in activities.
  • Visual: learning based on observation and seeing what is being learned.
  • Auditory: learning based on listening to instructions/information.

It is claimed that, depending on their preferred learning modality, different teaching techniques have different levels of effectiveness.[15] A consequence of this theory is that effective teaching should present a variety of teaching methods which cover all three learning modalities so that different students have equal opportunities to learn in a way that is effective for them.[16]

[edit] Teaching

Teachers need the ability to understand a subject well enough to convey its essence to a new generation of students. The goal is to establish a sound knowledge base on which students will be able to build as they are exposed to different life experiences. The passing of knowledge from generation to generation allows students to grow into useful members of society. Good teachers can translate information, good judgment, experience and wisdom into relevant knowledge that a student can understand, retain and pass to others. Studies from the US suggest that the quality of teachers is the single most important factor affecting student performance, and that countries which score highly on international tests have multiple policies in place to ensure that the teachers they employ are as effective as possible. [17]

[edit] Learning is a process you do, not a process that is done to you

Main article: Sudbury model

Some critics of today's schools, of the concept of learning disabilities, of special education, and of response to intervention, take the position that every child has a different learning style and pace and that each child is unique, not only capable of learning but also capable of succeeding.

Sudbury model of democratic education schools assert that there are many ways to study and learn. They argue that learning is a process you do, not a process that is done to you; That is true of everyone. It's basic.[18] The experience of Sudbury model democratic schools shows that there are many ways to learn without the intervention of teaching, to say, without the intervention of a teacher being imperative. In the case of reading for instance in the Sudbury model democratic schools some children learn from being read to, memorizing the stories and then ultimately reading them. Others learn from cereal boxes, others from games instructions, others from street signs. Some teach themselves letter sounds, others syllables, others whole words. Sudbury model democratic schools adduce that in their schools no one child has ever been forced, pushed, urged, cajoled, or bribed into learning how to read or write, and they have had no dyslexia. None of their graduates are real or functional illiterates, and no one who meets their older students could ever guess the age at which they first learned to read or write.[19] In a similar form students learn all the subjects, techniques and skills in these schools.

Describing current instructional methods as homogenization and lockstep standardization, alternative approaches are proposed, such as the Sudbury model of democratic education schools, an alternative approach in which children, by enjoying personal freedom thus encouraged to exercise personal responsibility for their actions, learn at their own pace and style rather than following a compulsory and chronologically-based curriculum.[20][21][22][23] Proponents of unschooling have also claimed that children raised in this method learn at their own pace and style, and do not suffer from learning disabilities.

[edit] Technology

Technology is an increasingly influential factor in education. Computers and mobile phones are being widely used in developed countries both to complement established education practices and develop new ways of learning such as online education (a type of distance education). This gives students the opportunity to choose what they are interested in learning. The proliferation of computers also means the increase of programming and blogging. Technology offers powerful learning tools that demand new skills and understandings of students, including Multimedia, and provides new ways to engage students, such as Virtual learning environments. Technology is being used more not only in administrative duties in education but also in the instruction of students. The use of technologies such as PowerPoint and interactive whiteboard is capturing the attention of students in the classroom. Technology is also being used in the assessment of students. One example is the Audience Response System (ARS), which allows immediate feedback tests and classroom discussions.

Information and communication technologies (ICTs) are a “diverse set of tools and resources used to communicate, create, disseminate, store, and manage information.”[24] These technologies include computers, the Internet, broadcasting technologies (radio and television), and telephony. There is increasing interest in how computers and the Internet can improve education at all levels, in both formal and non-formal settings.[25] Older ICT technologies, such as radio and television, have for over forty years been used for open and distance learning, although print remains the cheapest, most accessible and therefore most dominant delivery mechanism in both developed and developing countries.[26]

The use of computers and the Internet is still in its infancy in developing countries, if these are used at all, due to limited infrastructure and the attendant high costs of access. Usually, various technologies are used in combination rather than as the sole delivery mechanism. For example, the Kothmale Community Radio Internet uses both radio broadcasts and computer and Internet technologies to facilitate the sharing of information and provide educational opportunities in a rural community in Sri Lanka.[27] The Open University of the United Kingdom (UKOU), established in 1969 as the first educational institution in the world wholly dedicated to open and distance learning, still relies heavily on print-based materials supplemented by radio, television and, in recent years, online programming.[28] Similarly, the Indira Gandhi National Open University in India combines the use of print, recorded audio and video, broadcast radio and television, and audio conferencing technologies.[29]

The term "computer-assisted learning" (CAL) has been increasingly used to describe the use of technology in teaching.

[edit] History

Main article: History of education
A depiction of the University of Bologna, Italy

The history of education according to Dieter Lenzen, president of the Freie Universität Berlin 1994 "began either millions of years ago or at the end of 1770". Education as a science cannot be separated from the educational traditions that existed before. Education was the natural response of early civilizations to the struggle of surviving and thriving as a culture.[citation needed] Adults trained the young of their society in the knowledge and skills they would need to master and eventually pass on.[citation needed] The evolution of culture, and human beings as a species depended on this practice of transmitting knowledge.[citation needed] In pre-literate societies this was achieved orally and through imitation. Story-telling continued from one generation to the next. Oral language developed into written symbols and letters. The depth and breadth of knowledge that could be preserved and passed soon increased exponentially.[citation needed] When cultures began to extend their knowledge beyond the basic skills of communicating, trading, gathering food, religious practices, etc, formal education, and schooling, eventually followed.[citation needed] Schooling in this sense was already in place in Egypt between 3000 and 500BC.[citation needed]

[edit] Philosophy

John Locke's work Some Thoughts Concerning Education was written in 1693 and still reflects traditional education priorities in the Western world

The philosophy of education is the study of the purpose, nature and ideal content of education. Related topics include knowledge itself, the nature of the knowing mind and the human subject, problems of authority, and the relationship between education and society.[citation needed] At least since Locke's time, the philosophy of education has been linked to theories of developmental psychology and human development.[citation needed]

Fundamental purposes that have been proposed for education include:

A central tenet of education typically includes “the imparting of knowledge.” At a very basic level, this purpose ultimately deals with the nature, origin and scope of knowledge.[citation needed] The branch of philosophy that addresses these and related issues is known as epistemology. This area of study often focuses on analyzing the nature and variety of knowledge and how it relates to similar notions such as truth and belief.

While the term, knowledge, is often used to convey this general purpose of education, it can also be viewed as part of a continuum of knowing that ranges from very specific data to the highest levels. Seen in this light, the continuum may be thought to consist of a general hierarchy of overlapping levels of knowing.[citation needed] Students must be able to connect new information to a piece of old information to be better able to learn, understand, and retain information.[citation needed] This continuum may include notions such as data, information, knowledge, wisdom, and realization.

The ideal or holistic education [Cf: Conceptual Stress-Understanding and Management: Dr. Shriniwas Kashalikar] is conscious evolutionary transformation that aims at holistic health i.e. simultaneous welfare of one and all. This requires conscious development of fitness of one's body, refinements of instincts, broadening and profoundness of emotions, blossoming of intelligence and liberating perspective of universal oneness. Besides, cognitive, affective and psychomotor the productive domain also must be nurtured for this.

[edit] Psychology

A class size experiment in the United States found that attending small classes for 3 or more years in the early grades increased high school graduation of students from low income families.[30]

Educational psychology is the study of how humans learn in educational settings, the effectiveness of educational interventions, the psychology of teaching, and the social psychology of schools as organizations. Although the terms "educational psychology" and "school psychology" are often used interchangeably, researchers and theorists are likely to be identified as educational psychologists, whereas practitioners in schools or school-related settings are identified as school psychologists.[citation needed] Educational psychology is concerned with the processes of educational attainment in the general population and in sub-populations such as gifted children and those with specific disabilities.[citation needed]

Educational psychology can in part be understood through its relationship with other disciplines. It is informed primarily by psychology, bearing a relationship to that discipline analogous to the relationship between medicine and biology.[citation needed] Educational psychology in turn informs a wide range of specialities within educational studies, including instructional design, educational technology, curriculum development, organizational learning, special education and classroom management.[citation needed] Educational psychology both draws from and contributes to cognitive science and the learning sciences.[citation needed] In universities, departments of educational psychology are usually housed within faculties of education, possibly accounting for the lack of representation of educational psychology content in introductory psychology textbooks (Lucas, Blazek, & Raley, 2006).

[edit] Economic implications of Education

It has been argued that high rates of education are essential for countries to be able to achieve high levels of economic growth. [31] In theory poor countries should grow faster than rich countries because they can adopt cutting edge technologies already tried and tested by rich countries.[citation needed] But economists argue that if the gap in education between a rich and a poor nation is too large, as is the case between the poorest and the richest nations in the world, the transfer of these technologies that drive economic growth becomes difficult, thus the economies of the world's poorest nations stagnate.[citation needed]

[edit] Sociology of education

Russia has more academic graduates than any other country in Europe.

The sociology of education is the study of how social institutions and forces affect educational processes and outcomes, and vice versa. By many, education is understood to be a means of overcoming handicaps, achieving greater equality and acquiring wealth and status for all (Sargent 1994). Learners may be motivated by aspirations for progress and betterment. Education is perceived as a place where children can develop according to their unique needs and potentialities.[32] The purpose of education can be to develop every individual to their full potential.[citation needed] The understanding of the goals and means of educational socialization processes differs according to the sociological paradigm used.

[edit] Education in developing countries

World map indicating Education Index (according to 2007/2008 Human Development Report)

In some developing countries, the number and seriousness of the problems faced are naturally greater.[citation needed] People in more remote or agrarian areas are sometimes unaware of the importance of education. However, many countries have an active Ministry of Education, and in many subjects, such as foreign language learning, the degree of education is actually much higher than in industrialized countries; for example, it is not at all uncommon for students in many developing countries to be reasonably fluent in multiple foreign languages, whereas this is much more of a rarity in the supposedly "more educated" countries where much of the population is in fact monolingual.

There is also economic pressure from those parents who prefer their children making money in the short term over any long-term benefits of education.[citation needed] Recent studies on child labor and poverty have suggested that when poor families reach a certain economic threshold where families are able to provide for their basic needs, parents return their children to school.[citation needed] This has been found to be true, once the threshold has been breached, even if the potential economic value of the children's work has increased since their return to school.[citation needed] Teachers are often paid less than other similar professions.[citation needed]

A lack of good universities, and a low acceptance rate for good universities, is evident in countries with a relatively high population density.[citation needed] In some countries, there are uniform, over structured, inflexible centralized programs from a central agency that regulates all aspects of education.

  • Due to globalization, increased pressure on students in curricular activities
  • Removal of a certain percentage of students for improvisation of academics (usually practised in schools, after 10th grade)

India is now developing technologies that will skip land based phone and internet lines. Instead, India launched EDUSAT, an education satellite that can reach more of the country at a greatly reduced cost. There is also an initiative started by a group out of MIT and supported by several major corporations to develop a $100 laptop. The laptops should be available by late 2006 or 2007. The laptops, sold at cost, will enable developing countries to give their children a digital education, and to close the digital divide across the world.

In Africa, NEPAD has launched an "e-school programme" to provide all 600,000 primary and high schools with computer equipment, learning materials and internet access within 10 years. Private groups, like The Church of Jesus Christ of Latter-day Saints, are working to give more individuals opportunities to receive education in developing countries through such programs as the Perpetual Education Fund. An International Development Agency project called nabuur.com, started with the support of American President Bill Clinton, uses the Internet to allow co-operation by individuals on issues of social development.

[edit] Internationalisation

Education is becoming increasingly international. Not only are the materials becoming more influenced by the rich international environment, but exchanges among students at all levels are also playing an increasingly important role. In Europe, for example, the Socrates-Erasmus Programme stimulates exchanges across European universities. Also, the Soros Foundation provides many opportunities for students from central Asia and eastern Europe. Some scholars argue that, regardless of whether one system is considered better or worse than another, experiencing a different way of education can often be considered to be the most important, enriching element of an international learning experience.[33]




http://dayaprime.com