Anda di halaman 1dari 2

package Person;

import java.util.Scanner;

public class Utama {

public static void main(String[] args) {


int pilih;
String nama; String kelas; String mapel;
int NIP;

int NIS,nilUTS,nilUAS;
String nilHuruf;

Guru a = new Guru();


Guru b = new Guru();
Guru c = new Guru();

Siswa x = new Siswa();


Siswa y = new Siswa();
Siswa z = new Siswa();

Scanner s = new Scanner(System.in);

System.out.println("---------------------------");
System.out.println("PROGRAM APLIKASI DATA NILAI");
System.out.println("---------------------------");
System.out.println("");
System.out.println("1. Masukkan Data Guru");
System.out.println("2. Masukkan Data Siswa");
System.out.println("3. Tampilkan Data Guru");
System.out.println("4. Tampilkan Data Siswa");
System.out.println("5. Pengurutan Data Siswa");
System.out.println("6. Pencarian Data Siswa");
System.out.println("7. Keluar Program");
System.out.println("");
do {
//Runtime.getRuntime().exec("cls");

System.out.print("MASUKKAN KODE PILIHAN (1,2,3,4,5,6 atau 7): ");

pilih = s.nextInt();
switch (pilih) {
case 1:
a.setDataGuru("SAPRUDDIN", 19101990, "SISTEM KOMPUTER", "X");
b.setDataGuru("Erika", 10091980, "Pemodelan PL", "XI");
c.setDataGuru("Amfyan", 10081970, "Web dan Mobile", "XII");

break;

case 2:
x.setDataSiswa(123, "EDWIN", 90, 95);
y.setDataSiswa(124, "ARIE", 78, 89);
z.setDataSiswa(125, "FERDY", 85, 93);
break;

case 3:
a.infoPerson();
b.infoPerson();
c.infoPerson();

//System.out.println("3. Tampilkan Data Guru");


break;

case 4:
x.infoPerson();
y.infoPerson();
z.infoPerson();

//System.out.println("4. Tampilkan Data Siswa");


break;

case 5:
System.out.println("5. Pengurutan Data Siswa");
break;

case 6:
System.out.println("6. Pencarian Data Siswa");
break;

case 7:
System.out.println("7. Keluar Program");
break;

default:
System.out.println("Pilihan Anda Tidak Tersedia");
break;

}
} while (pilih != 7);
}