4장을 읽다보니 건성으로 넘어간 2장의 object개념이 가물가물하다…쩝..어쩔수없이 되돌아와서 2장을 정리하고 넘어가야 할것 같다.
http://java.sun.com/docs/books/tutorial/java/concepts/index.html

- Object는 object-oriented technology를 이해하기 위한 핵심이고 실생활(real-world)에서 많은 object의 예를 볼 수있다. (your dog, your desk, your televison set, your bicycle 등등)
이러한 실생활의 objects는 두가지 특성을 가진다: state, behavior
예). your dog
state: name, color, breed(새끼를낳다),hungry
behavior: barking, fetching, wagging tail

- 실생활의 object들이 state와 behavior를 가지듯 softeware object도 state와 behavior를 가진다. software object는 자신의 state를 하나 이상의 변수(variable)에 유지한다. variable는 식별자(identifier)로명명ㄷ한 데이터의 항목이다. behavior는 method에 의해 구현되는데 method는 object에 연관된 function(subroutine)이다.

* An object is a software bundle of variables and related methods.

- 실생황의 objects나 GUI에서 event와 같은 추상적인 개념을 표현하기 위해서 Software Object를 사용할 수 있다.
- software object가 아는것(state)와 할 수 있는것(behavior)모두는 variable와 methods에 의해 표현된다.
- object-oriented에서 개개의 object를 instance라고하고 그것의 state를 저장하는 변수를 instance variable이라한다.

Posted by salgunamu
: