forked from KukuhSanddi/Task_3
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApplication.java
More file actions
64 lines (49 loc) · 1.65 KB
/
Application.java
File metadata and controls
64 lines (49 loc) · 1.65 KB
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
package task3exercise1;
public class Application {
// 1. Declare your private attributes here:
// NIM : 1301154264
// NAMA : Kukuh Sanddi Razaq
//
//------------------- your code here-----------------------
private String appName;
private int appSize;
//---------------------------------------------------------
// 2. Declare Constructor here:
// NIM : 1301154264
// NAMA : Kukuh Sanddi Razaq
//
// Constructor initialize application name and size (MB)
//
//------------------- your code here-----------------------
public Application (){
this.appName = appName;
this.appSize = appSize;
}
//---------------------------------------------------------
// 3. Declare your Setter and Getter method here:
// NIM : 1301154264
// NAMA : Kukuh Sanddi Razaq
//
//------------------- your code here-----------------------
public String getAppName() {
return appName;
}
public int getAppSize() {
return appSize;
}
//---------------------------------------------------------
// 4. Create method toString() : String here:
// NIM : 1301154264
// NAMA : Kukuh Sanddi Razaq
//
// returns String that contains application name and application size
//
// example : "Application name: App1, with size: 3MB"
public String toString() {
//------------------- your code here-----------------------
String a;
a= "Application Name : "+appName+" Application Size : "+appSize;
return a;
//---------------------------------------------------------
}
}