Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 5 additions & 31 deletions src/task3exercise2/Member.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,13 @@ public class Member {
// 1. Declare your private attributes here:
// NIM : 1301154133
// NAMA : Afif Darmawan
// Kelas : IF 39-07
//------------------- your code here-----------------------
// Kelas : IF 39-07

private String name;
private String specialization;
private int projectWorked;
//---------------------------------------------------------

// 2. Declare your 2 Constructor here:
// NIM : 1301154133
// NAMA : Afif Darmawan
// Kelas : IF 39-07
//------------------- your code here-----------------------
public Member(String name){
this.name = name;
}
Expand All @@ -25,15 +20,7 @@ public Member(String name, String special){
this.specialization = special;
}

//---------------------------------------------------------


// 3. Declare your Setter and Getter method here:
// NIM : 1301154133
// NAMA : Afif Darmawan
// Kelas : IF 39-07
//------------------- your code here-----------------------
public int getProjectWorked() {
public int getProjectWorked() {
return projectWorked;
}
public String getName() {
Expand All @@ -56,24 +43,11 @@ public void setSpecialization(String specialization) {
public void setProjectWorked(int projectWorked) {
this.projectWorked = projectWorked;
}


//---------------------------------------------------------
// 4. Create method toString() : String here:
// NIM : 1301154133
// NAMA : Afif Darmawan
// Kelas : IF 39-07
// returns String that contains member name, specialization,
// and number of project worked
//
// example : "Member Alex specialized in Java Programming,
// worked on 5 project(s)"
public String toString() {
//------------------- your code here-----------------------

public String toString() {
return "Member "+name+" specialized in "+specialization+" Programming, worked on "+projectWorked+" project(s)";

//---------------------------------------------------------
}

}