Kamis, 10 Desember 2009

jawaban tugas pertanyaan PBO modul 1

public class Student{

private String id;
private String name;
private String address;
private int theoryScore;
private int practiceScore;
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 String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
public int getTheoryScore() {
return theoryScore;
}
public void setTheoryScore(int theoryScore) {
this.theoryScore = theoryScore;
}
public int getPracticeScore() {
return practiceScore;
}
public void setPracticeScore(int practiceScore) {
this.practiceScore = practiceScore;
}
}


public class StudentTest {

public static void main(String[] args) {
Student pp = new Student();
pp.setId("00801213");
pp.setName("I Made Dwi Wiryawan");
pp.setAddress("Kaliakah");
pp.setTheoryScore(100);
pp.setPracticeScore(100);

System.out.println("class StudentTest");
System.out.println("Id : "+pp.getId());
System.out.println("Nama : "+pp.getName());
System.out.println("Alamat : "+pp.getAddress());
System.out.println("Nilai Teori : "+pp.getTheoryScore());
System.out.println("Nilai Praktek : "+pp.getPracticeScore());
}
}