-
Notifications
You must be signed in to change notification settings - Fork 0
/
DUTAPRATAMA.java
87 lines (75 loc) · 1.91 KB
/
DUTAPRATAMA.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
/**
* @(#)DUTAPRATAMA.java
*
*
* @author
* @version 1.00 2017/8/10
*/
public class DUTAPRATAMA {
String hewan;
String jenis;
String jkelamin;
String jbulu;
String wbulu;
String wmata;
String berat;
void makan()
{
System.out.println("Sedang Makan");
}
void minum()
{
System.out.println("Sedang Minum");
}
void lompat()
{
System.out.println("Sedang Lompat");
}
void lari()
{
System.out.println("Sedang Lari");
}
void menggigit()
{
System.out.println("Sedang Menggigit");
}
void menyusui()
{
System.out.println("Sedang Menyusui");
}
void tidur()
{
System.out.println("Sedang Tidur");
}
}
class ObjectDUTAPRATAMA
{
public static void main (String[] args)
{
DUTAPRATAMA hewanku = new DUTAPRATAMA();
hewanku.hewan = "Kucing";
hewanku.jenis = "Angora";
hewanku.jkelamin = "Betina";
hewanku.jbulu = "Lebat";
hewanku.wbulu = "Putih Dan Coklat";
hewanku.wmata = "Biru";
hewanku.berat = "900 Gram";
System.out.println("***************************");
System.out.println("* SMK TELKOM *");
System.out.println("*-------------------------*");
System.out.println("* Nama : Duta Pratama *");
System.out.println("* Kelas : XI RPL *");
System.out.println("* No.Urut : 06 *");
System.out.println("***************************");
System.out.println("Hewan : "+hewanku.hewan);
System.out.println("Jenis : "+hewanku.jenis);
System.out.println("Jenis Kelamin : "+hewanku.jkelamin);
System.out.println("Jenis Bulu : "+hewanku.jbulu);
System.out.println("Warna Bulu : "+hewanku.wbulu);
System.out.println("Warna Mata : "+hewanku.wmata);
System.out.println("Berat : "+hewanku.berat);
System.out.println("");
System.out.print("Yang Dilakukan Hewanku : ");
hewanku.makan();
}
}