Computers/Data Structure 13

Chapter 3. Stack and Queue

Templetes in C++ 템플릿 : 어떠한 타입으로도 인스턴스화할 수 있는 변수 컨테이너 클래스 : 다수의 데이터 객체를 수용하거나 저장하는 자료 구조를 표현하는 클래스 -> 객체 삽입/삭제 가능 Stack Abstract Data Type - top에서 push/pop 일어나는 sequence list (LIFO) Queue Abstract Data Type - 삽입되는 끝(rear)와 원소가 삭제되는 끝(front)원형 큐 - capacity-1 의 다음 위치는 0, 0의 직전위치는 capacity-1 - 동작 위해서는 rear, front를 시계방향으로 이동할 수 있어야함 - modulus 연산을 통해 (rear+1)%capacity 로 구현 가능. - front=rear : “항상” 공백큐 ..

Chapter 2. Arrays

추상 데이터 타입과 C++ 클래스 C++ 클래스 구성 - 클래스이름 - 데이터멤버 - 멤버함수 - 프로그램 접근 레벨 (public, protected, private)데이터의 추상화와 캡슐화 (Data Abstraction & Encapsulation) - private 또는 protected로 데이터를 선언함으로써 data encapsulation이 가능 - 필요에 따라 외부에서 데이터를 접근하고자할 때는 Get###() 함수를 쓴다. - 외부에서 접근할 때 쓰는 함수는 public으로 하고 그외엔 private/protected 사용클래스 객체 선언과 멤버 함수의 접근 (Declaring Class objects and invoking member functions) - class object에 직..

Chapter 1. Basic Concepts

overview : system life cycle (시스템 생명 주기)RequirementsAnalysisDesignRefinement and codingVerification - Correctness proofs - Testing - Error removal Object-oriented Design알고리즘적 분해와 객체지향적인 분해Definition and Concepts of Object-Ooriented ProgrammingObject(객체) : 계산을 수행하고 상태를 갖는 개체 ⇒ 데이터와 절차적 요소의 결합으로 볼 수 있음Object-oriented programming (1) object --- 객체의 기본 구성 단위 (2) object는 어떤 class 또는 type의 instance (3..