Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

자바스터디 3 3

825 views

Published on

  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (Unlimited) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... Download Full EPUB Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... ACCESS WEBSITE for All Ebooks ......................................................................................................................... Download Full PDF EBOOK here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... Download EPUB Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... Download doc Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (Unlimited) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... Download Full EPUB Ebook here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... ACCESS WEBSITE for All Ebooks ......................................................................................................................... Download Full PDF EBOOK here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... Download EPUB Ebook here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... Download doc Ebook here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ..................................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, CookeBOOK Crime, eeBOOK Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Be the first to like this

자바스터디 3 3

  1. 1. 1. abstract의 필요성<br />2. abstract의 특징<br />3. 다중상속의 문제점<br />4. interface의 특징<br />5. 상속 다이어그램<br />6. abstract, 다형성관련 예제<br />
  2. 2. abstract의 필요성<br />
  3. 3. abstract의 특징<br /><ul><li> abstract 메서드 </li></ul>- 메서드의 내용부가 정의 되지 않은 형태로 모델 개념의 메서드<br />- 반드시 오버라이딩 되어야 사용 가능<br /><ul><li> abstract 클래스</li></ul>- abstract 메서드를 포함하고 있는 클래스로 다형성 표현으로 사용<br />- 객체를 발생시킬 수 없는 것을 제외하면 일반 클래스와 동일<br />
  4. 4. 다중상속의 문제점<br />A<br />x=10<br />C<br />x=30수정<br />B<br />x=20수정<br />D가 B와 C다중상속시<br />D<br />x=?<br />X의 값이 모호해!!<br />
  5. 5. interface의 특징<br />interface :<br />abstract 클래스의 한 종류로 포함 멤버의 제약을 가짐(순수 디자인 목적)<br />다중 상속이 가능한 유일한 클래스<br /> (가질 수 있는 멤버가 제약적!)<br />interface의 포함 멤버<br />public static final 멤버 필드<br /> (공유하고 값을 바꿀수 없는)<br />public abstract 멤버 메서드<br /> (정의 하는 데로 실행되므로)<br />public static inner 클래스<br />
  6. 6. 상속 다이어그램<br />interface<br />extends<br />interface<br />class<br />implements<br />extends<br />class<br />
  7. 7. abstract, 다형성관련 예제<br />MyPointClass<br />import java.io.*;<br />public abstract class MyPoint {<br />protected static BufferedReader in;<br />static {<br />in = new BufferedReader(new InputStreamReader(System.in));<br />}<br />protected int x;<br />protected int y;<br />public abstract void input() throws IOException;<br />public abstract void output();<br />}<br />main기본(4번을 누르거나 원 또는 <br />사각형을 3개입력시 종료하도록 코딩)<br />for(inti = 0; i < mp.length ++i) {<br />System.out.print("1.원 2.사각형 3.전체보기 4.종료 = ");<br />int x = Integer.parseInt(in.readLine());<br />if(x == 1) {}<br />elseif(x == 2) {}<br />elseif(x == 3) {}<br />elseif(x == 4) {}<br />else {}<br />}<br />1. 주어진 MyPoint클래스를 정의<br />2. MyRect정의 input, output메소드 정의<br />- input에는 높이와 너비 받기 <br /><ul><li>ouput에는 높이와 너비에 대한 넓이와 둘레 출력</li></ul>3. MyCircle정의 input, output메소드 정의<br />- input에는 반지름 받기 <br />- ouput에는 반지름 대한 넓이와 둘레 출력<br />(원주율 = 3.14)<br />4. main정의<br />

×