PROGRAMMING

Class 본문

프로그래밍 언어 공통/OOP

Class

Raccoon2125 2022. 5. 23. 20:13

- java.lang class

1. String : literal로 구성되어 있음(const char *). 수정 불가.

2. Wrapper : 기본 자료형을 객체처럼 사용하기 위한 클래스.

3. System : 시스템 관련 함수가 포함된 클래스. static으로 구성되어 있음. 객체 생성 불필요.

4. Stream : stdin, stdout 장치 관련 클래스.

5. Class : 클래스 관련 정보 탐색.

6. Math : 수학 관련 함수. static으로 구성되어 있음. (ex. Math.E, Math.PI)

 

- exception class

1. Exception : 예외 발생 시 호출되는 클래스. (try, catch, finally로 오류 검수)

2. Throwable : throw 처리를 위한 클래스.

 

- Nested class

  : 클래스 선언부(outer) 내에 새로운 클래스(inner)를 생성하여 활용. 호출한 클래스에서만 활용 가능.

  ※ 클래스 메서드 내에서 class를 구성하고 인스턴스화할 수 있음. (더 좁은 범위에서 객체를 활용)

- static inner class

  : static 특성에 따라 외부 클래스(outer)의 인스턴스화 없이 내부 클래스를 호출할 수 있음.

 

- Design pattern (디자인 패턴)

 1) 생성 패턴 (Creational)

  : Abstract Factory, Builder, Factory Methods, Prototype, Singleton

 2) 구조 패턴 (Structural)

  : Adapter, Bridge, Composite, Decorator, Facade, Flyweight, Proxy

 3) 행위 패턴 (Behavioural)

  : Chain of Responsibility, Command, Interpreter, Iterator, Mediator, Memento, Observer, State, Strategy, Template Method, Visitor

 

 

 

 

'프로그래밍 언어 공통 > OOP' 카테고리의 다른 글

OOP 설계 원칙 SOLID  (0) 2022.05.29
Data structure  (0) 2022.05.23
UML Diagram  (0) 2022.05.16
Comments