/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package PackageBuku;

import java.util.Scanner;

/**
 *
 * @author Adam MB
 */
public class TesDataBuku {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        DataBuku buku1=new DataBuku();

        Scanner masuk=new Scanner(System.in);
        System.out.print("Masukkan kode buku   : ");int kodebuku=masuk.nextInt();
        System.out.print("Masukkan judul buku  : ");String judulbuku=masuk.next();
        System.out.print("Masukkan pengarang   : ");String pengarang=masuk.next();
        System.out.print("Masukkan penerbit    : ");String penerbit=masuk.next();
        System.out.print("Masukkan harga buku  : ");long harga=masuk.nextLong();

        //setter
        buku1.setKodebuku(kodebuku);
        buku1.setNamabuku(judulbuku);
        buku1.setPengarang(pengarang);
        buku1.setPenerbit(penerbit);
        buku1.setHarga((int) harga);

        //getter
        System.out.println();
        System.out.println("Kode buku    = "+buku1.getKodebuku());
        System.out.println("Judul buku   = "+buku1.getNamabuku());
        System.out.println("Pengarang    = "+buku1.getPengarang());
        System.out.println("Penerbit     = "+buku1.getPenerbit());
        System.out.println("Harga        = "+buku1.getHarga());

        //fungsi tambahan
        System.out.println("Keterangan   = "+buku1.keterangan());
    }

}
