You are on page 1of 7

LAPORAN AKHIR

Mata Praktikum : RPL 2

Kelas : 4 IA 08

Praktikum ke- : 1 (Satu)

Tanggal : Selasa, 25 April 2017

Materi :

NPM : 53413498

Nama : Firdaus Pandu Aji Prasetyo

Ketua Asisten :

Nama Asisten :

Paraf Asisten :

Jumlah Lembar :

LABRATORIUM TEKNIK INFORMATKA

UNIVERSITAS GUNADARMA

2017
Produk.java
App.java

Output:
Produk.java

/*

* To change this license header, choose License Headers in Project Properties.

* To change this template file, choose Tools | Templates

* and open the template in the editor.

*/

package pertemuan1;

/**

* @author rakaprasetyo

*/

public class Produk {

public String id;

private String name;

private int price;

public Produk(){

this.id = "0000";

this.name = "null";

this.price = 0;

public String getId(){

return id;

}
public void setId(String id){

this.id = id;

public String getName(){

return name;

public void setName(String name){

this.name = name;

public int getPrice(){

return price;

public void setPrice(int price){

this.price = price;

App.java

/*
* To change this license header, choose License Headers in Project Properties.

* To change this template file, choose Tools | Templates

* and open the template in the editor.

*/

package pertemuan1;

/**

* @author rakaprasetyo

*/

public class App {

public static void main(String[] args){

Produk Produk;

Produk = new Produk();

Produk.id = "1029";

Produk.setName("Smartphone");

Produk.setPrice(1000);

System.out.println("Produk id : " + Produk.getId() +

"\nProduk name : " + Produk.getName() +

"\nProduk price : " + Produk.getPrice());

You might also like