SlideShare a Scribd company logo
1 of 9
Download to read offline
UML
Object Oriented Programming, 6th Class
2015.10.15. 경민기
클래스는 설계도
오브젝트는 메모리 상의 프로그램 (컴퓨터 프로그래밍)
건축물 (건축)
Class & Object
추상화: 필요없는 정보는 사용하지 않는다
캡슐화: 남의 정보는 알 필요 없다
상속: 새로운 객체(Object)를 만들 때, 이전의 클래스를 고쳐서 쓰기도(upgrade) 한다.
그 경우, 이전의 클래스를 상속(inherit)받아 사용한다
다형성: 각 객체는 같은 명령을 받아도, 다른 행동을 할 수 있다.
추상화, 캡슐화, 상속, 다형성
OOP의 4대 규칙
Employee
EmployeeTest
문제:
한 눈에 무엇을 설명하려는 것인지 알기 어렵다.
자바가 기본적으로 사용하는 클래스들은 10만개를 넘어섬
그래서 Unified Modeling Language를 사용합니다.
UML은 객체… 서로의 관계를 굉장히 깔끔하게 설명해 줍니다.
UML Class Diagram
여자 남자 정상적이라고 세상에 알려진 관계
*1남자 여자 바람둥이, 일부다처, 기타 등등…
*1여자 남자 어장관리, 일처다부, 기타 등등…
*1남자 남자
*1여자 여자
더 이상의 자세한 설명은 생략합니다.
UML에서 관계는 11가지 종류가 있습니다.
많이 쓰는 거 언급하자면, 다음과 같습니다.
관계란?
남자 여자 서로가 서로를 의존합니다.
남자 자식 아버지라 부르게 허락해주세요!
남자 여자 남자가 여자를 이용해 먹습니다.
막장드라마
잘못된 사용 예
남자 여자
자식
남자
여자 남자
자식
자식은 여자와 남자에게 상속을 받았습니다.
(프로그램의 세계에서 중복 상속은 좋은게 아닙니다.)
위의 코드를 이해하는 것은 쉬운 작업이 아님
그래서 Unified Modeling Language를 사용함
UML의 사용법
+ Employee ()
+ empAge()
+ empDesignation()
+ empSalary()
+ printEmployee()
- String name
- int age
- String designation
- double salary
Employee

More Related Content

Viewers also liked

Java calendar project(gui)(swing window)(androidapp)
Java calendar project(gui)(swing window)(androidapp)Java calendar project(gui)(swing window)(androidapp)
Java calendar project(gui)(swing window)(androidapp)kimsungryong
 
Processing 2nd Class: Variable
Processing 2nd Class: VariableProcessing 2nd Class: Variable
Processing 2nd Class: VariableMinGi KYUNG
 
Eclipse & Hello World
Eclipse & Hello WorldEclipse & Hello World
Eclipse & Hello WorldMinGi KYUNG
 
Processing 4th Class: Function
Processing 4th Class: FunctionProcessing 4th Class: Function
Processing 4th Class: FunctionMinGi KYUNG
 
Processing 5th Class: File I/O
Processing 5th Class: File I/OProcessing 5th Class: File I/O
Processing 5th Class: File I/OMinGi KYUNG
 
Processing 3rd Class: If & Loop
Processing 3rd Class: If & LoopProcessing 3rd Class: If & Loop
Processing 3rd Class: If & LoopMinGi KYUNG
 
Variable & IF, Method
Variable & IF, MethodVariable & IF, Method
Variable & IF, MethodMinGi KYUNG
 
Beginning the UML - in Banking Domain (UML 교육자료)
Beginning the UML - in Banking Domain  (UML 교육자료)Beginning the UML - in Banking Domain  (UML 교육자료)
Beginning the UML - in Banking Domain (UML 교육자료)Juhyeon Lee
 
[Amateras uml]manual
[Amateras uml]manual[Amateras uml]manual
[Amateras uml]manualMorifu
 
UML distilled 1장 스터디 발표 자료
UML distilled 1장 스터디 발표 자료UML distilled 1장 스터디 발표 자료
UML distilled 1장 스터디 발표 자료beom kyun choi
 
04 자바 네트워크
04 자바 네트워크04 자바 네트워크
04 자바 네트워크arahansa yong
 

Viewers also liked (20)

Java calendar project(gui)(swing window)(androidapp)
Java calendar project(gui)(swing window)(androidapp)Java calendar project(gui)(swing window)(androidapp)
Java calendar project(gui)(swing window)(androidapp)
 
SQLite Example
SQLite ExampleSQLite Example
SQLite Example
 
Array & Loop
Array & LoopArray & Loop
Array & Loop
 
File
FileFile
File
 
Processing 2nd Class: Variable
Processing 2nd Class: VariableProcessing 2nd Class: Variable
Processing 2nd Class: Variable
 
Eclipse & Hello World
Eclipse & Hello WorldEclipse & Hello World
Eclipse & Hello World
 
Vim 강의
Vim 강의Vim 강의
Vim 강의
 
Uml intro 0
Uml intro 0Uml intro 0
Uml intro 0
 
Processing 4th Class: Function
Processing 4th Class: FunctionProcessing 4th Class: Function
Processing 4th Class: Function
 
MP3 Library
MP3 LibraryMP3 Library
MP3 Library
 
Processing 5th Class: File I/O
Processing 5th Class: File I/OProcessing 5th Class: File I/O
Processing 5th Class: File I/O
 
Class
ClassClass
Class
 
Processing 3rd Class: If & Loop
Processing 3rd Class: If & LoopProcessing 3rd Class: If & Loop
Processing 3rd Class: If & Loop
 
Variable & IF, Method
Variable & IF, MethodVariable & IF, Method
Variable & IF, Method
 
Beginning the UML - in Banking Domain (UML 교육자료)
Beginning the UML - in Banking Domain  (UML 교육자료)Beginning the UML - in Banking Domain  (UML 교육자료)
Beginning the UML - in Banking Domain (UML 교육자료)
 
[Amateras uml]manual
[Amateras uml]manual[Amateras uml]manual
[Amateras uml]manual
 
Uml intro 1
Uml intro 1Uml intro 1
Uml intro 1
 
UML distilled 1장 스터디 발표 자료
UML distilled 1장 스터디 발표 자료UML distilled 1장 스터디 발표 자료
UML distilled 1장 스터디 발표 자료
 
04 자바 네트워크
04 자바 네트워크04 자바 네트워크
04 자바 네트워크
 
자바채팅 다중
자바채팅 다중자바채팅 다중
자바채팅 다중
 

151015 lecture-uml-v03

  • 1. UML Object Oriented Programming, 6th Class 2015.10.15. 경민기
  • 2. 클래스는 설계도 오브젝트는 메모리 상의 프로그램 (컴퓨터 프로그래밍) 건축물 (건축) Class & Object
  • 3. 추상화: 필요없는 정보는 사용하지 않는다 캡슐화: 남의 정보는 알 필요 없다 상속: 새로운 객체(Object)를 만들 때, 이전의 클래스를 고쳐서 쓰기도(upgrade) 한다. 그 경우, 이전의 클래스를 상속(inherit)받아 사용한다 다형성: 각 객체는 같은 명령을 받아도, 다른 행동을 할 수 있다. 추상화, 캡슐화, 상속, 다형성 OOP의 4대 규칙
  • 5. EmployeeTest 문제: 한 눈에 무엇을 설명하려는 것인지 알기 어렵다.
  • 6. 자바가 기본적으로 사용하는 클래스들은 10만개를 넘어섬 그래서 Unified Modeling Language를 사용합니다. UML은 객체… 서로의 관계를 굉장히 깔끔하게 설명해 줍니다. UML Class Diagram 여자 남자 정상적이라고 세상에 알려진 관계 *1남자 여자 바람둥이, 일부다처, 기타 등등… *1여자 남자 어장관리, 일처다부, 기타 등등… *1남자 남자 *1여자 여자 더 이상의 자세한 설명은 생략합니다.
  • 7. UML에서 관계는 11가지 종류가 있습니다. 많이 쓰는 거 언급하자면, 다음과 같습니다. 관계란? 남자 여자 서로가 서로를 의존합니다. 남자 자식 아버지라 부르게 허락해주세요! 남자 여자 남자가 여자를 이용해 먹습니다.
  • 8. 막장드라마 잘못된 사용 예 남자 여자 자식 남자 여자 남자 자식 자식은 여자와 남자에게 상속을 받았습니다. (프로그램의 세계에서 중복 상속은 좋은게 아닙니다.)
  • 9. 위의 코드를 이해하는 것은 쉬운 작업이 아님 그래서 Unified Modeling Language를 사용함 UML의 사용법 + Employee () + empAge() + empDesignation() + empSalary() + printEmployee() - String name - int age - String designation - double salary Employee