Advertisement
Mashudi

InputPelajar

Mar 11th, 2016
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.00 KB | None | 0 0
  1. /*
  2.  * To change this license header, choose License Headers in Project Properties.
  3.  * To change this template file, choose Tools | Templates
  4.  * and open the template in the editor.
  5.  */
  6. package newpackage;
  7.  
  8. /**
  9.  *
  10.  * @author sudonym
  11.  */
  12. public class InputPelajar {
  13.     public static void main(String[] args){
  14.         Pelajar p = new Pelajar();
  15.        
  16.         p.setData("Dian P","050122");
  17.         p.setNilai(65,53.7,62.5);
  18.        
  19.        
  20.         System.out.println("Data Pelajar : ");
  21.         System.out.println("NIP : " + p.getNip());
  22.         System.out.println("Nama : " + p.getNama());
  23.         System.out.println("N.Ujian 1 : " + p.getNilaiUjian1());
  24.         System.out.println("N.Ujian 2 : " + p.getNilaiUjian2());
  25.         System.out.println("N.Tugas : " + p.getNilaiTugas());
  26.         System.out.println("N.Rata2 Ujian : " + p.nilaiRata2());
  27.         System.out.println("N.Akhir : " + String.format("%.2f",p.nilaiAkhir()));
  28.         System.out.println("Status : " + p.isLulus());
  29.     }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement