[이한출판사] 자바프로그래밍(java programming) 6장(6chapter) 워크북(workbook)
- 최초 등록일
- 2008.05.25
- 최종 저작일
- 2007.10
- 7페이지/
압축파일
- 가격 1,000원

소개글
[이한출판사] 자바프로그래밍(java programming) 6장(6chapter) 워크북(workbook) 실습과제 1, 3입니다.
목차
chapter 06 실습 과제1.
◎ 분석
◎ 수정
◎ 실험 평가
chapter 06 실습 과제2.
◎ 분석
◎ 구현
◎ 실험 평가
본문내용
chapter 06 실습 과제1.
◎ 원인
상위 클래스인 SuperClass에서 result() 부분이 정의 되지 않았기 때문에, main에서 obj.result() 부분을 사용할 수가 없으므로 상위 클래스에 result()를 정의를 해주어야 하며, 상위 클래스, SuperClass에 인자가 없는 생성자가 없기 때문에 super()를 사용하여야 한다.
class SuperClass {
protected int score[];
protected String str;
public SuperClass (int score[]) {
this.score = score;
}
protected int[] sort() {
return score;
}
protected String result() {
return str;
}
}
class SubClass extends SuperClass {
public SubClass(int score[]) {
super(score);
}
public int[] sort() {
for (int index01 = score.length-1; index01 > 0; index01--) {
for(int index02 = 1; index02 <= index01; index02++) {
if (score[index02-1] > score[index02]) {
int temp = score[index02-1];
score[index02-1] = score[index02];
score[index02] = temp;
참고 자료
없음
압축파일 내 파일목록
Exam0603.java
RemoteControl.class
SubClass.class
SuperClass.class
TVRemoteControl.class
w06_200311436_차석환.hwp
DVDRemoteControl.class
Exam0601.class
Exam0601.java
Exam0603.class