소프트웨어학과 (7) 썸네일형 리스트형 [컴퓨터 네트워크] Chapter3) Socket Programming 1. Socket - Interface programming socket 구조 family : PF_INET, IPv6, ... type : 4개 - TCP, UDP, SCTP, IP protocol: TCP/IP local socket address : 필드 길이, 패밀리 필드, 포트 넘버 필드, IP 주소 필드 remote socket address Socket used for UDP 각 클라이언트와 서버는 각각 하나의 소켓을 사용 서로 다른 클라이언트는 서로 다른 소켓을 사용 서버는 수동적 open / 항상 오픈된 상태를 유지하다가 연결 오면 받아줌 / run forever in loop 클라언트는 적극적 open / 직접 연결 시도 / open-close pair Socket used for TC.. Week5) Java Programming Lab : Inheritance 1. What is Inheritance? 소프트웨어 재사용 형태 객체지향 프로그래밍의 주요 특성 기존의 클래스로부터 새로운 클래스를 만드는 것 : 기존의 클래스 데이터와 메소드를 그대로 흡수하고, 수정이나 새로운 메소드 또는 데이터 등을 추가하여 향상 시킴 중복 코드를 제거하기 위해 사용함 No redundant code general class -> special case class class Animal: // general class - general features move legs speed feed class Dog: // special class, inherits Animal class features fetch ... 2. Subclass and Superclass 자바는 다중상속을 허용.. Week3) Java Programming Lab : Class and Instance 1. Introduction to Class class 프로그래머가 정의하는 특별한 타입 변수가 클래스 타입으로 선언될 수 있다. 클래스는 해당 타입의 객체가 가지고 있는 데이터와 수행할 함수를 결정한다. 클래스 타입의 값 = object (객체), instance (인스턴스) example class Ball: fields : color, size, shape methods : set_ball_color(), set_ball_size(), set_ball_shape() // instances of the class Ball : football, tennis ball, rugby ball etc... methods 들은 fields의 데이터 값들을 변경하는 역할을 한다. 클래스는 데이터 값을 변경하여 다.. C/C++ programming tutorial C/C++ programming tutorial 1. C Basics 1.1 source code #include int main() { printf("Hello world\n"); return 0; } 1.2 How to compile $ gcc hello.c -o hello gcc : 컴파일링 명령 hello.c : 소스 파일 이름 hello : 컴파일러로 만들어낸, 실행 가능한 파일 executable file 설정하지 않으면 a.out이 디폴트 1.3 How to execute ./hello 1.4 Data types 1.5 Variable Declaration example int length = 100; char num = '9' // The actual value is 57 (based on.. Week 1) Java Programming Lab: Course Introduction 1. Course Overview 더보기 textbook : Java How to Program grading policy: 출석 40 + 기말 30 + 팀프로젝트 20 course plan prequisite : C++, 하나 이상의 프로그래밍 언어 스킬 2. Introduction to Java 전 세계적으로 아주 유명하고 많이 사용되는 프로그래밍 언어 high-level 언어 Java Applications ex) console, GUI, applet, servlet, JSP, enterprise java beans, etc, ... user의 input과 상호작용하는 웹 어플리케이션 안드로이드 엔터프라이즈 어플리케이션 ex) 은행 어플리케이션 (분산 시스템 소프트웨어) 임베디드 시스템 Origin.. [컴퓨터 네트워크] Chapter1 ) Introduction 1. 인터넷 개요 네트워크 상호 소통이 가능한 장치들의 interconnection 내부 연결 host : 대형 컴퓨터, 데스크탑, 핸드폰 등 connecting device : 라우터, 스위치 등 => 데이터의 형태를 바꿔 전달이 가능하도록 만듦. 인터넷의 작동 원리 여러 장치간 agreement하면 inter networking이 가능 이러한 약속을 프로토콜이라 부룸 모든 인터넷 장치들은 고유한 IP 주소를 가진다. decentralized : 집중화되지 않음. ix : internet exchange / 모든 네트워크 트래픽 사용자들을 연결해줌 Local Area Network LAN 주로 사적으로 소유되고, 하나의 오피스, 빌딩, 또는 캠퍼스에서 몇몇 호스트를 연결하는데 사용되는 LAN PORT는.. 합병 정렬 : Merge Sort 내림차순으로 구현하기 합병 정렬 Merge Sort 성균관대학교 소프트웨어학과 조대호 교수님의 2020년도 2학기 알고리즘 수업을 듣고 수행한 과제입니다. 배열을 내림차순으로 정렬하는 합병 정렬을 C로 구현하였습니다. input and output conditions Test the function with the following three types of integer inputs. int A[100] : filled with rand()%1000, execute srand(time(NULL)) first, (stdlib.h, time.h should be included) (Duplicate keys are ignored.) int A[100] : already sorted (Write a function for fil.. 이전 1 다음