안드로이드 텀프로젝트 우수 과제
- '우수하다' 그럭저럭 참고할만하다...https://github.com/muckyang/Androidtermproject
https://github.com/korLethean/termProject
https://github.com/amdjd/Term
https://github.com/YunTaeSik/Calendar.git
이 블로그는 사용하지 않습니다. jyheo.github.io나 github.com/jyheo로 방문해주세요. --- 한성대학교 컴퓨터공학부 허준영 교수 강의 블로그입니다. 강의 자료나 학생들이 참고할 문서, 웹 사이트 링크 등을 제공합니다.
| Modifier | Class | Package | Subclass | World |
|---|---|---|---|---|
public |
Y | Y | Y | Y |
protected |
Y | Y | Y | N |
| no modifier | Y | Y | N | N |
private |
Y | N | N | N |
class FoolFish extends Fish { // 상속
FoolFish(String name, String shape) {
super(name, shape); // 부모 클래스의 생성자를 부름, super는 부모 클래스를 가리킴
}
public void move(int width, int height) { // 메소드 오버라이딩(overriding), 원래 메소드는?
x++; // Fish의 x, y가 private int였다고 지금은 protected int로 바뀌어 있음. 왜?
y++;
if (x >= width)
x = 0;
if (y >= height)
y = 0;
}
}
public class Lake10 {
private int width;
private int height;
private Fish[] fishes;
public Lake10(int width, int height) {
this.width = width;
this.height = height;
fishes = new Fish[10];
for (int i = 0; i < fishes.length; i++) {
if (i % 2 == 0)
fishes[i] = new Fish("Even", "<#--<");
else
fishes[i] = new FoolFish("Odd", "<$--<"); // Fish 레퍼런스가 FoolFish를 가리킨다?
// 업 캐스팅(upcasting)
}
}
public void moveFish() {
for (Fish f : fishes) // f가 Fish 객체일 때도 있고, FoolFish일 때도 있는데,
f.move(width, height); // move()는 누구의 move()가 불리는가?
} // 동적 바인딩(dynamic binding)
int[][] iiArray = new int[2][5];
iiArray.length
iiArray[0].length
iiArray[1].length
int[][] iiArray = new int[2][]; iiArray[0] = new int[5]; // iiArray의 첫번째 원소가 1차원 배열 iiArray[1] = new int[3]; // 두번째 원소도 1차원 배열, 크기는 첫번째와 달라도 됨.
public static void main(String[] args) {
// args 배열에는 명령
for (String s : args)
System.out.println(s);
}
java.exe Main apple android window 로 실행하면, 아래와 같이 출력됨.String[] strArr = new String[5];
try {
strArr[6] = "hello";
} catch (ArrayIndexOutOfBoundsException e) {
System.out.println("array index oob exception!");
}
try {
strArr[6] = "hello";
} catch (Exception e) {
System.out.println("exception");
}
3 4 5 6 7 (엔터)5.03.2 4.3 5.2 6.7 8.8 (엔터)5.64
| 이론(화) | 실습(목) | ||
| 03월 01일 | 삼일절 휴강 | 03월 03일 | 강의 소개 |
| 03월 08일 | 임베디드 소프트웨어 | 03월 10일 | 라즈비안 설치, 네트워크 설정, 원격 접속, 업데이트 |
| 03월 15일 | 운영체제 개요, 프로세스 | 03월 17일 | 개발 환경/리눅스 설치(ArchiLinux), 사용하기 |
| 03월 22일 | 스레드 | 03월 24일 | 크로스 컴파일과 디버깅 |
| 03월 29일 | 리눅스 커널 프로세스와 스레드 | 03월 31일 | 리눅스 커널 프로세스와 스레드 (이론) |
| 04월 05일 | 병행성: 상호배제와 동기화 | 04월 07일 | 병행성: 상호배제와 동기화 (이론) |
| 04월 12일 | 병행성: 교착상태와 기아 | 04월 14일 | 병행성: 교착상태와 기아 (이론) |
| 04월 19일 | 중간시험 | 04월 21일 | 실습 없음. |
| 04월 26일 | 가상메모리 | 04월 28일 | GPIO: 버튼과 LED |
| 05월 03일 | 리눅스 커널 가상 메모리 | 05월 05일 | 어린이날 휴강 |
| 05월 10일 | 스케줄링 | 05월 12일 | PWM: servo motor |
| 05월 17일 | RTOS 스케줄링 | 05월 19일 | Flask, 웹 서버로 주변 기기 제어 |
| 05월 24일 | 입출력 관리 | 05월 26일 | 리눅스 커널 모듈 프로그래밍 |
| 05월 31일 | 파일 관리 | 06월 02일 | 리눅스 커널 디바이스 드라이버 |
| 06월 07일 | 리눅스 파일 시스템 | 06월 09일 | 리눅스 커널 디바이스 드라이버 ioctl |
| 06월 14일 | 기말시험 | 06월 16일 | 실습 없음. |