Microsoft PowerPoint - java

Size: px
Start display at page:

Download "Microsoft PowerPoint - java"

Transcription

1 Java John Mitchell & Byeong-Mo Chang

2 Outline Language Overview History and design goals Classes and Inheritance Object features Encapsulation Inheritance Types and Subtyping Primitive and ref types Interfaces; arrays Exception hierarchy Subtype polymorphism and generic programming Virtual machine overview Loader and initialization Linker and verifier Bytecode interpreter Bytecode bytecodes

3 Origins of the language James Gosling and others at Sun, Oak language for set-top box small networked device with television display graphics execution of simple programs communication between local program and remote site no expert programmer to deal with crash, etc. Internet application simple language for writing programs that can be transmitted over network

4 Design Goals Portability Internet-wide distribution: PC, Unix, Mac Reliability Avoid program crashes and error messages Safety Programmer may be malicious Simplicity and familiarity Appeal to average programmer; less complex than C++ Efficiency Important but secondary

5 General design decisions Simplicity Almost everything is an object All objects on heap, accessed through pointers No functions, no multiple inheritance, no go to, no operator overloading, few automatic coercions Portability and network transfer Bytecode interpreter on many platforms Reliability and Safety Typed source and typed bytecode language Run-time type and bounds checks Garbage collection

6 Java System The Java programming language Compiler and run-time system Programmer compiles code Compiled code transmitted on network Receiver executes on interpreter (JVM) Safety checks made before/during execution Library, including graphics, security, etc. Large library made it easier for projects to adopt Java Interoperability Provision for native methods

7 Java Release History 1995 (1.0) First public release 1997 (1.1) Nested classes Support for function objects 2001 (1.4) Assertions Verify programmers understanding of code 2004 (1.5) Tiger Generics, foreach, Autoboxing/Unboxing, Typesafe Enums, Varargs, Static Import, Annotations, concurrency utility library Improvements through Java Community Process

8 Outline Objects in Java Classes, encapsulation, inheritance Type system Primitive types, interfaces, arrays, exceptions Virtual machine Loader, verifier, linker, interpreter Bytecodes

9 Language Terminology Class, object - as in other languages Field data member Method - member function Static members - class fields and methods this - self Package - set of classes in shared namespace Native method - method written in another language, often C

10 Java Classes and Objects Syntax similar to C++ Object has fields and methods is allocated on heap, not run-time stack accessible through reference (only ptr assignment) garbage collected Dynamic lookup Similar in behavior to other languages Static typing => more efficient than Smalltalk Dynamic linking, interfaces => slower than C++

11 Point Class class Point { private int x; protected void setx (int y) {x = y;} public int getx() {return x;} Point(int xval) {x = xval;} // constructor }; Visibility similar to C++, but not exactly (later slide)

12 Object initialization Java guarantees constructor call for each object Memory allocated Constructor called to initialize memory Some interesting issues related to inheritance We ll discuss later Cannot do this (would be bad C++ style anyway): Obj* obj = (Obj*)malloc(sizeof(Obj)); Static fields of class initialized at class load time Talk about class loading later

13 Encapsulation and packages Every field, method belongs to a class Every class is part of some package Can be unnamed default package File declares which package code belongs to package class field method package class field method

14 Visibility and access Four visibility distinctions public, private, protected, package Method can refer to private members of class it belongs to non-private members of all classes in same package protected members of superclasses (in diff package) public members of classes in visible packages Visibility determined by files system, etc. (outside language) Qualified names (or use import) java.lang.string.substring() package class method

15 Inheritance Similar to Smalltalk, C++ Subclass inherits from superclass Single inheritance only (but Java has interfaces) Some additional features Conventions regarding super in constructor and finalize methods Final classes and methods

16 Example subclass class ColorPoint extends Point { // Additional fields and methods private Color c; protected void setc (Color d) {c = d;} public Color getc() {return c;} // Define constructor ColorPoint(int xval, Color cval) { super(xval); // call Point constructor c = cval; } // initialize ColorPoint field };

17 메쏘드재정의 (Method overriding) 메쏘드재정의란무엇인가? 자식클래스가상속된메쏘드를자신이원하는대로재정의하는것 새로운메쏘드는부모메쏘드와이름과서명 (signature) 이같아야한다. 메쏘드의서명 (signature) 메쏘드의매개변수이름, 개수, 순서, 타입 재정의된메쏘드실행 그메쏘드를실행하는객체의타입에따라호출될메쏘드가결정된다.

18 메쏘드재정의 : 예 class Fruit { int grams; int cals_per_gram; } int total_calories( ) { /* */ } void peel( ) { System.out.print( peel a Fruit ); } class Lemon extends Fruit { void squeeze( ) { /* */ } // Fruit 클래스의 peel() 메쏘드를 Lemon 클래스가재정의 void peel( ) { super.peel(); System.out.println(, which is a lemon ); } }

19 메쏘드재정의 : 예 class Example { public static void main(string args[]) { Fruit fruit = new Fruit(); Lemon lemon = new Lemon(); fruit.peel(); lemon.peel(); } } fruit = lemon; fruit.peel();

20 중복정의 vs. 재정의 중복정의 한클래스내에같은이름의여러개의메쏘드 서로다른서명을갖는경우 비슷한연산을다른매개변수에대해서다른방식으로정의하는데사용 재정의 부모클래스의메쏘드를자식클래스가재정의 서명이같아야한다. 시그너처가다르다면어떻게될까?

21 super 참조 super 는슈퍼클래스를지칭하는참조 슈퍼클래스의멤버필드나메소드를지칭할때사용 super.field super.method() super() super() 는슈퍼클래스의생성자를호출 super() 는생성자의맨처음부분에위치 서브클래스생성자에서슈퍼클래스의생성자를호출

22 바인딩 (Binding) 바인딩이란무엇인가? 이름이가리키는대상을결정하는것 obj.doit(); 이호출은호출될메쏘드를결정즉바인딩한다. 컴파일시간에결정하면언제나같은메쏘드가호출될것이다. 동적바인딩 (dynamic binding) 그러나 Java는동적바인딩을한다 runtime binding, late binding 이라고도한다. 왜동적바인딩을하는가? 프로그램설계에유연성을제공한다.

23 다형성 (Polymorphism) 다형성 (polymorphism) 의의미 많은형태를갖는다. "having many forms 다형참조 (polymorphic reference) 변수 때에따라다른타입의객체를참조할수있다. 다형참조를통해호출된메쏘드는호출할때마다다를수있다. Java에서모든객체참조는다형적일수있다.

24 다형참조 객체참조변수 선언된클래스의객체와 선언된클래스의자손클래스의객체를참조할수있다. 예 : Fruit Lemon Fruit fruit; if ( ) fruit = new Fruit(); else fruit = new Lemon(); fruit.peel();

25 동적바인딩 호출될메쏘드결정 참조변수의타입이아니고 실행시간에참조되고있는객체의타입에의해결정된다. fruit.peel(); fruit 가 Fruit 객체를참조하는경우 Fruit peel() Fruit 의 peel 호출 fruit 가 Lemon 객체를참조하는경우 Lemon 의 peel 호출 Lemon peel()

26 Class Object Every class extends another class Superclass is Object if no other class named Methods of class Object GetClass return the Class object representing class of the object ToString returns string representation of object equals default object equality (not ptr equality) hashcode Clone makes a duplicate of an object wait, notify, notifyall used with concurrency finalize

27 Final classes and methods Restrict inheritance Final classes and methods cannot be redefined Example java.lang.string Reasons for this feature Important for security Programmer controls behavior of all subclasses Critical because subclasses produce subtypes Compare to C++ virtual/non-virtual Method is virtual until it becomes final

28 Outline Objects in Java Classes, encapsulation, inheritance Type system Primitive types, interfaces, arrays, exceptions Virtual machine Loader, verifier, linker, interpreter Bytecodes

29 Java Types Two general kinds of times Primitive types not objects Integers, Booleans, etc Reference types Classes, interfaces, arrays No syntax distinguishing Object * from Object Static type checking Every expression has type, determined from its parts Some auto conversions, many casts are checked at run time Example, assuming A <: B Can use A x and type If B x, then can try to cast x to A Downcast checked at run-time, may raise exception

30 Classification of Java types Reference Types Object Object[ ] Throwable Shape Shape[ ] Circle Square Circle[ ] Square[ ] user-defined arrays Exception types Primitive Types boolean int byte float long

31 Subtyping Primitive types Conversions: int -> long, double -> long, Class subtyping similar to C++ Subclass produces subtype Single inheritance => subclasses form tree Interfaces Completely abstract classes no implementation Multiple subtyping Interface can have multiple subtypes (extends, implements) Arrays Covariant subtyping not consistent with semantic principles

32 Java class subtyping Signature Conformance Subclass method signatures must conform to those of superclass Three ways signature could vary Argument types Return type Exceptions How much conformance is needed in principle? Java rule Java 1.1: Arguments and returns must have identical types, may remove exceptions Java 1.5: covariant return type specialization

33 Interface subtyping: example interface Shape { public float center(); public void rotate(float degrees); } interface Drawable { public void setcolor(color c); public void draw(); } class Circle implements Shape, Drawable { // does not inherit any implementation // but must define Shape, Drawable methods }

34 Properties of interfaces Flexibility Allows subtype graph instead of tree Avoids problems with multiple inheritance of implementations (remember C++ diamond ) Cost Offset in method lookup table not known at compile Different bytecodes for method lookup one when class is known one when only interface is known search for location of method cache for use next time this call is made (from this line)

35 Array types Automatically defined Array type T[ ] exists for each class, interface type T Cannot extended array types (array types are final) Multi-dimensional arrays as arrays of arrays: T[ ] [ ] Treated as reference type An array variable is a pointer to an array, can be null Example: Circle[] x = new Circle[array_size] Anonymous array expression new int[] {1,2,3,... 10} Every array type is a subtype of Object[ ], Object Length of array is not part of its static type

36 Array subtyping Covariance if S <: T then S[ ] <: T[ ] Standard type error class A { } class B extends A { } B[ ] barray = new B[10] A[ ] aarray = barray // considered OK since B[] <: A[] aarray[0] = new A() // compiles, but run-time error // raises ArrayStoreException

37 Covariance problem again Remember Simula problem If A <: B, then A ref <: B ref Needed run-time test to prevent bad assignment Covariance for assignable cells is not right in principle Explanation interface of T reference cell is put : T T ref get : T ref T Remember covariance/contravariance of functions

38 Outline Objects in Java Classes, encapsulation, inheritance Type system Primitive types, interfaces, arrays, exceptions Virtual machine Loader, verifier, linker, interpreter Bytecodes

39 Java Implementation Compiler and Virtual Machine Compiler produces bytecode Virtual machine loads classes on demand, verifies bytecode properties, interprets bytecode Why this design? Bytecode interpreter/compilers used before Pascal pcode ; Smalltalk compilers use bytecode Minimize machine-dependent part of implementation Do optimization on bytecode when possible Keep bytecode interpreter simple For Java, this gives portability Transmit bytecode across network

40 Java Virtual Machine Architecture A.java Java Compiler Compile source code A.class B.class Network Java Virtual Machine Loader Verifier Linker Bytecode Interpreter

41 JVM memory areas Java program has one or more threads Each thread has its own stack All threads share same heap method area heap Java stacks PC registers native method stacks

42 Class loader Runtime system loads classes as needed When class is referenced, loader searches for file of compiled bytecode instructions Default loading mechanism can be replaced Define alternate ClassLoader object Extend the abstract ClassLoader class and implementation ClassLoader does not implement abstract method loadclass, but has methods that can be used to implement loadclass Can obtain bytecodes from alternate source VM restricts applet communication to site that supplied applet

43 Example issue in class loading and linking: Static members and initialization class... { /* static variable with initial value */ static int x = initial_value /* ---- static initialization block --- */ static { /* code executed once, when loaded */ } } Initialization is important Cannot initialize class fields until loaded Static block cannot raise an exception Handler may not be installed at class loading time

44 JVM Linker and Verifier Linker Adds compiled class or interface to runtime system Creates static fields and initializes them Resolves names Checks symbolic names and replaces with direct references Verifier Check bytecode of a class or interface before loaded Throw VerifyError exception if error occurs

45 Verifier Bytecode may not come from standard compiler Evil hacker may write dangerous bytecode Verifier checks correctness of bytecode Every instruction must have a valid operation code Every branch instruction must branch to the start of some other instruction, not middle of instruction Every method must have a structurally correct signature Every instruction obeys the Java type discipline Last condition is fairly complicated.

46 Bytecode interpreter Standard virtual machine interprets instructions Perform run-time checks such as array bounds Possible to compile bytecode class file to native code Java programs can call native methods Typically functions written in C Multiple bytecodes for method lookup invokevirtual - when class of object known invokeinterface - when interface of object known invokestatic - static methods invokespecial - some special cases

47 Type Safety of JVM Run-time type checking All casts are checked to make sure type safe All array references are checked to make sure the array index is within the array bounds References are tested to make sure they are not null before they are dereferenced. Additional features Automatic garbage collection No pointer arithmetic If program accesses memory, that memory is allocated to the program and declared with correct type

48 Java Sandbox Four complementary mechanisms Class loader Separate namespaces for separate class loaders Associates protection domain with each class Verifier and JVM run-time tests NO unchecked casts or other type errors, NO array overflow Preserves private, protected visibility levels Security Manager Called by library functions to decide if request is allowed Uses protection domain associated with code, user policy Recall: stack inspection problem on midterm

49 Outline Objects in Java Classes, encapsulation, inheritance Type system Primitive types, interfaces, arrays, exceptions Virtual machine Loader, verifier, linker, interpreter Bytecodes

50 JVM 의데이터타입 기초타입 (Primitive types) 정수관련타입 byte(8 bits), short(16 bits), int(32 bits), long(64 bits), char(16 bits, UNICODE) 부동소수점 : float(32 bits), double(64 bits) boolean : true /false returnaddress : 바이트코드명령어주소 참조타입 (Reference types) 클래스 (class) 배열 (array) 인터페이스9interface)

51 바이트코드명령어 8- 비트연산코드를갖는 202 개명령어 스택기반실행 오퍼랜드스택을사용 명령어실행전오퍼랜드들을스택에적재하고결과값도스택에적재 레지스터는없고대신에지역변수사용 오퍼랜드타입명시 iadd : 정수덧셈 복잡한명령어들 메모리할당 모니터 / 쓰레드동기화 메쏘드호출

52 바이트코드명령어카테고리 Category No. Example arithmetic operation 24 iadd, lsub, frem logical operation 12 iand, lor, ishl numeric conversion 15 int2short, f2l, d2i pushing constant 20 bipush, sipush, ldc, iconst_0, fconst_1 stack manipulation 9 pop, pop2, dup, dup2 flow control instructions 28 goto, ifne, ifge, if_null, jsr, ret managing local variables 52 astore, istore, aload, iload, aload_0 manipulating arrays 17 aastore, bastore, aaload, baload creating objects and array 4 new, newarray, anewarray, multianewarry object manipulation 6 getfield, putfield, getstatic, putstatic method call and return 10 invokevirtual, invokestatic, areturn miscellaneous 5 throw, monitorenter, breakpoint, nop

53 바이트코드명령어타입 타입힌트 iadd, isub, istore,... 실행전타입검사가능 보다안전한시스템가능 타입접두사없는명령어 pop, dup, invokevirtual, type int long float double byte char short reference code i l f d b c s a

54 예 : 자바코드 static int factorial(int n) { int res; for (res = 1; n > 0; n--) res = res * n; return res; }

55 예 : 바이트코드 0: iconst 1 // push 1 1: istore 1 // store it in register 1 ( 변수 res) 2: iload 0 // push register 0 ( 매개변수 n) 3: ifle 14 // if negative or null, goto PC 14 6: iload 1 // push register 1 (res) 7: iload 0 // push register 0 (n) 8: imul // mutiply the two integers at top of stack 9: istore 1 // pop result and store it in register 1 (res) 10: iinc 0, 01 // decrement register 0 (n) by 1 11: goto 2 // goto PC 2 14: iload 1 // load register 1 (res) 15: ireturn // return its value to caller

56 자바스택및메쏘드호출 쓰레드당하나의자바스택 자바스택위에스택프레임들이쌓인다. 메쏘드호출당하나의스택프레임 오퍼랜드스택 (Operand stack) 지역변수 (Local variable) 프레임크기는메쏘드가컴파일될때결정된다.

57 쓰레드와자바스택 Thread 1 Thread 2 Thread 3 Thread 1 Thread 2 Thread 3 Stack frame Stack frame Stack frame Stack frame Stack frame Stack frame Stack frame Stack frame Thread 3 pc registers Stack frame Java stacks native method stacks

58 JVM uses stack machine Java Class A extends Object { int i void f(int val) { i = val + 1;} } Bytecode Method void f(int) aload 0 ; object ref this iload 1 ; int val iconst 1 iadd ; add val +1 putfield #4 <Field int i> return refers to const pool JVM Stack frame data area local variables operand stack Return addr, exception info, Const pool res.

59 메쏘드호출명령어 invokevirtual 객체의가상 (virtual, instance) 메쏘드호출 묵시적매개변수 : this invokeinterface 참조타입이인터페이스일때객체의가상메쏘드호출 묵시적매개변수 : this invokespecial 실체초기화메쏘드, 전용메쏘드, 수퍼클래스메쏘드호출 묵시적매개변수 : this invokestatic 클래스의정적메쏘드 (static method) 호출

60 메쏘드호출과 this 메쏘드호출의구현 대상객체 (target object) 는 0-번째매개변수로전달 x.m( ); m(x, ); 메쏘드선언의구현 this는 0-번째형식매개변수이름 m( ) { } m(this, ) { }

61 메쏘드호출과프레임 메쏘드 m 호출전 호출의대상객체 (target object) 주소를스택에넣는다. 실매개변수값들을스택에넣는다. 메쏘드 m 호출후 m을위한새로운프레임을자바스택에넣는다 m의형식매개변수에실매개변수값을복사한다. m 의다른지역변수를초기화한다.

62 메쏘드호출예 int method1 () {. method2(a, b);. } method1 b a this.. Other local variables of method 2 b a this.. method2 method1 Local variables Local variables 호출전 호출후

63 invokevirtual int add12and13() { } return addtwo(12, 13); Method int add12and13 0 aload_0 // Push local variable 0 (this) 1 bipush 12 // Push int constant 12 3 bipush 13 // Push int constant 13 5 invokevirtual #4 // Method Example.addtwo(II)I 8 ireturn // Return int on top of operand stack // it is the int result of addtwo()

64 invokestatic int add12and13() { } return addtwostatic(12, 13); Method int add12and13 0 bipush 12 2 bipush 13 4 invokestatic #3 // Method Example.addTwoStatic(II)I 7 ireturn

65 메쏘드테이블 (Method Table) 클래스당자료구조 클래스의메쏘드들에대한포인터를갖는테이블 메쏘드호출을위한자료구조 각객체는해당클래스의메쏘드테이블포인터를갖는다. 메쏘드호출구현 객체로부터메쏘드테이블포인터를얻는다. 메쏘드아이디를이용하여해당메쏘드의주소를얻는다. 그주소로점프한다. 상속과재정의 서브클래스는수퍼클래스의메쏘드테이블을상속받는다. 메쏘드가재정의되면해당메쏘드테이블엔트리도갱신된다.

66 클래스와메쏘드테이블 class A { }; int foo() { } void bar() { } address of foo() address of bar() 0 1 Method table of A class B extends A { int foo() { } float boo() { } }; address of foo() 0 address of bar() 1 address of boo() 2 Method table of B

67 메쏘드호출예 A a = new A(); a.foo(); Object reference variable new A( ) Objects Data 0 1 Method tables address of foo() address of bar(). a = new B(); a.foo(); a a.bar();. new B( ) Data 0 1 address of foo() address of bar() 2 address of boo()

68 예외 JVM은비정상적실행상태를탐지한다. Array index out of bounds Load and link error Run out of memory throw 문 예외를발생시킨다. 예외클래스 Exception 클래스의서브클래스로정의 모든예외는예외클래스의객체로 throw된다.

69 예외처리 예외관리자 예외발생지점의문맥 (context) 를저장한다. 예외를처리할수있는가장가까운 catch 절을찾는다. 발생된예외의타입과예외테이블의 catch 절에선언된타입을비교한다. 찾으면예외 ( 에대한참조 ) 를오퍼랜드스택에넣고 catch 절을실행한다. 찾지못하면해당자바쓰레드를종료한다. 정상적인실행흐름은 catch 절의예외처리기와분리된다.

70 JVM 의 try-catch void catchone() { try { tryitout(); } catch (TestExc e) { handleexc(e); } } Method void catchone() 0 aload_0 // Beginning of try block 1 invokevirtual #6 // Method Example.tryItOut()V 4 return // End of try block; normal return 5 astore_1 // Store thrown value in local variable 1 6 aload_0 // Push this 7 aload_1 // Push thrown value 8 invokevirtual #5 // Invoke handler method: // Example.handleExc(LTestExc;)V 11 return // Return after handling TestExc Exception table: From To Target Type Class TestExc

71 Java Summary Objects have fields and methods alloc on heap, access by pointer, garbage collected Classes Public, Private, Protected, Package (not exactly C++) Can have static (class) members Constructors and finalize methods Inheritance Single inheritance Final classes and methods

72 Java Summary (II) Subtyping Determined from inheritance hierarchy Class may implement multiple interfaces Virtual machine Load bytecode for classes at run time Verifier checks bytecode Interpreter also makes run-time checks type casts array bounds Portability and security are main considerations

73 Some Highlights Dynamic lookup Different bytecodes for by-class, by-interface Search vtable + Bytecode rewriting or caching Subtyping Interfaces instead of multiple inheritance Awkward treatment of array subtyping (my opinion) Bytecode-based JVM Bytcode verifier Security: security manager, stack inspection

74 Links Enhancements in JDK 5 J2SE 5.0 in a Nutshell Generics m

1

1 1 1....6 1.1...6 2. Java Architecture...7 2.1 2SDK(Software Development Kit)...8 2.2 JRE(Java Runtime Environment)...9 2.3 (Java Virtual Machine, JVM)...10 2.4 JVM...11 2.5 (runtime)jvm...12 2.5.1 2.5.2

More information

Microsoft PowerPoint - chap11

Microsoft PowerPoint - chap11 10 장객체 - 지향프로그래밍 II 상속 상속 (Inheritance) 상속이란무엇인가? 기존의클래스로부터새로운클래스를유도하는것 자식클래스는부모클래스의메쏘드와데이터를상속 자식클래스에새로운변수나메쏘드를추가할수있다. 기존클래스 부모클래스 (parent class), 수퍼클래스 (superclass), 기반클래스 (base class) 유도클래스 자식클래스 (child

More information

Microsoft PowerPoint - java2 [호환 모드]

Microsoft PowerPoint - java2 [호환 모드] 10 장객체- 지향프로그래밍 II 창병모 1 상속 창병모 2 상속 (Inheritance) 상속이란무엇인가? 기존의클래스로부터새로운클래스를유도하는것 자식클래스는부모클래스의메쏘드와데이터를상속 자식클래스에새로운변수나메쏘드를추가할수있다. 기존클래스 부모클래스 (parent class), 수퍼클래스 (superclass), 기반클래스 (base class) 유도클래스

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 @ Lesson 2... ( ). ( ). @ vs. logic data method variable behavior attribute method field Flow (Type), ( ) member @ () : C program Method A ( ) Method B ( ) Method C () program : Java, C++, C# data @ Program

More information

gnu-lee-oop-kor-lec06-3-chap7

gnu-lee-oop-kor-lec06-3-chap7 어서와 Java 는처음이지! 제 7 장상속 Super 키워드 상속과생성자 상속과다형성 서브클래스의객체가생성될때, 서브클래스의생성자만호출될까? 아니면수퍼클래스의생성자도호출되는가? class Base{ public Base(String msg) { System.out.println("Base() 생성자 "); ; class Derived extends Base

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 @ Lesson 1,..... @ 1 Green Project 1991 Oak Java 1995. 5 December '90 by Patrick Naughton, Mike Sheridan and James Gosling Embedded in various consumer electronic device 1992. 9. 3 Star 7 1993 www portability

More information

JAVA PROGRAMMING 실습 08.다형성

JAVA PROGRAMMING 실습 08.다형성 2015 학년도 2 학기 1. 추상메소드 선언은되어있으나코드구현되어있지않은메소드 abstract 키워드사용 메소드타입, 이름, 매개변수리스트만선언 public abstract String getname(); public abstract void setname(string s); 2. 추상클래스 abstract 키워드로선언한클래스 종류 추상메소드를포함하는클래스

More information

JVM 메모리구조

JVM 메모리구조 조명이정도면괜찮조! 주제 JVM 메모리구조 설미라자료조사, 자료작성, PPT 작성, 보고서작성. 발표. 조장. 최지성자료조사, 자료작성, PPT 작성, 보고서작성. 발표. 조원 이용열자료조사, 자료작성, PPT 작성, 보고서작성. 이윤경 자료조사, 자료작성, PPT작성, 보고서작성. 이수은 자료조사, 자료작성, PPT작성, 보고서작성. 발표일 2013. 05.

More information

02 C h a p t e r Java

02 C h a p t e r Java 02 C h a p t e r Java Bioinformatics in J a va,, 2 1,,,, C++, Python, (Java),,, (http://wwwbiojavaorg),, 13, 3D GUI,,, (Java programming language) (Sun Microsystems) 1995 1990 (green project) TV 22 CHAPTER

More information

강의10

강의10 Computer Programming gdb and awk 12 th Lecture 김현철컴퓨터공학부서울대학교 순서 C Compiler and Linker 보충 Static vs Shared Libraries ( 계속 ) gdb awk Q&A Shared vs Static Libraries ( 계속 ) Advantage of Using Libraries Reduced

More information

01-OOPConcepts(2).PDF

01-OOPConcepts(2).PDF Object-Oriented Programming Concepts Tel: 02-824-5768 E-mail: hhcho@selabsoongsilackr? OOP (Object) (Encapsulation) (Message) (Class) (Inheritance) (Polymorphism) (Abstract Class) (Interface) 2 1 + = (Dependency)

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 @ Lesson 4 (Object) (Class) (Instance) (Method) (Constructor) Memory 1 UML 1 @ & 1 (Real World) (Software World) @ &.. () () @ & 2 (Real World) (Software World) OOA/ Modeling Abstraction Instantiation

More information

Design Issues

Design Issues 11 COMPUTER PROGRAMMING INHERIATANCE CONTENTS OVERVIEW OF INHERITANCE INHERITANCE OF MEMBER VARIABLE RESERVED WORD SUPER METHOD INHERITANCE and OVERRIDING INHERITANCE and CONSTRUCTOR 2 Overview of Inheritance

More information

쉽게 풀어쓴 C 프로그래밍

쉽게 풀어쓴 C 프로그래밍 Power Java 제 11 장상속 이번장에서학습할내용 상속이란? 상속의사용 메소드재정의 접근지정자 상속과생성자 Object 클래스 종단클래스 상속을코드를재사용하기위한중요한기법입니다. 상속이란? 상속의개념은현실세계에도존재한다. 상속의장점 상속의장점 상속을통하여기존클래스의필드와메소드를재사용 기존클래스의일부변경도가능 상속을이용하게되면복잡한 GUI 프로그램을순식간에작성

More information

Microsoft Word - FunctionCall

Microsoft Word - FunctionCall Function all Mechanism /* Simple Program */ #define get_int() IN KEYOARD #define put_int(val) LD A val \ OUT MONITOR int add_two(int a, int b) { int tmp; tmp = a+b; return tmp; } local auto variable stack

More information

Java ~ Java program: main() class class» public static void main(string args[])» First.java (main class ) /* The first simple program */ public class

Java ~ Java program: main() class class» public static void main(string args[])» First.java (main class ) /* The first simple program */ public class Linux JAVA 1. http://java.sun.com/j2se/1.4.2/download.html J2SE 1.4.2 SDK 2. Linux RPM ( 9 ) 3. sh j2sdk-1_4_2_07-linux-i586-rpm.bin 4. rpm Uvh j2sdk-1_4_2_07-linux-i586-rpm 5. PATH JAVA 1. vi.bash_profile

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 @ Lesson 3 if, if else, if else if, switch case for, while, do while break, continue : System.in, args, JOptionPane for (,, ) @ vs. logic data method variable Data Data Flow (Type), ( ) @ Member field

More information

C# Programming Guide - Types

C# Programming Guide - Types C# Programming Guide - Types 최도경 lifeisforu@wemade.com 이문서는 MSDN 의 Types 를요약하고보충한것입니다. http://msdn.microsoft.com/enus/library/ms173104(v=vs.100).aspx Types, Variables, and Values C# 은 type 에민감한언어이다. 모든

More information

Microsoft PowerPoint - 2강

Microsoft PowerPoint - 2강 컴퓨터과학과 김희천교수 학습개요 Java 언어문법의기본사항, 자료형, 변수와상수선언및사용법, 각종연산자사용법, if/switch 등과같은제어문사용법등에대해설명한다. 또한 C++ 언어와선언 / 사용방법이다른 Java의배열선언및사용법에대해서설명한다. Java 언어의효과적인활용을위해서는기본문법을이해하는것이중요하다. 객체지향의기본개념에대해알아보고 Java에서어떻게객체지향적요소를적용하고있는지살펴본다.

More information

6주차.key

6주차.key 6, Process concept A program in execution Program code PCB (process control block) Program counter, registers, etc. Stack Heap Data section => global variable Process in memory Process state New Running

More information

5장.key

5장.key JAVA Programming 1 (inheritance) 2!,!! 4 3 4!!!! 5 public class Person {... public class Student extends Person { // Person Student... public class StudentWorker extends Student { // Student StudentWorker...!

More information

구문 분석

구문 분석 컴파일러구성 제 10 강 중간언어 / 인터프리터 Motivation rapid development of machine architectures proliferation of programming languages portable & adaptable compiler design --- P_CODE porting --- rewriting only back-end

More information

슬라이드 1

슬라이드 1 UNIT 16 예외처리 로봇 SW 교육원 3 기 최상훈 학습목표 2 예외처리구문 try-catch-finally 문을사용핛수있다. 프로그램오류 3 프로그램오류의종류 컴파일에러 (compile-time error) : 컴파일실행시발생 럮타임에러 (runtime error) : 프로그램실행시발생 에러 (error) 프로그램코드에의해서해결될수없는심각핚오류 ex)

More information

자바 프로그래밍

자바 프로그래밍 5 (kkman@mail.sangji.ac.kr) (Class), (template) (Object) public, final, abstract [modifier] class ClassName { // // (, ) Class Circle { int radius, color ; int x, y ; float getarea() { return 3.14159

More information

ilist.add(new Integer(1))과 같이 사용하지 않고 ilist.add(1)과 같이 사용한 것은 자바 5.0에 추가된 기본 자료형과 해당 객체 자료 형과의 오토박싱/언박싱 기능을 사용한 것으로 오토박싱이란 자바 컴파일러가 객체를 요구하는 곳에 기본 자료형

ilist.add(new Integer(1))과 같이 사용하지 않고 ilist.add(1)과 같이 사용한 것은 자바 5.0에 추가된 기본 자료형과 해당 객체 자료 형과의 오토박싱/언박싱 기능을 사용한 것으로 오토박싱이란 자바 컴파일러가 객체를 요구하는 곳에 기본 자료형 바에 제네릭스(generics)를 도입하기 위한 연구는 이미 8년 전인 1996년부터라고 한다. 실제로 자바에 제네릭스를 도입하 는 몇 가지 방안들이 논문으로 나오기 시작한 것이 1998년 초임을 감 안하면 무려 8년이 지난 후에야 자바 5.0에 전격 채택되었다는 것은 이것이 얼마나 어려운 일이었나 하는 것을 보여준다. 자바의 스펙을 결정하는 표준화 절차인

More information

PowerPoint Presentation

PowerPoint Presentation Package Class 1 Heeseung Jo 목차 section 1 패키지개요와패키지의사용 section 2 java.lang 패키지의개요 section 3 Object 클래스 section 4 포장 (Wrapper) 클래스 section 5 문자열의개요 section 6 String 클래스 section 7 StringBuffer 클래스 section

More information

Semantic Consistency in Information Exchange

Semantic Consistency in Information Exchange 제 6 장제어 (Control) 6.1 구조적프로그래밍 (Structured Programming) 6.2 예외 (Exceptions) Reading Chap. 7 숙대창병모 1 6.1 구조적프로그래밍 숙대창병모 2 Fortran 제어구조 10 IF (X.GT. 0.000001) GO TO 20 11 X = -X IF (X.LT. 0.000001) GO TO

More information

Cluster management software

Cluster management software 자바네트워크프로그래밍 (OCJP 국제공인자격취득중심 ) 충북대학교 최민 기본예제 예외클래스를정의하고사용하는예제 class NewException extends Exception { public class ExceptionTest { static void methoda() throws NewException { System.out.println("NewException

More information

예외 예외정의예외발생예외처리예외전파 단정 단정의선언 단정조건검사옵션 2

예외 예외정의예외발생예외처리예외전파 단정 단정의선언 단정조건검사옵션 2 예외 예외정의예외발생예외처리예외전파 단정 단정의선언 단정조건검사옵션 kkman@sangji.ac.kr 2 예외 (exception) 실행시간에발생하는에러 (run-time error) 프로그램의비정상적인종료잘못된실행결과 예외처리 (exception handling) 기대되지않은상황에대해예외를발생야기된예외를적절히처리 (exception handler) kkman@sangji.ac.kr

More information

예제 2) Test.java class A intvar= 10; void method() class B extends A intvar= 20; 1"); void method() 2"); void method1() public class Test 3"); args) A

예제 2) Test.java class A intvar= 10; void method() class B extends A intvar= 20; 1); void method() 2); void method1() public class Test 3); args) A 제 10 장상속 예제 1) ConstructorTest.java class Parent public Parent() super - default"); public Parent(int i) this("hello"); super(int) constructor" + i); public Parent(char c) this(); super(char) constructor

More information

q 이장에서다룰내용 1 객체지향프로그래밍의이해 2 객체지향언어 : 자바 2

q 이장에서다룰내용 1 객체지향프로그래밍의이해 2 객체지향언어 : 자바 2 객체지향프로그래밍 IT CookBook, 자바로배우는쉬운자료구조 q 이장에서다룰내용 1 객체지향프로그래밍의이해 2 객체지향언어 : 자바 2 q 객체지향프로그래밍의이해 v 프로그래밍기법의발달 A 군의사업발전 1 단계 구조적프로그래밍방식 3 q 객체지향프로그래밍의이해 A 군의사업발전 2 단계 객체지향프로그래밍방식 4 q 객체지향프로그래밍의이해 v 객체란무엇인가

More information

untitled

untitled - -, (insert) (delete) - - (insert) (delete) (top ) - - (insert) (rear) (delete) (front) A A B top A B C top push(a) push(b) push(c) A B top pop() top A B D push(d) top #define MAX_STACK_SIZE 100 int

More information

제11장 프로세스와 쓰레드

제11장 프로세스와 쓰레드 제9장자바쓰레드 9.1 Thread 기초 (1/5) 프로그램 명령어들의연속 (a sequence of instruction) 프로세스 / Thread 실행중인프로그램 (program in execution) 프로세스생성과실행을위한함수들 자바 Thread 2 9.1 Thread 기초 (2/5) 프로세스단위작업의문제점 프로세스생성시오버헤드 컨텍스트스위치오버헤드

More information

초보자를 위한 자바 2 21일 완성 - 최신개정판

초보자를 위한 자바 2 21일 완성 - 최신개정판 .,,.,. 7. Sun Microsystems.,,. Sun Bill Joy.. 15... ( ), ( )... 4600. .,,,,,., 5 Java 2 1.4. C++, Perl, Visual Basic, Delphi, Microsoft C#. WebGain Visual Cafe, Borland JBuilder, Sun ONE Studio., Sun Java

More information

rmi_박준용_final.PDF

rmi_박준용_final.PDF (RMI) - JSTORM http://wwwjstormpekr (RMI)- Document title: Document file name: Revision number: Issued by: Document Information (RMI)- rmi finaldoc Issue Date: Status:

More information

PowerPoint Presentation

PowerPoint Presentation 객체지향프로그래밍 오류처리 손시운 ssw5176@kangwon.ac.kr 오류메시지를분석한다. 오류메시지에서많은내용을알수있다. 2 디버깅 디버거를사용하면프로그램에서쉽게오류를감지하고진단할수있다. 디버거는중단점을설정하여서프로그램의실행을제어할수있으며문장 단위로실행하거나변수의값을살펴볼수있다. 3 이클립스에서디버깅 4 이클립스에서디버깅 5 이클립스의디버깅명령어 6 예외처리

More information

Microsoft Word - ExecutionStack

Microsoft Word - ExecutionStack Lecture 15: LM code from high level language /* Simple Program */ external int get_int(); external void put_int(); int sum; clear_sum() { sum=0; int step=2; main() { register int i; static int count; clear_sum();

More information

9장.예외와 단정

9장.예외와 단정 예외 예외정의예외발생예외처리예외전파 단정 단정의선언 단정조건검사옵션 [2/28] 예외 (exception) 실행시간에발생하는에러 (run-time error) 프로그램의비정상적인종료잘못된실행결과 예외처리 (exception handling) 기대되지않은상황에대해예외를발생 야기된예외를적절히처리 (exception handler) [3/28] 단정 (assertion)

More information

<4D F736F F F696E74202D20C1A63038C0E520C5ACB7A1BDBABFCD20B0B4C3BC4928B0ADC0C729205BC8A3C8AF20B8F0B5E55D>

<4D F736F F F696E74202D20C1A63038C0E520C5ACB7A1BDBABFCD20B0B4C3BC4928B0ADC0C729205BC8A3C8AF20B8F0B5E55D> Power Java 제 8 장클래스와객체 I 이번장에서학습할내용 클래스와객체 객체의일생직접 메소드클래스를 필드작성해 UML 봅시다. QUIZ 1. 객체는 속성과 동작을가지고있다. 2. 자동차가객체라면클래스는 설계도이다. 먼저앞장에서학습한클래스와객체의개념을복습해봅시다. 클래스의구성 클래스 (class) 는객체의설계도라할수있다. 클래스는필드와메소드로이루어진다.

More information

PowerPoint Presentation

PowerPoint Presentation Class - Property Jo, Heeseung 목차 section 1 클래스의일반구조 section 2 클래스선언 section 3 객체의생성 section 4 멤버변수 4-1 객체변수 4-2 클래스변수 4-3 종단 (final) 변수 4-4 멤버변수접근방법 section 5 멤버변수접근한정자 5-1 public 5-2 private 5-3 한정자없음

More information

09-interface.key

09-interface.key 9 Database insert(record r): boolean find(key k): Record 1 Record getkey(): Key * Record Key Database.? Key equals(key y): boolean Database insert(record r): boolean find(key k): Record * Database OK 1

More information

thesis

thesis CORBA TMN Surveillance System DPNM Lab, GSIT, POSTECH Email: mnd@postech.ac.kr Contents Motivation & Goal Related Work CORBA TMN Surveillance System Implementation Conclusion & Future Work 2 Motivation

More information

03-JAVA Syntax(2).PDF

03-JAVA Syntax(2).PDF JAVA Programming Language Syntax of JAVA (literal) (Variable and data types) (Comments) (Arithmetic) (Comparisons) (Operators) 2 HelloWorld application Helloworldjava // class HelloWorld { //attribute

More information

No Slide Title

No Slide Title Copyright, 2001 Multimedia Lab., CH 3. COM object (In-process server) Eun-sung Lee twoss@mmlab.net Multimedia Lab. Dept. of Electrical and Computer Eng. University of Seoul Seoul, Korea 0. Contents 1.

More information

Deok9_Exploit Technique

Deok9_Exploit Technique Exploit Technique CodeEngn Co-Administrator!!! and Team Sur3x5F Member Nick : Deok9 E-mail : DDeok9@gmail.com HomePage : http://deok9.sur3x5f.org Twitter :@DDeok9 > 1. Shell Code 2. Security

More information

JAVA PROGRAMMING 실습 02. 표준 입출력

JAVA PROGRAMMING 실습 02. 표준 입출력 # 왜생겼나요..? : 절차지향언어가가진단점을보완하고다음의목적을달성하기위해..! 1. 소프트웨어생산성향상 객체지향소프트웨어를새로만드는경우이미만든개체지향소프트웨어를상속받거나객체를 가져다재사용할수있어부분수정을통해소프트웨어를다시만드는부담줄임. 2. 실세계에대한쉬운모델링 실세계의일은절차나과정보다는일과관련된많은물체들의상호작용으로묘사. 캡슐화 메소드와데이터를클래스내에선언하고구현

More information

본문01

본문01 Ⅱ 논술 지도의 방법과 실제 2. 읽기에서 논술까지 의 개발 배경 읽기에서 논술까지 자료집 개발의 본래 목적은 초 중 고교 학교 평가에서 서술형 평가 비중이 2005 학년도 30%, 2006학년도 40%, 2007학년도 50%로 확대 되고, 2008학년도부터 대학 입시에서 논술 비중이 커지면서 논술 교육은 학교가 책임진다. 는 풍토 조성으로 공교육의 신뢰성과

More information

Modern Javascript

Modern Javascript ES6 - Arrow Function Class Template String Destructuring Default, Rest, Spread let, const for..of Promises Module System Map, Set * Generator * Symbol * * https://babeljs.io/ Babel is a JavaScript compiler.

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 Lab 4 ADT Design 클래스로정의됨. 모든객체들은힙영역에할당됨. 캡슐화 (Encapsulation) : Data representation + Operation 정보은닉 (Information Hiding) : Opertion부분은가려져있고, 사용자가 operation으로만사용가능해야함. 클래스정의의형태 public class Person { private

More information

Microsoft PowerPoint - 04-UDP Programming.ppt

Microsoft PowerPoint - 04-UDP Programming.ppt Chapter 4. UDP Dongwon Jeong djeong@kunsan.ac.kr http://ist.kunsan.ac.kr/ Dept. of Informatics & Statistics 목차 UDP 1 1 UDP 개념 자바 UDP 프로그램작성 클라이언트와서버모두 DatagramSocket 클래스로생성 상호간통신은 DatagramPacket 클래스를이용하여

More information

#Ȳ¿ë¼®

#Ȳ¿ë¼® http://www.kbc.go.kr/ A B yk u δ = 2u k 1 = yk u = 0. 659 2nu k = 1 k k 1 n yk k Abstract Web Repertoire and Concentration Rate : Analysing Web Traffic Data Yong - Suk Hwang (Research

More information

PowerPoint Presentation

PowerPoint Presentation 객체지향프로그래밍 클래스, 객체, 메소드 ( 실습 ) 손시운 ssw5176@kangwon.ac.kr 예제 1. 필드만있는클래스 텔레비젼 2 예제 1. 필드만있는클래스 3 예제 2. 여러개의객체생성하기 4 5 예제 3. 메소드가추가된클래스 public class Television { int channel; // 채널번호 int volume; // 볼륨 boolean

More information

Runtime Data Areas 엑셈컨설팅본부 /APM 팀임대호 Runtime Data Area 구조 Runtime Data Area 는 JVM 이프로그램을수행하기위해할당받는메모리영역이라고할수있다. 실제 WAS 성능문제에직면했을때, 대부분의문제점은 Runtime Da

Runtime Data Areas 엑셈컨설팅본부 /APM 팀임대호 Runtime Data Area 구조 Runtime Data Area 는 JVM 이프로그램을수행하기위해할당받는메모리영역이라고할수있다. 실제 WAS 성능문제에직면했을때, 대부분의문제점은 Runtime Da Runtime Data Areas 엑셈컨설팅본부 /APM 팀임대호 Runtime Data Area 구조 Runtime Data Area 는 JVM 이프로그램을수행하기위해할당받는메모리영역이라고할수있다. 실제 WAS 성능문제에직면했을때, 대부분의문제점은 Runtime Data Area 에서발생하는경우가많다. Memory Leak 이나 Garbage Collection

More information

Page 2 of 6 Here are the rules for conjugating Whether (or not) and If when using a Descriptive Verb. The only difference here from Action Verbs is wh

Page 2 of 6 Here are the rules for conjugating Whether (or not) and If when using a Descriptive Verb. The only difference here from Action Verbs is wh Page 1 of 6 Learn Korean Ep. 13: Whether (or not) and If Let s go over how to say Whether and If. An example in English would be I don t know whether he ll be there, or I don t know if he ll be there.

More information

No Slide Title

No Slide Title 상속 이충기 명지대학교컴퓨터공학과 상속 Q: 건설회사는기존아파트와조금다르거나추가적인특징들을가진새아파트를지을때어떻게하는가? A: 2 상속 상속 (inheritance) 은클래스들을연관시키는자연스럽고계층적인방법이다. 상속은객체지향프로그래밍의가장중요한개념중의하나이다. 상속은 은 이다 라는관계 (is-a relationship) 를나타낸다. 이관계를적용하여클래스들을상하관계로연결하는것이상속이다.

More information

Chap7.PDF

Chap7.PDF Chapter 7 The SUN Intranet Data Warehouse: Architecture and Tools All rights reserved 1 Intranet Data Warehouse : Distributed Networking Computing Peer-to-peer Peer-to-peer:,. C/S Microsoft ActiveX DCOM(Distributed

More information

슬라이드 1

슬라이드 1 / 유닉스시스템개요 / 파일 / 프로세스 01 File Descriptor file file descriptor file type unix 에서의파일은단지바이트들의나열임 operating system 은파일에어떤포맷도부과하지않음 파일의내용은바이트단위로주소를줄수있음 file descriptor 는 0 이나양수임 file 은 open 이나 creat 로 file

More information

Something that can be seen, touched or otherwise sensed

Something that can be seen, touched or otherwise sensed Something that can be seen, touched or otherwise sensed Things about an object Weight Height Material Things an object does Pen writes Book stores words Water have Fresh water Rivers Oceans have

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 Reasons for Poor Performance Programs 60% Design 20% System 2.5% Database 17.5% Source: ORACLE Performance Tuning 1 SMS TOOL DBA Monitoring TOOL Administration TOOL Performance Insight Backup SQL TUNING

More information

JAVA PROGRAMMING 실습 07. 상속

JAVA PROGRAMMING 실습 07. 상속 상속 부모클래스에정의된필드와메소드를자식클래스가물려받는것 슈퍼클래스 (superclass) 특성을물려주는상위클래스 서브클래스 (subclass) 특성을물려받는하위클래스 슈퍼클래스에자신만의특성 ( 필드, 메소드 ) 추가 슈퍼클래스의특성 ( 메소드 ) 을수정 = 오버라이딩구체화 class Phone 전화걸기전화받기 class MobilePhone 전화걸기전화받기무선기지국연결배터리충전하기

More information

example code are examined in this stage The low pressure pressurizer reactor trip module of the Plant Protection System was programmed as subject for

example code are examined in this stage The low pressure pressurizer reactor trip module of the Plant Protection System was programmed as subject for 2003 Development of the Software Generation Method using Model Driven Software Engineering Tool,,,,, Hoon-Seon Chang, Jae-Cheon Jung, Jae-Hack Kim Hee-Hwan Han, Do-Yeon Kim, Young-Woo Chang Wang Sik, Moon

More information

Chap06(Interprocess Communication).PDF

Chap06(Interprocess Communication).PDF Interprocess Communication 2002 2 Hyun-Ju Park Introduction (interprocess communication; IPC) IPC data transfer sharing data event notification resource sharing process control Interprocess Communication

More information

Microsoft PowerPoint - PL_03-04.pptx

Microsoft PowerPoint - PL_03-04.pptx Copyright, 2011 H. Y. Kwak, Jeju National University. Kwak, Ho-Young http://cybertec.cheju.ac.kr Contents 1 프로그래밍 언어 소개 2 언어의 변천 3 프로그래밍 언어 설계 4 프로그래밍 언어의 구문과 구현 기법 5 6 7 컴파일러 개요 변수, 바인딩, 식 및 제어문 자료형 8

More information

Contents Contents 2 1 Abstract 3 2 Infer Checkers Eradicate Infer....

Contents Contents 2 1 Abstract 3 2 Infer Checkers Eradicate Infer.... SV2016 정적분석보고서 201214262 라가영 201313250 서지혁 June 9, 2016 1 Contents Contents 2 1 Abstract 3 2 Infer 3 2.1 Checkers................................ 3 2.2 Eradicate............................... 3 2.3 Infer..................................

More information

Microsoft PowerPoint - java1 [호환 모드]

Microsoft PowerPoint - java1 [호환 모드] 10 장객체 - 지향프로그래밍 I 창병모 1 10.1 객체 - 지향개념 창병모 2 객체지향 : 동기 프로그램에서실세계객체들을시뮬레이션 창병모 3 객체 (Object) 객체 상태 (state) 객체에대한데이터 행동 (behavior)- 할 ( 될 ) 수있는연산혹은동작 예 : 은행계좌 계좌번호 현재잔액 입금 출금 창병모 4 객체와클래스 객체 Object= 데이터

More information

PowerPoint Presentation

PowerPoint Presentation 객체지향프로그래밍 오류처리 손시운 ssw5176@kangwon.ac.kr 오류메시지를분석한다. 오류메시지에서많은내용을알수있다. 2 디버깅 디버거를사용하면프로그램에서쉽게오류를감지하고진단할수있다. 디버거는중단점을설정하여서프로그램의실행을제어할수있으며문장 단위로실행하거나변수의값을살펴볼수있다. 3 이클립스에서디버깅 4 이클립스에서디버깅 5 이클립스의디버깅명령어 6 예외처리

More information

No Slide Title

No Slide Title Copyright, 2017 Multimedia Lab., UOS 시스템프로그래밍 (Assembly Code and Calling Convention) Seong Jong Choi chois@uos.ac.kr Multimedia Lab. Dept. of Electrical and Computer Eng. University of Seoul Seoul, Korea

More information

Microsoft Word - java19-1-midterm-answer.doc

Microsoft Word - java19-1-midterm-answer.doc 중간고사 담당교수 : 단국대학교응용컴퓨터공학박경신 답은반드시답안지에기술할것. 공간이부족할경우반드시답안지몇쪽의뒤에있다고명기한후기술할것. 그외의경우의답안지뒤쪽이나연습지에기술한내용은답안으로인정안함. 답에는반드시네모를쳐서확실히표시할것. 답안지에학과, 학번, 이름외에본인의암호 (4자리숫자 ) 를기입하면성적공고시학번대신암호를 사용할것임. 1. 다음질문에답을하라. (55

More information

chap10.PDF

chap10.PDF 10 C++ Hello!! C C C++ C++ C++ 2 C++ 1980 Bell Bjarne Stroustrup C++ C C++ C, C++ C C 3 C C++ (prototype) (type checking) C C++ : C++ 4 C C++ (prototype) (type checking) [ 10-1] #include extern

More information

초보자를 위한 C# 21일 완성

초보자를 위한 C# 21일 완성 C# 21., 21 C#., 2 ~ 3 21. 2 ~ 3 21.,. 1~ 2 (, ), C#.,,.,., 21..,.,,, 3. A..,,.,.. Q&A.. 24 C#,.NET.,.,.,. Visual C# Visual Studio.NET,..,. CD., www. TeachYour sel f CSharp. com., ( )., C#.. C# 1, 1. WEEK

More information

JAVA PROGRAMMING 실습 09. 예외처리

JAVA PROGRAMMING 실습 09. 예외처리 2015 학년도 2 학기 예외? 프로그램실행중에발생하는예기치않은사건 예외가발생하는경우 정수를 0으로나누는경우 배열의크기보다큰인덱스로배열의원소를접근하는경우 파일의마지막부분에서데이터를읽으려고하는경우 예외처리 프로그램에문제를발생시키지않고프로그램을실행할수있게적절한조치를취하는것 자바는예외처리기를이용하여예외처리를할수있는기법제공 자바는예외를객체로취급!! 나뉨수를입력하시오

More information

The_IDA_Pro_Book

The_IDA_Pro_Book The IDA Pro Book Hacking Group OVERTIME force (forceteam01@gmail.com) GETTING STARTED WITH IDA IDA New : Go : IDA Previous : IDA File File -> Open Processor type : Loading Segment and Loading Offset x86

More information

제 1 강 희망의 땅, 알고리즘

제 1 강 희망의 땅, 알고리즘 제 2 강 C++ 언어개요 이재규 leejaku@shinbiro.com Topics C++ 언어의역사와개요 프로그래밍언어의패러다임변화 C 의확장언어로서의 C++ 살펴보기 포인터와레퍼런스 새로운메모리할당 Function Overloading, Template 객체지향언어로서의 C++ 살펴보기 OOP 의개념과실습 2.1 C++ 의역사와개요 프로그래밍언어의역사 C++

More information

Microsoft PowerPoint 자바-기본문법(Ch2).pptx

Microsoft PowerPoint 자바-기본문법(Ch2).pptx 자바기본문법 1. 기본사항 2. 자료형 3. 변수와상수 4. 연산자 1 주석 (Comments) 이해를돕기위한설명문 종류 // /* */ /** */ 활용예 javadoc HelloApplication.java 2 주석 (Comments) /* File name: HelloApplication.java Created by: Jung Created on: March

More information

신림프로그래머_클린코드.key

신림프로그래머_클린코드.key CLEAN CODE 6 11st Front Dev. Team 6 1. 2. 3. checked exception 4. 5. 6. 11 : 2 4 : java (50%), javascript (35%), SQL/PL-SQL (15%) : Spring, ibatis, Oracle, jquery ? , (, ) ( ) 클린코드를 무시한다면 . 6 1. ,,,!

More information

<B3EDB9AEC1FD5F3235C1FD2E687770>

<B3EDB9AEC1FD5F3235C1FD2E687770> 오용록의 작품세계 윤 혜 진 1) * 이 논문은 생전( 生 前 )에 학자로 주로 활동하였던 오용록(1955~2012)이 작곡한 작품들을 살펴보고 그의 작품세계를 파악하고자 하는 것이다. 한국음악이론이 원 래 작곡과 이론을 포함하였던 초기 작곡이론전공의 형태를 염두에 둔다면 그의 연 구에서 기존연구의 방법론을 넘어서 창의적인 분석 개념과 체계를 적용하려는

More information

PowerPoint Template

PowerPoint Template 10. 예외처리 대구가톨릭대학교 IT 공학부 소프트웨어공학연구실 목차 2 10.1 개요 10.2 C++ 의예외처리 10.3 Java 의예외처리 10.4 Ada 의예외처리 10.1 예외처리의개요 (1) 3 예외 (exception) 오버플로나언더플로, 0 으로나누기, 배열첨자범위이탈오류와같이프로그램실행중에비정상적으로발생하는사건 예외처리 (exception handling)

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 상속 배효철 th1g@nate.com 1 목차 상속개념 클래스상속 부모생성자호출 메소드재정의 final 클래스와 final 메소드 protected 접근제한자 타입변환과다형성 추상클래스 2 상속개념 상속 (Inheritance) 이란? 현실세계 : 부모가자식에게물려주는행위 부모가자식을선택해서물려줌 객체지향프로그램 : 자식 ( 하위, 파생 ) 클래스가부모 (

More information

10.0pt1height.7depth.3width±â10.0pt1height.7depth.3widthÃÊ10.0pt1height.7depth.3widthÅë10.0pt1height.7depth.3width°è10.0pt1height.7depth.3widthÇÁ10.0pt1height.7depth.3width·Î10.0pt1height.7depth.3width±×10.0pt1height.7depth.3width·¡10.0pt1height.7depth.3width¹Ö pt1height.7depth.3widthŬ10.0pt1height.7depth.3width·¡10.0pt1height.7depth.3width½º, 10.0pt1height.7depth.3width°´10.0pt1height.7depth.3widthü, 10.0pt1height.7depth.3widthº¯10.0pt1height.7depth.3width¼ö, 10.0pt1height.7depth.3width¸Þ10.0pt1height.7depth.3width¼Ò10.0pt1height.7depth.3widthµå

10.0pt1height.7depth.3width±â10.0pt1height.7depth.3widthÃÊ10.0pt1height.7depth.3widthÅë10.0pt1height.7depth.3width°è10.0pt1height.7depth.3widthÇÁ10.0pt1height.7depth.3width·Î10.0pt1height.7depth.3width±×10.0pt1height.7depth.3width·¡10.0pt1height.7depth.3width¹Ö pt1height.7depth.3widthŬ10.0pt1height.7depth.3width·¡10.0pt1height.7depth.3width½º, 10.0pt1height.7depth.3width°´10.0pt1height.7depth.3widthü, 10.0pt1height.7depth.3widthº¯10.0pt1height.7depth.3width¼ö, 10.0pt1height.7depth.3width¸Þ10.0pt1height.7depth.3width¼Ò10.0pt1height.7depth.3widthµå 기초통계프로그래밍 클래스, 객체, 변수, 메소드 hmkang@hallym.ac.kr 금융정보통계학과 강희모 ( 금융정보통계학과 ) 기초통계프로그래밍 1 / 26 자바구성파일 소스파일 소스파일 : 사용자가직접에디터에입력하는파일로자바프로그램언어가제공하는형식으로제작 소스파일의확장자는.java 임 컴파일 : javac 명령어를이용하여프로그래머가만든소스파일을컴파일하여실행파일.class

More information

10송동수.hwp

10송동수.hwp 종량제봉투의 불법유통 방지를 위한 폐기물관리법과 조례의 개선방안* 1) 송 동 수** 차 례 Ⅰ. 머리말 Ⅱ. 종량제봉투의 개요 Ⅲ. 종량제봉투의 불법유통사례 및 방지대책 Ⅳ. 폐기물관리법의 개선방안 Ⅴ. 지방자치단체 조례의 개선방안 Ⅵ. 결론 국문초록 1995년부터 쓰레기 종량제가 시행되면서 각 지방자치단체별로 쓰레기 종량제 봉투가 제작, 판매되기 시작하였는데,

More information

PowerPoint Presentation

PowerPoint Presentation Java 보안 오세종 1 목차 Java 의역사 Java 의특징 Java Development Kit (JDK) Java 에서의보안문제 Security Layer in Java Java 보안참조모델 Java 보안 API Java Protected Domains 보안모델 2 Java 의역사 1991년 Sun Microsystem 에 Green Team 발족 가정용기구들에대한운영체제개발착수.

More information

(Microsoft PowerPoint - java1-lecture11.ppt [\310\243\310\257 \270\360\265\345])

(Microsoft PowerPoint - java1-lecture11.ppt [\310\243\310\257 \270\360\265\345]) 예외와예외클래스 예외처리 514760-1 2016 년가을학기 12/08/2016 박경신 오류의종류 에러 (Error) 하드웨어의잘못된동작또는고장으로인한오류 에러가발생되면 JVM실행에문제가있으므로프로그램종료 정상실행상태로돌아갈수없음 예외 (Exception) 사용자의잘못된조작또는개발자의잘못된코딩으로인한오류 예외가발생되면프로그램종료 예외처리 추가하면정상실행상태로돌아갈수있음

More information

비긴쿡-자바 00앞부속

비긴쿡-자바 00앞부속 IT COOKBOOK 14 Java P r e f a c e Stay HungryStay Foolish 3D 15 C 3 16 Stay HungryStay Foolish CEO 2005 L e c t u r e S c h e d u l e 1 14 PPT API C A b o u t T h i s B o o k IT CookBook for Beginner Chapter

More information

11 템플릿적용 - Java Program Performance Tuning (김명호기술이사)

11 템플릿적용 - Java Program Performance Tuning (김명호기술이사) Java Program Performance Tuning ( ) n (Primes0) static List primes(int n) { List primes = new ArrayList(n); outer: for (int candidate = 2; n > 0; candidate++) { Iterator iter = primes.iterator(); while

More information

11¹Ú´ö±Ô

11¹Ú´ö±Ô A Review on Promotion of Storytelling Local Cultures - 265 - 2-266 - 3-267 - 4-268 - 5-269 - 6 7-270 - 7-271 - 8-272 - 9-273 - 10-274 - 11-275 - 12-276 - 13-277 - 14-278 - 15-279 - 16 7-280 - 17-281 -

More information

05-class.key

05-class.key 5 : 2 (method) (public) (private) (interface) 5.1 (Method), (public method) (private method) (constructor), 3 4 5.2 (client). (receiver)., System.out.println("Hello"); (client object) (receiver object)

More information

Microsoft PowerPoint - a10.ppt [호환 모드]

Microsoft PowerPoint - a10.ppt [호환 모드] Structure Chapter 10: Structures t and Macros Structure 관련된변수들의그룹으로이루어진자료구조 template, pattern field structure를구성하는변수 (cf) C언어의 struct 프로그램의 structure 접근 entire structure 또는 individual fields Structure는

More information

1. auto_ptr 다음프로그램의문제점은무엇인가? void func(void) int *p = new int; cout << " 양수입력 : "; cin >> *p; if (*p <= 0) cout << " 양수를입력해야합니다 " << endl; return; 동적할

1. auto_ptr 다음프로그램의문제점은무엇인가? void func(void) int *p = new int; cout <<  양수입력 : ; cin >> *p; if (*p <= 0) cout <<  양수를입력해야합니다  << endl; return; 동적할 15 장기타주제들 auto_ptr 변환함수 cast 연산자에의한명시적형변환실행시간타입정보알아내기 (RTTI) C++ 프로그래밍입문 1. auto_ptr 다음프로그램의문제점은무엇인가? void func(void) int *p = new int; cout > *p; if (*p

More information

MasoJava4_Dongbin.PDF

MasoJava4_Dongbin.PDF JSTORM http://wwwjstormpekr Issued by: < > Revision: Document Information Document title: Document file name: MasoJava4_Dongbindoc Revision number: Issued by: < > SI, dbin@handysoftcokr

More information

Analytics > Log & Crash Search > Unity ios SDK [Deprecated] Log & Crash Unity ios SDK. TOAST SDK. Log & Crash Unity SDK Log & Crash Search. Log & Cras

Analytics > Log & Crash Search > Unity ios SDK [Deprecated] Log & Crash Unity ios SDK. TOAST SDK. Log & Crash Unity SDK Log & Crash Search. Log & Cras Analytics > Log & Crash Search > Unity ios SDK [Deprecated] Log & Crash Unity ios SDK. TOAST SDK. Log & Crash Unity SDK Log & Crash Search. Log & Crash Unity SDK... Log & Crash Search. - Unity3D v4.0 ios

More information

Microsoft PowerPoint - ch07 - 포인터 pm0415

Microsoft PowerPoint - ch07 - 포인터 pm0415 2015-1 프로그래밍언어 7. 포인터 (Pointer), 동적메모리할당 2015 년 4 월 4 일 교수김영탁 영남대학교공과대학정보통신공학과 (Tel : +82-53-810-2497; Fax : +82-53-810-4742 http://antl.yu.ac.kr/; E-mail : ytkim@yu.ac.kr) Outline 포인터 (pointer) 란? 간접참조연산자

More information

쉽게 풀어쓴 C 프로그래밍

쉽게 풀어쓴 C 프로그래밍 제 11 장상속 1. 상속의개념을이해한다. 2. 상속을이용하여자식클래스를작성할수있다. 3. 상속과접근지정자와의관계를이해한다. 4. 상속시생성자와소멸자가호출되는순서를이해한다. 이번장에서만들어볼프로그램 class Circle { int x, y; int radius;... class Rect { int x, y; int width, height;... 중복 상속의개요

More information

solution map_....

solution map_.... SOLUTION BROCHURE RELIABLE STORAGE SOLUTIONS ETERNUS FOR RELIABILITY AND AVAILABILITY PROTECT YOUR DATA AND SUPPORT BUSINESS FLEXIBILITY WITH FUJITSU STORAGE SOLUTIONS kr.fujitsu.com INDEX 1. Storage System

More information

JUNIT 실습및발표

JUNIT 실습및발표 JUNIT 실습및발표 JUNIT 접속 www.junit.org DownLoad JUnit JavaDoc API Document 를참조 JUNIT 4.8.1 다운로드 설치파일 (jar 파일 ) 을다운로드 CLASSPATH 를설정 환경변수에서설정 실행할클래스에서 import JUnit 설치하기 테스트실행주석 @Test Test 를실행할 method 앞에붙임 expected

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 인터페이스 배효철 th1g@nate.com 1 목차 인터페이스의역할 인터페이스선언 인터페이스구현 인터페이스사용 타입변환과다형성 인터페이스상속 디폴트메소드와인터페이스확장 2 인터페이스의역할 인터페이스란? 개발코드와객체가서로통신하는접점 개발코드는인터페이스의메소드만알고있으면 OK 인터페이스의역할 개발코드가객체에종속되지않게 -> 객체교체할수있도록하는역할 개발코드변경없이리턴값또는실행내용이다양해질수있음

More information

final_thesis

final_thesis CORBA/SNMP DPNM Lab. POSTECH email : ymkang@postech.ac.kr Motivation CORBA/SNMP CORBA/SNMP 2 Motivation CMIP, SNMP and CORBA high cost, low efficiency, complexity 3 Goal (Information Model) (Operation)

More information

Microsoft PowerPoint - lec2.ppt

Microsoft PowerPoint - lec2.ppt 2008 학년도 1 학기 상지대학교컴퓨터정보공학부 고광만 강의내용 어휘구조 토큰 주석 자료형기본자료형 참조형배열, 열거형 2 어휘 (lexicon) 어휘구조와자료형 프로그램을구성하는최소기본단위토큰 (token) 이라부름문법적으로의미있는최소의단위컴파일과정의어휘분석단계에서처리 자료형 자료객체가갖는형 구조, 개념, 값, 연산자를정의 3 토큰 (token) 정의문법적으로의미있는최소의단위예,

More information

Vol.257 C O N T E N T S M O N T H L Y P U B L I C F I N A N C E F O R U M

Vol.257 C O N T E N T S M O N T H L Y P U B L I C F I N A N C E F O R U M 2017.11 Vol.257 C O N T E N T S 02 06 38 52 69 82 141 146 154 M O N T H L Y P U B L I C F I N A N C E F O R U M 2 2017.11 3 4 2017.11 6 2017.11 1) 7 2) 22.7 19.7 87 193.2 160.6 83 22.2 18.4 83 189.6 156.2

More information

chap 5: Trees

chap 5: Trees 5. Threaded Binary Tree 기본개념 n 개의노드를갖는이진트리에는 2n 개의링크가존재 2n 개의링크중에 n + 1 개의링크값은 null Null 링크를다른노드에대한포인터로대체 Threads Thread 의이용 ptr left_child = NULL 일경우, ptr left_child 를 ptr 의 inorder predecessor 를가리키도록변경

More information