View: 5474|Reply: 3
|
sistem yang guna coding java
[Copy link]
|
|
salam...ade sape2 leh tolong x???
saya kene wat satu mini projek utk subjek java programming....
sekarang ni saya x tau nak wat sistem ape???
klau ade sape2 tau tlg bg tau....kalo blh saya nak cth coding sekali...
|
|
|
|
|
|
|
|
bkn java programming....
ala asas java....
coding je....x de pon applet 2... |
|
|
|
|
|
|
|
nah contoh..fahamkan..- import java.applet.*;
- import java.awt.*;
- import java.awt.event.*;
- import javax.swing.*;
- import java.io.*;
- public class keputusan
- {
- public static void main(String args[])throws IOException
- {
- BufferedReader a = new BufferedReader (new InputStreamReader(System.in));
-
- String nama = " ", no_gil="", srt_beranak ="", sek ="", tahun="";
- String sains="", matematik="", penulisan="", pemahaman="", inggeris="";
- String Status="";
- String gred="";
- //String aa,bb,cc,dd,ee;
- int thn;
- int mark []= new int [6];
- int jum_pel;
-
- System.out.println("masukkan nama anda: "+nama);
- nama = a.readLine();
- //aa = Integer.parseInt(nama);
-
- System.out.println("masukkan no giliran anda: "+no_gil);
- no_gil = a.readLine();
- //bb = Integer.parseInt(no_gil);
-
- System.out.println("masukkan nombor surat beranak anda: "+srt_beranak);
- srt_beranak = a.readLine();
- //cc = Integer.parseInt(srt_beranak);
-
- System.out.println("masukkan nama sekolah anda: "+sek);
- sek = a.readLine();
- //dd = Integer.parseInt(sek);
-
- System.out.println("masukkan tahun peperiksaan anda: "+tahun);
- tahun = a.readLine();
- thn = Integer.parseInt(tahun);
-
- System.out.println("masukkan markah pemahaman anda: "+pemahaman);
- pemahaman = a.readLine();
- mark[0] = Integer.parseInt(pemahaman);
-
- System.out.println("masukkan markah penulisan anda: "+penulisan);
- penulisan = a.readLine();
- mark[1] = Integer.parseInt(penulisan);
-
- System.out.println("masukkan markah bahasa inggeris: "+inggeris);
- inggeris = a.readLine();
- mark[2] = Integer.parseInt(inggeris);
-
- System.out.println("masukkan markah sains: "+sains);
- sains = a.readLine();
- mark[3] = Integer.parseInt(sains);
-
- System.out.println("masukkan markah matematik: "+matematik);
- matematik = a.readLine();
- mark[4] = Integer.parseInt(matematik);
-
- int x;
- for (x=0;x<5;x++)
- {
- if (mark[x]>=80&&mark[x]<=100)
- {
- gred = "A";
- Status = "CEMERLANG";
- }
- else if (mark[x]>=60&&mark[x]<=79)
- {
- gred = "B";
- Status = "BAIK";
-
- }
- else if (mark[x]>=50&&mark[x]<=59)
- {
- gred = "C";
- Status = "SEDERHANA BAIK";
- }
- else if (mark[x]>=40&&mark[x]<=49)
- {
- gred = "D";
- Status = "LEMAH";
- }
- else if (mark[x]>=0&&mark[x]<=39)
- {
- gred = "E";
- Status = "GAGAL";
- }
- else
- {
- System.out.println("Masukan anda salah");
- }
- }
-
-
- System.out.println("--------------------------------PAPARAN SLIP PEPERIKSAAN UPSR--------------------------------------");
- System.out.println(" LEMBAGA PEPERIKSAAN MALAYSIA ");
- System.out.println(" TAHUN PEPERIKSAAN "+tahun );
- System.out.println(" " +sek );
- System.out.println("\n\n");
- System.out.println("Nama : "+ nama);
- System.out.println("No Giliran: "+no_gil);
- System.out.println("No Surat Beranak : "+srt_beranak);
- System.out.println("---------------------------------------------------------------------------------------------------- ");
- System.out.println("| MATA PELAJARAN | GRED | STATUS | ");
- System.out.println("| PEMAHAMAN |" +Status+ "|" + gred + "|" );
- System.out.println("| PENULISAN |" +gred);// "|" + Status "|" );
- System.out.println("| BAHASA INGGERIS |" +gred);// "|" + Status "|" );
- System.out.println("| SAINS |" +gred);// "|" + Status "|" );
- System.out.println("| MATEMATIK |" +gred);// "|" + Status "|" );
-
-
-
-
-
-
-
- }
- }
Copy the Code |
|
|
|
|
|
|
| |
|