과정명

Size: px
Start display at page:

Download "과정명"

Transcription

1 데이터접근프레임워크 (JPA 와 Hibernate) 교육기간 : ~ 강사 : 박석재, 임병인 넥스트리소프트 demonpark@nextree.co.kr byleem@nextree.co.kr

2 교육일정표 교육은매회 3 시간씩총 5 회에걸쳐진행합니다. 1 일차 2 일차 3 일차 4 일차 5 일차 5 월 26 일 ( 월 ) 5 월 27 일 ( 화 ) 5 월 28 일 ( 수 ) 5 월 29 일 ( 목 ) 5 월 30 일 ( 금 ) ORM 이해하기 영속성 패러다임불일치 계층형아키텍처 객체 / 관계형매핑 Quick Start - Hibernate Hibernate 개요 Hibernate 기본 OR Mapping I - Hibernate Spring 과 Hibernate 통합 OR Mapping II 트랜잭션관리 Hibernate 와 EJB - JPA 도메인모델과 JPA JPA 이용도메인객체구현 엔티티관계 엔티티매핑 엔티티관계매핑 - JPA 상속매핑 Entity Manager 질의 API JPQL - 1 -

3 4 일차 JPA 4.1 도메인모델과 JPA 4.2 JPA이용도메인객체구현 4.3 엔티티관계 4.4 엔티티매핑 4.5 엔티티관계매핑 도메인모델소개 문제도메인 도메인모델의액터 EJB3 자바지속성 API 자바클래스로서의도메인객체

4 도메인모델소개 도메인모델 시스템을통해해결하려고하는문제의개념적인이미지 객체와객체들의연관관계 (association) 로구성함 도메인모델의객체는물리적인객체가아니라시스템에서사용하는개념임 비즈니스룰과비즈니스로직은도메인모델위에서실행됨 (act on the domain model) Martin Fowler 가도메인모델의개념을처음사용 - 3 -

5 문제도메인 (1/3) 분석방향 JPA 를설명하는꼭필요한도메인부분만포함 온라인옥션에서품목을사고파는데직접관련된기능만대상으로함 현실적인예와는약간의거리를두고핵심개념은정확히반영 도메인내용 판매자 (Seller) 는품목 (item) 을 ActionBazaar 사이트에올린다. 품목은검색가능 (searchable) 카테고리와항해가능 (navigable) 카테고리로구성된다. 경매참여자 (Bidder) 는품목에입찰 (bid) 한다. 가장높은금액을써낸사람이이긴다

6 문제도메인 (2/3) 핵심기능 - 판매자는품목을검색가능한카테고리로등록하고, 입찰자는품목에입찰하고, 가장높은입찰금액을쓴입찰자가이긴다. 도메인객체들 Seller Item Category Bidder Bid Order - 5 -

7 문제도메인 (3/3) 엔티티와관계로구성된도메인모델 - 6 -

8 도메인모델의액터 (1/2) 관계를통해파악할수있는정보들 품목은판매자에의해판매되고, 판매자는여러품목을팔수있다. 품목은하나이상의카테고리에속하고, 각카테고리는한부모카테고리를가진다. 입찰자는품목에입찰한다. 도메인모델은, 객체가다루어지는방식을서술하지는않음 주문이하나이상의품목으로구성되며, 입찰자가주문한다는사실은알수있지만, 언제어떻게이관계가형성되는지알수없다. 비즈니스로직과비즈니스규칙에의해밝혀진다

9 도메인모델의액터 (2/2) 객체 (object) 도메인객체는자바의클래스와동일한개념 도메인객체 Category의인스턴스는수백개가될수있음 관계 (relationship) 한도메인객체가다른도메인객체를참조하고있음 관계의방향은일방향이거나양방향임 개수 (multiplicity, or cardinality) 1:1, 1:N, N:N 등의개수가존재함 선택사항 (optionality) cardinality가 0..1, 0..n, 0..2 등으로관계의대상이존재하지않을수도있음 예, 사용자 (User) 는청구정보 (BillingInfo) 를가질수도있고없을수도있음 - 8 -

10 EJB 3 자바지속성 API JPA(Java Persistence API) 메타데이터 기반 POJO 기술임, 따라서 Java 객체저장을위해특정인터페이스구현, 클래스상속, 프레임워크패턴준수등을하지않음 저장되는객체는 JPA 관련코드를한줄도가지지않음 POJO 로구성한도메인모델과 annotation 또는 Xml 만있으면됨 Annotation/Xml 포함정보 도메인객체가무엇인가? 도메인객체를어떻게식별하는가? () 도메인객체가어떻게 DB JPA 를사용한 O/R 매핑이 EJB2 의엔티티나 JDBC 에비해많이개선된것이긴하지만여전히매핑관련복잡한작업을해야함 - 9 -

11 자바클래스로서의도메인객체 POJO 구성요소 id 객체식별자 name,modificationdate 객체속성 items, parentcategory,subcategories 관계를위한객체속성 객체속성을위한 getter/setter 관계객체속성을위한 getter/setter public class Category { protected Long id; protected String name; protected Date modificationdate; protected Set<Item> items; protected Category parentcategory; protected Set<Category> subcategories; public Category() { public Long getid() { return this.id; public void setid(long id) { this.id = id; public String getname() { return this.name; public Category getparentcategory() { return this.parentcategory; public void setparentcategory(category parentcategory) { this.parentcategory = parentcategory;

12 4 일차 JPA 4.1 도메인모델과 JPA 4.2 JPA이용도메인객체구현 4.3 엔티티관계 4.4 엔티티매핑 4.5 엔티티관계매핑 테스트프로젝트생성 annotation 엔티티데이터저장 엔티티식별자 (identity) annotation

13 테스트프로젝트생성 (1/3) Maven Project Group Id: kr.nextree.edu.jpa Artifact Id: nexbay-entity Version: SNAPSHOT Packaging: jar Name: Nexbay Entity 과정명 : SQL 기초와 MyBatis SQL/MyBatis

14 테스트프로젝트생성 (2/3) 의존관계생성 <dependencies>.. <dependency> <groupid>org.hibernate</groupid> <artifactid>hibernate-annotations</artifactid> <version>3.5.5-final</version> </dependency> <dependency> <groupid>org.hibernate</groupid> <artifactid>hibernate-entitymanager</artifactid> <version>4.3.3.final</version> </dependency> <dependency> <groupid>org.slf4j</groupid> <artifactid>slf4j-api</artifactid> <version>1.7.7</version> <scope>test</scope> </dependency>.. <dependency> <groupid>org.slf4j</groupid> <artifactid>slf4j-log4j12</artifactid> <version>1.7.7</version> <scope>test</scope> </dependency> <dependency> <groupid>org.hsqldb</groupid> <artifactid>hsqldb</artifactid> <version>2.3.2</version> </dependency>.. </dependencies> 과정명 : SQL 기초와 MyBatis SQL/MyBatis

15 테스트프로젝트생성 (3/3) HSQLDB Server Mode 참고 : hsqldb-server-run.cmd 파일생성 java -cp./lib/hsqldb jar org.hsqldb.server -database.0 file:./z-nexbay-data/nexbaydb -dbname.0 nexbaydb hsqldb-manager-run.cmd 파일생성 java -cp./lib/hsqldb jar org.hsqldb.util.databasemanager jdbc 연결정보 jdbc:hsqldb:hsql://localhost:9001/nexbaydb 과정명 : SQL 기초와 MyBatis SQL/MyBatis

16 주석 (annotation) (1/2) 는 POJO 가고유하게식별되는도메인객체임을알림 public class Category { public Category() { public Category(String name) { 엔티티는완전한 POJO 이므로객체지향특성을 100% 활용할수있음 다형성 (polymorphism) 상속 (inheritance) User Bidder Seller SomeUser

17 주석 (annotation) (2/2) 상속과지속성 (persistence) User 가엔티티이므로 User 의모든속성 (userid, username, , ) 은 Seller 나 Bidder 가저장될때함께저장됨 User 자체가직접인스턴스가되거나저장되어서는안될경우, abstract class 로선언함 public class User { String userid; String username; String ; public class Seller extends User { public class Bidder extends User {

18 엔티티데이터저장 (1/3) 접근방식정의 필드-기반접근 : 필드나인스턴스변수를이용하여 O/R 매핑을정의 속성-기반접근 : 속성 (property) 을사용하여 O/R 매핑을정의 (getter/setter 사용 ) 필드기반접근 POJO의저장대상데이터필드를 public이나 protected로선언 Persistence Provider에게 getter/setter를무시하도록함 annotation을사용 public class Category { public Long id; public String name; public Date modificationdate; public Category() {

19 엔티티데이터저장 annotation 해당필드는저장하지않음 주로실행시점에사용하는정보이거나, 파생속성 (derived attribute) 임 public class Category protected Long activeusercount; transient public String generatedname; public Category() { 속성 (property) 태그를 getter 에붙임 transient 태그와동일한효과를가짐

20 엔티티데이터저장 (3/3) 데이터타입의상이함 POJO의인스턴스변수타입과테이블의타입이일치하지않음 따라서, 둘간에약간의제약조건이있음 Persitence 필드 / 속성이가능한데이터타입 Java 원시타입 : int, double, long 등 Java 원시타입래퍼 : Integer, Double String 타입 : String Java API Serializable 타입 : BigInteger, Date 사용자정의 Serializable 타입 : Serializable 배열타입 : byte[], char[] 열거타입 : {SELLER, bidder, CSR, ADMIN 엔티티의집합 : Set<Category> 임베디드클래스 태그를붙여정의한클래스

21 엔티티식별자 (identity) 명세 (1/4) 모든엔티티는유일하게식별이되어야함 (uniquely identifiable) 어느시점에엔티티는유일하게식별되는테이블의 row로저장되어야하기때문 테이블은일차키 (primary key) 로유일하게식별함 객체구분 서로다른객체 : 객체의식별자 (identity) 가다름 서로같은객체 : 객체의식별자 (identity) 가같음 객체비교 Object 클래스의 equals 메소드이용 예, name 이유일성식별자인경우, public boolean equals (Object other) { if (other instanceof Category) { return this.name.equals(((category)other).name) else { return false; 식별자로는 Long id 와같이 Long 타입이더경제적임

22 엔티티식별자 (identity) 명세 (2/4) Persistence Provider 에게 identity 가저장된위치를알려주는방법 (javax.persistence.id) Class (javax.persistence.embeddedid) annotation 필드나속성에지정하고이는테이블의일차키 (primary key) 가됨 속성 (property) 기반접근의예 public class Category { protected Long id; public Long getid() { return this.id; public void setid(long id) { this.id = id; ** 피해야할타입 float, Float, double 등을피해야함 TimeStamp 타입을피해야함

23 엔티티식별자 (identity) 명세 (3/4) Class 하나이상의 를사용할경우 Class 를사용 즉, 복합 (composite) 키가필요할경우사용 public class CategoryPK implements Serializable { String name; Date createdate; public CategoryPK() { public boolean equals(object other) { if (other instanceof CategoryPK) { final CategoryPK othercategorypk = (CategoryPK)other; return (othercategory.name.equals(name) && othercategorypk.createdate.equals(createdate)); return false; public int hashcode() { return super.hashcode(); Class(CategoryPK.class) public class Category { public Category() { protected String name; protected Date createdate;

24 엔티티식별자 (identity) 명세 IdClass public class CategoryPK implements Serializable { String name; Date createdate; public CategoryPK() { public boolean equals(object other) { if (other instanceof CategoryPK) { final CategoryPK othercategorypk = (CategoryPK)other; return (othercategory.name.equals(name) && othercategorypk.createdate.equals(createdate)); return false; public int hashcode() { return super.hashcode(); public class Category { public Category() protected CategoryPK categorypk;

25 @Embeddable 주석 (annotation) Embeddable 자체 identity는필요없고다른엔티티에포함되는객체 객체는 public class Address { protected String streetline1; protected String streetline2; protected String city; protected String state; protected String zipcode; protected String country; public class User { protected Long id; protected String username; protected String firstname; protected String protected Address address; protected String ; protected String phone;

26 4 일차 JPA 4.1 도메인모델과 JPA 4.2 JPA이용도메인객체구현 4.3 엔티티관계 4.4 엔티티매핑

27 @OneToOne 단방향일대일 양방향일대일 단방향 예, 사용자는청구정보를가질수있다. 필드기반접근 public class User { protected String userid; protected String protected BillingInfo billinginfo; User BillingInfo public class BillingInfo { protected Long billingid; protected String creditcardtype; protected String creditcardnumber; protected String nameoncreditcard; protected Date creditcardexpiration; protected String bankaccountnumber; protected String bankname; protected String routingnumber;

28 @OneToOne (2/3) 속성기반접근단방향관계 public class User { protected String userid; protected String ; protected BillingInfo public BillingInfo getbilling() { this.billing; public void setbilling(billinginfo billing) { this.billing = billing; public class BillingInfo { protected Long billingid; protected String creditcardtype; protected String creditcardnumber; protected String nameoncreditcard; protected Date creditcardexpiration; protected String bankaccountnumber; protected String bankname; protected String routingnumber;

29 @OneToOne (3/3) 양방향일대일 태그를사용함 public class User { protected String userid; protected String protected BillingInfo billinginfo; public class BillingInfo { protected Long billingid; protected String creditcardtype; protected String optional="false"); protected User user; mappedby= billinginfo 의의미 관계소유자가 User 임 User 클래스안의 billinginfo 인스턴스변수로매핑됨 optional= false 의의미 BillingInfo 객체는 User 객체없이단독으로저장될수없음

30 가장흔한관계임 Set 이나 List 를사용 Item 1 has 0..* placed on Bid OneToMany ManyToOne public class Item { protected Long itemid; protected String title; protected String description; protected Date protected Set<Bid> bids; public class Bid { protected Long bidid; protected Double amount; protected Date protected Item item;

31 흔하지않고가끔씩나타나는관계유형으로기본적으로양방향임 양쪽모두관련엔티티다수를참조하는관계 Item 0..* belongs to 1..* contains Category Category 는여러개의 Item 을포함하고있음, Item 은여러 Category 에속함 public class Category { protected Long categoryid; protected String protected Set<Item> items; public class Item { protected Long itemid; protected String protected Set<Category> categories;

32 4 일차 JPA 4.1 도메인모델과 JPA 4.2 JPA이용도메인객체구현 4.3 엔티티관계 4.4 엔티티매핑 4.5 엔티티관계매핑 개요 테이블지정 사용 CLOB와 BLOB 매핑 날짜타입매핑 단일엔티티복수테이블매핑 일차키생성 내장가능클래스매핑

33 개요 다양한 public class User implements Serializable nullable=false) protected Long nullable=false) protected String nullable=false, length=1) protected String nullable=false) protected nullable=false) protected UserType table="user_pictures") protected byte[] protected Date protected Address address; public User() public class Address implements Serializable nullable=false) protected String nullable=false) protected String nullable=false) protected String nullable=false) protected String nullable=false) protected String country;

34 주석 엔티티가매핑될테이블을지정하는주석 (annotation) name, catalog, schema 등의파라미터를가짐 (catalog,schema 는거의사용하지않음 은선택사항임, 지정되지않을경우클래스과같은이름의테이블로매핑 대부분의 Persistence 제공자들은스키마자동생성기능을제공함, 하지만단순한스키마에만적용해야함 User 클래스를 USERS schema="actionbazaar") public class User uniqueconstraints uniqueconstraints= {@UniqueConstraint(columnNames={"CATEGORY_ID"))

35 주석 저장될필드나속성을테이블의컬럼으로매핑 userid 속성을 USER_ID protected Long userid; table="user_pictures") protected byte[] picture; 파라미터 : insertable, insertable=false, updatable=false) protected Long 지정되지않을경우속성과같은이름의컬럼으로매핑됨

36 @Enumerated - 열거형데이터매핑 열거형 UserType 정의 public enum UserType {SELLER, BIDDER, SCR, ADMIN; 배열과마찬가지로, 위네값은 ordinal 이라부르는인덱스값과연관지어짐 사용예 1, UserType.SELLER 의경우 0 default 값임 UserType usertype; 사용예 2, UserType.SELLER 의경우 SELLER UserType usertype;

37 CLOB 과 BLOB 매핑 RDBMS 에서대규모데이터를저장하는방법 BLOB - Binary Large Object 타입 CLOB Character Large Object BLOB이나 CLOB 필드로직접매핑 ( 처음접근할때로드됨 ) protected byte[] picture; CLOB/BLOB 여부는타입에의해결정됨 char[], String CLOB 컬럼에저장 지연 (lazy) 로딩은선택사항이며 EJB 벤더별로차이가있음

38 날짜 (temporal) 타입매핑 날짜 (temporal) 데이터타입 대부분 DBMS 벤더가서로다른입자 (granularity) 를가진날짜데이터타입을지원 DATE(day, month, year 저장 ) TIME(time만저장, day, month, year는저장하지않음 ) TIMESTAMP(time, day, month, year 저장 ) protected Date TIMESTAMP가기본값 ( 가장작은입도 )

39 복수테이블매핑 흔히사용되지않지만, 특정상황에서매우유용한방법 예, User 도메인객체는 User 의대용량이미지정보를가지고있다. 이경우, USERS 테이블에대용량이미지를저장하면수행성능을현저하게떨어뜨린다. 이경우, 대용량이미지를별도의 public class User implements Serializable {.. 위에서, USER_ID 가 USER_PICTURES 테이블의일차키이면서동시에외부키임

40 일차키생성 (1/4) 대행키 (Surrogate key) 권장 CATEGORY_ID, EMPLOYEE_ID 등은대행키 대행키는일차키로사용하기위해만듬 : 일차키생성 Identity Sqeuence 테이블 Identity 컬럼이용 MS-SQL 서버처럼여러 DBMS protected Long userid;

41 일차키생성 (2/4) 데이터베이스시퀀스사용절차 데이터베이스안에시퀀스정의 CREATE SEQUENCE USER_SEQUENCE START WITH 1 INCREMENT BY 10; SequenceGenerator sequencename="user_sequence", initialvalue=1, protected Long userid;

42 일차키생성 (3/4) 시퀀스테이블사용절차 한테이블로여러시퀀스값을사용할수있음 시퀀스테이블정의 ( 오라클의예 ) CREATE TABLE SEQUENCE_GENERATOR_TABLE (SEQUENCE_NAME VARCHAR2(80) NOT NULL, SEQUENCE_VALUE NUMBER(15) NOT NULL, PRIMARY KEY (SEQUENCE_NAME)); 시퀀스테이블초기화 INSERT INTO SEQUENCE_GENERATOR_TABLE (SEQUENCE_NAME, SEQUENCE_VALUE) VALUES ('USER_SEQUENCE', 1); TableGenerator (name="user_table_generator", table="sequence_generator_table", pkcolumnname="sequence_name", valuecolumnname="sequence_value", protected Long userid;

43 일차키생성 (4/4) protected Long userid; JPA 공급자에따라기본값이다름 Oracle 데이터베이스를사용할경우, SEQUENCE가기본전략 SQL Server 데이터베이스를사용할경우, IDENTITY가기본전략

44 내장가능 (embeddable) 클래스매핑 내장가능객체는엔티티를위한편리한데이터저장공간이며 identity public class User implements Serializable nullable=false) protected Long protected Address public class Address implements Serializable nullable=false) protected String nullable=false) protected String zipcode; Address 의 street 는 USERS.STREET 컬럼으로매핑됨 Address 의 zipcode 는 USERS.ZIP_CODE 컬럼으로매핑됨

45 4 일차 JPA 4.1 도메인모델과 JPA 4.2 JPA이용도메인객체구현 4.3 엔티티관계 4.4 엔티티매핑 4.5 엔티티관계매핑 일대일관계매핑 일대다, 다대일관계매핑 다대다관계매핑

46 일대일관계매핑 public class User protected referencedcolumnname="billing_id", updatable=false) protected BillingInfo public class BillingInfo protected Long billingid;

47 일대일관계매핑 을이용한매핑 Parent 측 ( 여기서는 User) public class User protected referencedcolumnname="billing_user_id") protected BillingInfo public class BillingInfo protected Long userid;

48 일대다, 다대일관계매핑 Item-Bid public class Item protected Long protected Set<Bid> public class Bid protected referencedcolumnname="item_id") protected Item item;

49 다대다관계매핑 (1/2) 다대다관계 두개의일대다관계로나눌수있음 조인테이블이필요함

50 다대다관계매핑 (2/2) 다대다관계 ( 계속 ) 소유다대다 : 1 번 종속다대다 : 2 public class Category implements Serializable protected Long referencedcolumnname="category_id"), referencedcolumnname="item_id")) protected Set<Item> public class Item implements Serializable protected Long itemid; protected Set<Category> categories;

51 넥스트리소프트 ( 주 ) 박석재수석 (demonpark@nextree.co.kr) 임병인수석 (byleem@nextree.co.kr) 과정명 : SQL 기초와 MyBatis SQL/MyBatis

Spring Data JPA Many To Many 양방향 관계 예제

Spring Data JPA Many To Many 양방향 관계 예제 Spring Data JPA Many To Many 양방향관계예제 오라클자바커뮤니티 (ojc.asia, ojcedu.com) 엔티티매핑 (Entity Mapping) M : N 연관관계 사원 (Sawon), 취미 (Hobby) 는다 : 다관계이다. 사원은여러취미를가질수있고, 하나의취미역시여러사원에할당될수있기때문이다. 보통관계형 DB 에서는다 : 다관계는 1

More information

- JPA를사용하는경우의스프링설정파일에다음을기술한다. <bean id="entitymanagerfactory" class="org.springframework.orm.jpa.localentitymanagerfactorybean" p:persistenceunitname=

- JPA를사용하는경우의스프링설정파일에다음을기술한다. <bean id=entitymanagerfactory class=org.springframework.orm.jpa.localentitymanagerfactorybean p:persistenceunitname= JPA 와 Hibernate - 스프링의 JDBC 대신에 JPA를이용한 DB 데이터검색작업 - JPA(Java Persistence API) 는자바의 O/R 매핑에대한표준지침이며, 이지침에따라설계된소프트웨어를 O/R 매핑프레임워크 라고한다. - O/R 매핑 : 객체지향개념인자바와관계개념인 DB 테이블간에상호대응을시켜준다. 즉, 객체지향언어의인스턴스와관계데이터베이스의레코드를상호대응시킨다.

More information

@OneToOne(cascade = = "addr_id") private Addr addr; public Emp(String ename, Addr addr) { this.ename = ename; this.a

@OneToOne(cascade = = addr_id) private Addr addr; public Emp(String ename, Addr addr) { this.ename = ename; this.a 1 대 1 단방향, 주테이블에외래키실습 http://ojcedu.com, http://ojc.asia STS -> Spring Stater Project name : onetoone-1 SQL : JPA, MySQL 선택 http://ojc.asia/bbs/board.php?bo_table=lecspring&wr_id=524 ( 마리아 DB 설치는위 URL

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

10.ppt

10.ppt : SQL. SQL Plus. JDBC. SQL >> SQL create table : CREATE TABLE ( ( ), ( ),.. ) SQL >> SQL create table : id username dept birth email id username dept birth email CREATE TABLE member ( id NUMBER NOT NULL

More information

Spring Boot/JDBC JdbcTemplate/CRUD 예제

Spring Boot/JDBC JdbcTemplate/CRUD 예제 Spring Boot/JDBC JdbcTemplate/CRUD 예제 오라클자바커뮤니티 (ojc.asia, ojcedu.com) Spring Boot, Gradle 과오픈소스인 MariaDB 를이용해서 EMP 테이블을만들고 JdbcTemplate, SimpleJdbcTemplate 을이용하여 CRUD 기능을구현해보자. 마리아 DB 설치는다음 URL 에서확인하자.

More information

강의 개요

강의 개요 DDL TABLE 을만들자 웹데이터베이스 TABLE 자료가저장되는공간 문자자료의경우 DB 생성시지정한 Character Set 대로저장 Table 생성시 Table 의구조를결정짓는열속성지정 열 (Clumn, Attribute) 은이름과자료형을갖는다. 자료형 : http://dev.mysql.cm/dc/refman/5.1/en/data-types.html TABLE

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

쉽게 풀어쓴 C 프로그래밍

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

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 Object Relation Mapping 오늘학습목표 ORM 에대한이해 Spring Data JPA 를활용한 ORM 구현 태그기반질답게시판 요구사항 설계실습 사용자는질문을할수있어야한다. 질문에대한답변을할수있어야한다. 질문을할때태그를추가할수있어야한다. 태그는태그풀에존재하는태그만추가할수있다. 태그가추가될경우해당태그수는 +1 증가, 삭제될경우해당태그수는 -1

More information

쉽게 풀어쓴 C 프로그래밊

쉽게 풀어쓴 C 프로그래밊 Power Java 제 27 장데이터베이스 프로그래밍 이번장에서학습할내용 자바와데이터베이스 데이터베이스의기초 SQL JDBC 를이용한프로그래밍 변경가능한결과집합 자바를통하여데이터베이스를사용하는방법을학습합니다. 자바와데이터베이스 JDBC(Java Database Connectivity) 는자바 API 의하나로서데이터베이스에연결하여서데이터베이스안의데이터에대하여검색하고데이터를변경할수있게한다.

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

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

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

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

InsertColumnNonNullableError(#colName) 에해당하는메시지출력 존재하지않는컬럼에값을삽입하려고할경우, InsertColumnExistenceError(#colName) 에해당하는메시지출력 실행결과가 primary key 제약에위배된다면, Ins

InsertColumnNonNullableError(#colName) 에해당하는메시지출력 존재하지않는컬럼에값을삽입하려고할경우, InsertColumnExistenceError(#colName) 에해당하는메시지출력 실행결과가 primary key 제약에위배된다면, Ins Project 1-3: Implementing DML Due: 2015/11/11 (Wed), 11:59 PM 이번프로젝트의목표는프로젝트 1-1 및프로젝트 1-2에서구현한프로그램에기능을추가하여간단한 DML을처리할수있도록하는것이다. 구현한프로그램은 3개의 DML 구문 (insert, delete, select) 을처리할수있어야한다. 테이블데이터는파일에저장되어프로그램이종료되어도사라지지않아야한다.

More information

ThisJava ..

ThisJava .. 자바언어에정확한타입을추가한 ThisJava 소개 나현익, 류석영 프로그래밍언어연구실 KAIST 2014 년 1 월 14 일 나현익, 류석영 자바언어에정확한타입을추가한 ThisJava 소개 1/29 APLAS 2013 나현익, 류석영 자바 언어에 정확한 타입을 추가한 ThisJava 소개 2/29 실제로부딪힌문제 자바스크립트프로그램분석을위한요약도메인 나현익,

More information

Spring Boot

Spring Boot 스프링부트 (Spring Boot) 1. 스프링부트 (Spring Boot)... 2 1-1. Spring Boot 소개... 2 1-2. Spring Boot & Maven... 2 1-3. Spring Boot & Gradle... 3 1-4. Writing the code(spring Boot main)... 4 1-5. Writing the code(commandlinerunner)...

More information

PowerPoint Presentation

PowerPoint Presentation public class SumTest { public static void main(string a1[]) { int a, b, sum; a = Integer.parseInt(a1[0]); b = Integer.parseInt(a1[1]); sum = a + b ; // 두수를더하는부분입니다 System.out.println(" 두수의합은 " + sum +

More information

JAVA PROGRAMMING 실습 05. 객체의 활용

JAVA PROGRAMMING 실습 05. 객체의 활용 public class Person{ public String name; public int age; } public Person(){ } public Person(String s, int a){ name = s; age = a; } public String getname(){ return name; } @ 객체의선언 public static void main(string

More information

<4D F736F F F696E74202D E DB0FCB0E820BBE7BBF3BFA120C0C7C7D120B0FCB0E820B5A5C0CCC5CDBAA3C0CCBDBA20BCB3B0E8>

<4D F736F F F696E74202D E DB0FCB0E820BBE7BBF3BFA120C0C7C7D120B0FCB0E820B5A5C0CCC5CDBAA3C0CCBDBA20BCB3B0E8> 데이터베이스 (Database) ER- 관계사상에의한관계데이터베이스설계 문양세강원대학교 IT특성화대학컴퓨터과학전공 설계과정 [ 그림 3.1] 작은세계 요구사항들의수정과분석 Functional Requirements 데이타베이스요구사항들 FUNCTIONAL ANALYSIS 개념적설계 ERD 사용 High level ltransaction Specification

More information

PowerPoint 프레젠테이션

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

More information

thesis

thesis ( Design and Implementation of a Generalized Management Information Repository Service for Network and System Management ) ssp@nile nile.postech.ac..ac.kr DPE Lab. 1997 12 16 GMIRS GMIRS GMIRS prototype

More information

Mobile Service > IAP > Android SDK [ ] IAP SDK TOAST SDK. IAP SDK. Android Studio IDE Android SDK Version (API Level 10). Name Reference V

Mobile Service > IAP > Android SDK [ ] IAP SDK TOAST SDK. IAP SDK. Android Studio IDE Android SDK Version (API Level 10). Name Reference V Mobile Service > IAP > Android SDK IAP SDK TOAST SDK. IAP SDK. Android Studio IDE 2.3.3 Android SDK Version 2.3.3 (API Level 10). Name Reference Version License okhttp http://square.github.io/okhttp/ 1.5.4

More information

untitled

untitled (shared) (integrated) (stored) (operational) (data) : (DBMS) :, (database) :DBMS File & Database - : - : ( : ) - : - : - :, - DB - - -DBMScatalog meta-data -DBMS -DBMS - -DBMS concurrency control E-R,

More information

어댑터뷰

어댑터뷰 04 커스텀어댑터뷰 (Custom Adapter View) 커스텀어댑터뷰 (Custom Adapter View) 커스텀어댑터뷰 (Custom Adatper View) 란? u 어댑터뷰의항목하나는단순한문자열이나이미지뿐만아니라, 임의의뷰가될수 있음 이미지뷰 u 커스텀어댑터뷰설정절차 1 2 항목을위한 XML 레이아웃정의 어댑터정의 3 어댑터를생성하고어댑터뷰객체에연결

More information

Microsoft PowerPoint - 2강

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

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

슬라이드 1

슬라이드 1 Continuous Integration 엔터프라이즈어플리케이션아키텍처 조영호카페PJT팀 2008.10.01 youngho.cho@nhncorp.com 목차 1. Domain Logic Pattern 2. Data Source Pattern 3. Putting It All Together 1. Domain Logic Pattern Layered Architecture

More information

Connection 8 22 UniSQLConnection / / 9 3 UniSQL OID SET

Connection 8 22 UniSQLConnection / / 9 3 UniSQL OID SET 135-080 679-4 13 02-3430-1200 1 2 11 2 12 2 2 8 21 Connection 8 22 UniSQLConnection 8 23 8 24 / / 9 3 UniSQL 11 31 OID 11 311 11 312 14 313 16 314 17 32 SET 19 321 20 322 23 323 24 33 GLO 26 331 GLO 26

More information

슬라이드 1

슬라이드 1 DOMAIN MODEL 패턴과 JPA 의조화객체지향적인도메인레이어구축하기 조영호 Eternity s Chit-Chat(http://aeternum.egloos.com) 목차 1. 온라인영화예매시스템도메인 2. 임피던스불일치Impedance Mismatch 3. JPA Java Persistence API 4. 결롞 1. 온라인영화예매시스템도메인 Domain

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

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

MySQL-.. 1

MySQL-.. 1 MySQL- 기초 1 Jinseog Kim Dongguk University jinseog.kim@gmail.com 2017-08-25 Jinseog Kim Dongguk University jinseog.kim@gmail.com MySQL-기초 1 2017-08-25 1 / 18 SQL의 기초 SQL은 아래의 용도로 구성됨 데이터정의 언어(Data definition

More information

Microsoft PowerPoint - lec2.ppt

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

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

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

표준프레임워크로 구성된 컨텐츠를 솔루션에 적용하는 것에 문제가 없는지 확인

표준프레임워크로 구성된 컨텐츠를 솔루션에 적용하는 것에 문제가 없는지 확인 표준프레임워크로구성된컨텐츠를솔루션에적용하는것에문제가없는지확인 ( S next -> generate example -> finish). 2. 표준프레임워크개발환경에솔루션프로젝트추가. ( File -> Import -> Existring Projects into

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

13주-14주proc.PDF

13주-14주proc.PDF 12 : Pro*C/C++ 1 2 Embeded SQL 3 PRO *C 31 C/C++ PRO *C NOT! NOT AND && AND OR OR EQUAL == = SQL,,, Embeded SQL SQL 32 Pro*C C SQL Pro*C C, C Pro*C, C C 321, C char : char[n] : n int, short, long : float

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

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

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

<4D F736F F F696E74202D20C1A63038C0E520C5ACB7A1BDBABFCD20B0B4C3BC4928B0ADC0C729205BC8A3C8AF20B8F0B5E55D>

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

More information

PowerPoint Presentation

PowerPoint Presentation Package Class 3 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

FileMaker 15 ODBC 및 JDBC 설명서

FileMaker 15 ODBC 및 JDBC 설명서 FileMaker 15 ODBC JDBC 2004-2016 FileMaker, Inc.. FileMaker, Inc. 5201 Patrick Henry Drive Santa Clara, California 95054 FileMaker FileMaker Go FileMaker, Inc.. FileMaker WebDirect FileMaker, Inc... FileMaker.

More information

문서 템플릿

문서 템플릿 HDSI 툴분석 [sql injection 기술명세서 ] Sql injection 기술명세서 Ver. 0.01 이문서는 sql injection 기술명세가범위입니다. Copyrights Copyright 2009 by CanvasTeam@SpeeDroot( 장경칩 ) All Rights Reserved. 장경칩의사전승인없이본내용의전부또는일부에대한복사, 전재,

More information

(8) getpi() 함수는정적함수이므로 main() 에서호출할수있다. (9) class Circle private double radius; static final double PI= ; // PI 이름으로 로초기화된정적상수 public

(8) getpi() 함수는정적함수이므로 main() 에서호출할수있다. (9) class Circle private double radius; static final double PI= ; // PI 이름으로 로초기화된정적상수 public Chapter 9 Lab 문제정답 1. public class Circle private double radius; static final double PI=3.141592; // PI 이름으로 3.141592 로초기화된정적상수 (1) public Circle(double r) radius = r; (2) public double getradius() return

More information

PowerPoint Presentation

PowerPoint Presentation public class SumTest { public static void main(string a1[]) { int a, b, sum; a = Integer.parseInt(a1[0]); b = Integer.parseInt(a1[1]); sum = a + b ; // 두수를더하는부분입니다 System.out.println(" 두수의합은 " + sum +

More information

Microsoft PowerPoint - hci2-lecture12 [호환 모드]

Microsoft PowerPoint - hci2-lecture12 [호환 모드] Serialization C# Serialization 321190 2012 년가을학기 11/28/2012 박경신 Serializaiton( 직렬화 ) 란객체상태를지속시키거나전송할수있는형식으로변환하는과정으로, Serialization 반대로다시객체로변환하는것을 Deserialization 임 Serialization i 을사용하는이유 객체의상태를저장소에보존했다가나중에똑같은복사본을다시만들기위하거나,

More information

JMF2_심빈구.PDF

JMF2_심빈구.PDF JMF JSTORM http://wwwjstormpekr Issued by: < > Document Information Document title: Document file name: Revision number: Issued by: JMF2_ doc Issue Date: Status: < > raica@nownurinet

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

내장서버로사용. spring-boot-starter-data-jpa : Spring Data JPA 사용을위한설정 spring-boot-devtools : 개발자도구를제공, 이도구는응용프로그램개발모드에서유 용한데코드가변경된경우서버를자동으로다시시작하는일들을한다. spri

내장서버로사용. spring-boot-starter-data-jpa : Spring Data JPA 사용을위한설정 spring-boot-devtools : 개발자도구를제공, 이도구는응용프로그램개발모드에서유 용한데코드가변경된경우서버를자동으로다시시작하는일들을한다. spri 6-20-4. Spring Boot REST CRUD 실습 (JPA, MariaDB) GitHub : https://github.com/leejongcheol/springbootrest 스프링부트에서 REST(REpresentational State Transfer) API 를실습해보자. RESTful 웹서비스는 JSON, XML 및기타미디어유형을생성하고활용할수있다.

More information

교육자료

교육자료 THE SYS4U DODUMENT Java Reflection & Introspection 2012.08.21 김진아사원 2012 SYS4U I&C All rights reserved. 목차 I. 개념 1. Reflection 이란? 2. Introspection 이란? 3. Reflection 과 Introspection 의차이점 II. 실제사용예 1. Instance의생성

More information

DBMS & SQL Server Installation Database Laboratory

DBMS & SQL Server Installation Database Laboratory DBMS & 조교 _ 최윤영 } 데이터베이스연구실 (1314 호 ) } 문의사항은 cyy@hallym.ac.kr } 과제제출은 dbcyy1@gmail.com } 수업공지사항및자료는모두홈페이지에서확인 } dblab.hallym.ac.kr } 홈페이지 ID: 학번 } 홈페이지 PW:s123 2 차례 } } 설치전점검사항 } 설치단계별설명 3 Hallym Univ.

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

JAVA 프로그래밍실습 실습 1) 실습목표 - 메소드개념이해하기 - 매개변수이해하기 - 새메소드만들기 - Math 클래스의기존메소드이용하기 ( ) 문제 - 직사각형모양의땅이있다. 이땅의둘레, 면적과대각

JAVA 프로그래밍실습 실습 1) 실습목표 - 메소드개념이해하기 - 매개변수이해하기 - 새메소드만들기 - Math 클래스의기존메소드이용하기 (   ) 문제 - 직사각형모양의땅이있다. 이땅의둘레, 면적과대각 JAVA 프로그래밍실습 실습 1) 실습목표 - 메소드개념이해하기 - 매개변수이해하기 - 새메소드만들기 - Math 클래스의기존메소드이용하기 ( http://java.sun.com/javase/6/docs/api ) 문제 - 직사각형모양의땅이있다. 이땅의둘레, 면적과대각선의길이를계산하는메소드들을작성하라. 직사각형의가로와세로의길이는주어진다. 대각선의길이는 Math클래스의적절한메소드를이용하여구하라.

More information

Microsoft PowerPoint - java1-lab5-ImageProcessorTestOOP.pptx

Microsoft PowerPoint - java1-lab5-ImageProcessorTestOOP.pptx 2018 학년도 1 학기 JAVA 프로그래밍 II 514760-1 2018 년봄학기 5/10/2018 박경신 Lab#1 (ImageTest) Lab#1 은영상파일 (Image) 을읽어서정보를출력 Java Tutorials Lesson: Working with Images https://docs.oracle.com/javase/tutorial/2d/images/index.html

More information

07 자바의 다양한 클래스.key

07 자바의 다양한 클래스.key [ 07 ] . java.lang Object, Math, String, StringBuffer Byte, Short, Integer, Long, Float, Double, Boolean, Character. java.util Random, StringTokenizer Calendar, GregorianCalendar, Date. Collection, List,

More information

슬라이드 제목 없음

슬라이드 제목 없음 5.2 ER 모델 ( 계속 ) 관계와관계타입 관계는엔티티들사이에존재하는연관이나연결로서두개이상의엔티티타입들사이의사상으로생각할수있음 관계집합은동질의관계들의집합 관계타입은동질의관계들의틀 관계집합과관계타입을엄격하게구분할필요는없음 요구사항명세에서흔히동사는 ER 다이어그램에서관계로표현됨 ER 다이어그램에서다이어몬드로표기 관계타입이서로연관시키는엔티티타입들을관계타입에실선으로연결함

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

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 System Software Experiment 1 Lecture 5 - Array Spring 2019 Hwansoo Han (hhan@skku.edu) Advanced Research on Compilers and Systems, ARCS LAB Sungkyunkwan University http://arcs.skku.edu/ 1 배열 (Array) 동일한타입의데이터가여러개저장되어있는저장장소

More information

TITLE

TITLE CSED421 Database Systems Lab MySQL Basic Syntax SQL DML & DDL Data Manipulation Language SELECT UPDATE DELETE INSERT INTO Data Definition Language CREATE DATABASE ALTER DATABASE CREATE TABLE ALTER TABLE

More information

Microsoft PowerPoint - 13_UMLCoding(2010).pptx

Microsoft PowerPoint - 13_UMLCoding(2010).pptx LECTURE 13 설계와코딩 최은만, CSE 4039 소프트웨어공학 설계구현매핑 UML 설계도로부터 Java 프로그래밍언어로의매핑과정설명 정적다이어그램의구현 동적다이어그램의구현 최은만, CSE 4039 소프트웨어공학 2 속성과오퍼레이션의구현 Student - name : String #d department t: String Sti packageattribute

More information

JDBC 소개및설치 Database Laboratory

JDBC 소개및설치 Database Laboratory JDBC 소개및설치 JDBC } What is the JDBC? } JAVA Database Connectivity 의약어 } 자바프로그램안에서 SQL 을실행하기위해데이터베이스를연결해주는응용프로그램인터페이스 } 연결된데이터베이스의종류와상관없이동일한방법으로자바가데이터베이스내에서발생하는트랜잭션을제어할수있도록하는환경을제공 2 JDBC Driver Manager }

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

C++ Programming

C++ Programming C++ Programming 예외처리 Seo, Doo-okok clickseo@gmail.com http://www.clickseo.com 목 차 예외처리 2 예외처리 예외처리 C++ 의예외처리 예외클래스와객체 3 예외처리 예외를처리하지않는프로그램 int main() int a, b; cout > a >> b; cout

More information

Microsoft PowerPoint - 10Àå.ppt

Microsoft PowerPoint - 10Àå.ppt 10 장. DB 서버구축및운영 DBMS 의개념과용어를익힌다. 간단한 SQL 문법을학습한다. MySQL 서버를설치 / 운영한다. 관련용어 데이터 : 자료 테이블 : 데이터를표형식으로표현 레코드 : 테이블의행 필드또는컬럼 : 테이블의열 필드명 : 각필드의이름 데이터타입 : 각필드에입력할값의형식 학번이름주소연락처 관련용어 DB : 테이블의집합 DBMS : DB 들을관리하는소프트웨어

More information

유니티 변수-함수.key

유니티 변수-함수.key C# 1 or 16 (Binary or Hex) 1:1 C# C# (Java, Python, Go ) (0101010 ). (Variable) : (Value) (Variable) : (Value) ( ) (Variable) : (Value) ( ) ; (Variable) : (Value) ( ) ; = ; (Variable) : (Value) (Variable)

More information

교육2 ? 그림

교육2 ? 그림 Interstage 5 Apworks EJB Application Internet Revision History Edition Date Author Reviewed by Remarks 1 2002/10/11 2 2003/05/19 3 2003/06/18 EJB 4 2003/09/25 Apworks5.1 [ Stateless Session Bean ] ApworksJava,

More information

17장 클래스와 메소드

17장 클래스와 메소드 17 장클래스와메소드 박창이 서울시립대학교통계학과 박창이 ( 서울시립대학교통계학과 ) 17 장클래스와메소드 1 / 18 학습내용 객체지향특징들객체출력 init 메소드 str 메소드연산자재정의타입기반의버전다형성 (polymorphism) 박창이 ( 서울시립대학교통계학과 ) 17 장클래스와메소드 2 / 18 객체지향특징들 객체지향프로그래밍의특징 프로그램은객체와함수정의로구성되며대부분의계산은객체에대한연산으로표현됨객체의정의는

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

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

슬라이드 1

슬라이드 1 UNIT 6 배열 로봇 SW 교육원 3 기 학습목표 2 배열을사용핛수있다. 배열 3 배열 (Array) 이란? 같은타입 ( 자료형 ) 의여러변수를하나의묶음으로다루는것을배열이라고함 같은타입의많은양의데이터를다룰때효과적임 // 학생 30 명의점수를저장하기위해.. int student_score1; int student_score2; int student_score3;...

More information

JMF3_심빈구.PDF

JMF3_심빈구.PDF JMF JSTORM http://wwwjstormpekr Issued by: < > Revision: Document Information Document title: Document file name: Revision number: Issued by: JMF3_ doc Issue Date:

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

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

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

PowerPoint Presentation

PowerPoint Presentation FORENSIC INSIGHT; DIGITAL FORENSICS COMMUNITY IN KOREA SQL Server Forensic AhnLab A-FIRST Rea10ne unused6@gmail.com Choi Jinwon Contents 1. SQL Server Forensic 2. SQL Server Artifacts 3. Database Files

More information

SQL Developer Connect to TimesTen 유니원아이앤씨 DB 기술지원팀 2010 년 07 월 28 일 문서정보 프로젝트명 SQL Developer Connect to TimesTen 서브시스템명 버전 1.0 문서명 작성일 작성자

SQL Developer Connect to TimesTen 유니원아이앤씨 DB 기술지원팀 2010 년 07 월 28 일 문서정보 프로젝트명 SQL Developer Connect to TimesTen 서브시스템명 버전 1.0 문서명 작성일 작성자 SQL Developer Connect to TimesTen 유니원아이앤씨 DB 팀 2010 년 07 월 28 일 문서정보 프로젝트명 SQL Developer Connect to TimesTen 서브시스템명 버전 1.0 문서명 작성일 2010-07-28 작성자 김학준 최종수정일 2010-07-28 문서번호 20100728_01_khj 재개정이력 일자내용수정인버전

More information

쉽게 풀어쓴 C 프로그래밍

쉽게 풀어쓴 C 프로그래밍 Power Java 제 9 장생성자와접근제어 이번장에서학습할내용 생성자 정적변수 정적메소드 접근제어 this 클래스간의관계 객체가생성될때초기화를담당하는생성자에대하여살펴봅니다. 생성자 생성자 (contructor): 객체가생성될때에필드에게초기값을제공하고필요한초기화절차를실행하는메소드 생성자의예 class Car { private String color; // 색상

More information

Web Application을 구성하는 패턴과 Spring ROO의 사례

Web Application을 구성하는 패턴과 Spring ROO의 사례 Spring Roo 와함께하는 쾌속웹개발 정상혁, KSUG (www.ksug.org) 목차 1. Tool 2. Demo 3. Application 1. Tool 1.1 개요 1.2 Command line shell 1.3 Round-trip 1.4 익숙한도우미들 1.1 개요 Text Based RAD Tool for Java Real Object Oriented의첫글자들

More information

FileMaker ODBC and JDBC Guide

FileMaker ODBC and JDBC Guide FileMaker 13 5 5 5 6 6 6 7 7 8 8 8 8 9 9 10 10 11 11 12 12 12 12 12 12 13 13 14 14 16 16 18 4 19 19 20 20 21 21 21 23 23 23 23 25 26 26 26 26 27 28 28 28 28 29 31 31 32 33 33 33 33 34 34 35 35 35 36 1

More information

untitled

untitled PowerBuilder 連 Microsoft SQL Server database PB10.0 PB9.0 若 Microsoft SQL Server 料 database Profile MSS 料 (Microsoft SQL Server database interface) 行了 PB10.0 了 Sybase 不 Microsoft 料 了 SQL Server 料 PB10.0

More information

PowerPoint Presentation

PowerPoint Presentation 객체지향프로그래밍 인터페이스, 람다식, 패키지 ( 실습 ) 손시운 ssw5176@kangwon.ac.kr 예제 1. 홈네트워킹 public interface RemoteControl { public void turnon(); // 가전제품을켠다. public void turnoff(); // 가전제품을끈다. 인터페이스를구현 public class Television

More information

PowerPoint Presentation

PowerPoint Presentation 자바프로그래밍 1 클래스와메소드심층연구 ( 실습 ) 손시운 ssw5176@kangwon.ac.kr 예제 1. 접근제어 class A { private int a; int b; public int c; // 전용 // 디폴트 // 공용 public class Test { public static void main(string args[]) { A obj = new

More information

목차 BUG DEQUEUE 의 WAIT TIME 이 1 초미만인경우, 설정한시간만큼대기하지않는문제가있습니다... 3 BUG [qp-select-pvo] group by 표현식에있는컬럼을참조하는집합연산이존재하지않으면결괏값오류가발생할수있습니다... 4

목차 BUG DEQUEUE 의 WAIT TIME 이 1 초미만인경우, 설정한시간만큼대기하지않는문제가있습니다... 3 BUG [qp-select-pvo] group by 표현식에있는컬럼을참조하는집합연산이존재하지않으면결괏값오류가발생할수있습니다... 4 ALTIBASE HDB 6.5.1.5.10 Patch Notes 목차 BUG-46183 DEQUEUE 의 WAIT TIME 이 1 초미만인경우, 설정한시간만큼대기하지않는문제가있습니다... 3 BUG-46249 [qp-select-pvo] group by 표현식에있는컬럼을참조하는집합연산이존재하지않으면결괏값오류가발생할수있습니다... 4 BUG-46266 [sm]

More information

Microsoft PowerPoint - 27.pptx

Microsoft PowerPoint - 27.pptx 이산수학 () n-항관계 (n-ary Relations) 2011년봄학기 강원대학교컴퓨터과학전공문양세 n-ary Relations (n-항관계 ) An n-ary relation R on sets A 1,,A n, written R:A 1,,A n, is a subset R A 1 A n. (A 1,,A n 에대한 n- 항관계 R 은 A 1 A n 의부분집합이다.)

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 Software Verification Junit, Eclipse 및빌드환경 Team : T3 목차 Eclipse JUnit 빌드환경 1 Eclipse e 소개 JAVA 를개발하기위한통합개발환경 주요기능 Overall 빌드환경 Code edit / Compile / Build Unit Test, Debug 특징 JAVA Code를작성하고이에대한 debugging

More information

제8장 자바 GUI 프로그래밍 II

제8장 자바 GUI 프로그래밍 II 제8장 MVC Model 8.1 MVC 모델 (1/7) MVC (Model, View, Controller) 모델 스윙은 MVC 모델에기초를두고있다. MVC란 Xerox의연구소에서 Smalltalk 언어를바탕으로사용자인터페이스를개발하기위한방법 MVC는 3개의구성요소로구성 Model : 응용프로그램의자료를표현하기위한모델 View : 자료를시각적으로 (GUI 방식으로

More information

FileMaker ODBC 및 JDBC 가이드

FileMaker ODBC 및 JDBC 가이드 FileMaker ODBC JDBC 2004-2019 FileMaker, Inc.. FileMaker, Inc. 5201 Patrick Henry Drive Santa Clara, California 95054 FileMaker, FileMaker Cloud, FileMaker Go FileMaker, Inc.. FileMaker WebDirect FileMaker,

More information

Microsoft PowerPoint - Lect04.pptx

Microsoft PowerPoint - Lect04.pptx OBJECT ORIENTED PROGRAMMING Object Oriented Programming 이강의록은 Power Java 저자의강의록을사용했거나재편집된것입니다. Class 와 object Class 와객체 클래스의일생 메소드 필드 String Object Class 와객체 3 클래스 클래스의구성 클래스 (l (class): 객체를만드는설계도 클래스로부터만들어지는각각의객체를특별히그클래스의인스턴스

More information

* Factory class for query and DML clause creation * tiwe * */ public class JPAQueryFactory implements JPQLQueryFactory private f

* Factory class for query and DML clause creation * tiwe * */ public class JPAQueryFactory implements JPQLQueryFactory private f JPA 에서 QueryDSL 사용하기위해 JPAQuery 인스턴스생성방법 http://ojc.asia, http://ojcedu.com 1. JPAQuery 를직접생성하기 JPAQuery 인스턴스생성하기 QueryDSL의 JPAQuery API를사용하려면 JPAQuery 인스턴스를생성하면된다. // entitymanager는 JPA의 EntityManage

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

A Hierarchical Approach to Interactive Motion Editing for Human-like Figures

A Hierarchical Approach to Interactive Motion Editing for Human-like Figures 단일연결리스트 (Singly Linked List) 신찬수 연결리스트 (linked list)? tail 서울부산수원용인 null item next 구조체복습 struct name_card { char name[20]; int date; } struct name_card a; // 구조체변수 a 선언 a.name 또는 a.date // 구조체 a의멤버접근 struct

More information

<C1A62038B0AD20B0ADC0C7B3EBC6AE2E687770>

<C1A62038B0AD20B0ADC0C7B3EBC6AE2E687770> 제 8강 SQL: 관계데이터베이스언어 강의목표 관계데이타베이스언어로서상용 DBMS에서가장널리사용되는 SQL의동작원리에관하여학습하고, 이를이용하여다양한질의문을작성하는방법을습득한다 기대효과 SQL의데이터정의기능을이해한다 SQL의데이터조작기능중질의기능을이해한다 SQL의데이터조작기능중데이터갱신기능을이해한다 SQL의데이터조작기능중뷰및인덱스관련기능을이해한다 SQL 의개요

More information

JAVA PROGRAMMING 실습 05. 객체의 활용

JAVA PROGRAMMING 실습 05. 객체의 활용 2015 학년도 2 학기 public class Person{ public String name; public int age; public Person(){ public Person(String s, int a){ name = s; age = a; public String getname(){ return name; @ 객체의선언 public static void

More information

PowerPoint Presentation

PowerPoint Presentation FORENSICINSIGHT SEMINAR SQLite Recovery zurum herosdfrc@google.co.kr Contents 1. SQLite! 2. SQLite 구조 3. 레코드의삭제 4. 삭제된영역추적 5. 레코드복원기법 forensicinsight.org Page 2 / 22 SQLite! - What is.. - and why? forensicinsight.org

More information

No Slide Title

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

More information