객체란 무엇인가?
객체란 무엇인가?
- 객체는 실세계 영역에 있는 개체를 표현.
- Graphic Library application
- point, line, polygon, rectangle, square, ellipse, circle, window, etc.
- University Personnel Management software
- person, student, faculty, staff, part-timer, etc.
- Word Processing software
- character, word, sentense, paragraph, documents, fonts, etc.
- 객체
- An object is a module that contains both data and the operations that operate upon the data.
- Data provide the state, and operations provide the behavior of object.
- 수동적 객체와 능동적 객체
- Passive object is one that acts only upon request.
- Active object monitors occurring in an application and take action autonomously.
Notes:
- Data (storage) provides the state.
- Operations provides the behavior.
- functions, procedures, subroutines, methods, etc.
- Value vs Variable
- Value: 2, 3, -7, 3.14, "hello", etc.
- Variables: int i; char c;