와 인터페이스를 구현하는 것은 어쩌면 그 대답은 당신의 대부분 분명하지만, 인터페이스를 구현할 때 나는 조금 혼란 스러워요.단지 하나의 클래스 이상의 클래스
가는 "단지 하나의 구현 클래스가" "방법의 완전한 세트"를 구현해야할까요? 외환 :
public class CCSImplementation implements CCS {
public void addComment (int submissionId,int customerId, String comment, Date date) { }
public void addGeneralComplaint (int submissionId, int customerId, String description, Date date) { }
and other methods…..}
또는 - 더 구현 클래스는
public class Comment implements CCS {
public void addComment() {}
}
및
public class GeneralComplaints implements CCS {
public void addGeneralComplaint(){}
}
로 관련 방법을 고려하여 부분에 의해 인터페이스 부분을 구현? 참조가
하나 이상의 클래스가 인터페이스를 구현할 수 있다고 때문에 나는 조금 오전 말했듯이 ...
(--- 나는이 같은 구현 오류가 발생했습니다) 혼란스러워.
구현할 20 개의 메소드가 있다고 가정 해 보겠습니다. – serb
public abstract class Comment CCS { – serb
에는 구현 된 메소드가 20 개 있고 나머지는 추상으로 암시되어 있어야합니다. – serb