ºÝºÝߣ

ºÝºÝߣShare a Scribd company logo
?? ?? ??? ??
????? ?? ??(SIG) ?? ??
Hong Hyo Sang
???? : ??? ?? ?????? ??
???? ??? ?? ??
?? : https://www.refactoring.com/catalog/, https://refactoring.guru/refactoring
¡° ???? ??? ? ?? ??? ???? ? ? ??.
??? ?????? ??? ??? ? ?? ??? ??.¡±
???? ??? ???? ?? ??? ?? ?? ?
II. ????? ?? ??(SIG) ??
Contents
1. ?? ??? ?? ??
2. ?? ??? ???? ??
3. ??? ??? ????
4. ?? ?????? ?? ??
5. ???? ??? ?? ? ?? ??
1. Reliabilty(???), Scalabilty(???)
2. Maintainability(?????)
I. ???? ?? ? ????
Content
1. Reliabilty(???), Scalabilty(???)
2. Maintainability(?????)
I. ????
1. Reliabilty(???), Scalabilty(???)
???? ??? ?????? ????? ???? ???? ???? ???? ???? ??? ??? ? ??? ??? ???? ?? ?.
?? : ?? : ??? ?? ?????? ??
? ???? ??
????? ??, ? ??, ?? ?
- ????? ????? ?? ??? ??(redundancy)? ????
??
? ??? RAID ??
? ?? ?? ???? ??
? ?? ??? ?? ??? ??
? ????? ??
?? ??, ?? ??? ???? ?? ???? ?? ?
- ?? ?? ???, ???? ??, ???? ?? ???? ??
???? ??? ?? ?? ?? ??
- ? ??? ???, ???? ??, ?? ????? ?? ????? ?
??? ??? ?? ??? ??
? ?? ????
? ??? ?? ?? ?
- ??????? ?? ? ?? ??
- ?? ??? ?
? scaling up / scailing out
2. Maintainability(?????)
????? ??? ???? ?? ??? ?? ???? ??? ?? ?.
?? : ?? : ??? ?? ?????? ??, https://devforperson.tistory.com/entry/ISO-25010-%ED%92%88%EC%A7%88-%ED%8A%B9%EC%84%B1
? ??? (Operability)
???? ???? ???? ?? ??? ? ??? ??. ? ??? ??? ?.
? ??? (Simplicity)
???? ???? ??? ??? ?? ???? ?? ??? ?? ??? ????? ??? ???? ??? ?
???? ???? ????? ? ???? ??? ???? ?? ?? ??? ? ?? ???
? ?? ??? (Functional suitability), ?? ??? (Performance efficiency), ??? (Compatibility), ??? (Usability), ??? (Reliability), ?? (Security), ?
???? (Maintainability), ??? (Portability) ??? ? ?? ???
? ??? (Modularity) : ??? ??? ??? ??? ?? ?? ?? ??? ???(SW)? ??? ??
? ???? (Reusability) : ??(??)? ? ? ??? ????? ??? ? ???, ?? ??? ??? ? ?? ??
? ??? (Analyzability) : ??(???)? ??? ????, ??? ??? ???? ????? ???? ??? ????? ?? ??? ???? ?? ??
? ?? ??? (Modifiability) : ??(???)? ??? ?, ?? ??? ??? ?????? ??? ????? ???? ????? ????? ??? ? ?? ??
? ?? ??? (Testability) : ??(???, ????)? ??? ??? ????? ??? ? ?? ??
? ??? (Portability) : ??(???, ????)? ?? ??? ??(SW/HW/Network) ???? ??? ??? ??
? ??? (Adaptability) : ??(???)? ?? SW(HW)? ????? ????? ????? ??? ? ?? ??
? ?? ??? (Installability) : ??(???)? ????? ??/??? ? ?? ??
? ??? (Replaceability) : ??? ??? ???? ??? ??? ?? ?? ??? SW ???? ??? ? ?? ??
2. Maintainability(?????)
????? ??? ???? ?? ??? ?? ???? ??? ?? ?.
?? : http://i-bada.blogspot.com/2012/07/blog-post_3628.html
? ??? ??? ??? ???? ?? ?????? ????.
? ?????? ???? ?? ??? ??? ?? ???? ?? ???? ??? ??? ?? ??? ???? ??.
- ?? ??? ?? ??? ?? -> ?? ?? ?? ??
? ?????? ??? ? ???? ????? ???? ?????? ?? ??.
Content
1. ?? ??? ?? ??
2. ?? ??? ???? ??
3. ??? ??? ????
4. ?? ?????? ?? ??
5. ???? ??? ????
6. ?? ??
II. ????? ?? ??(SIG) ??
1. ?? ??? ?? ??
??? ??? 15??? ???? ?? ???? ?? ???? ??(??)??, ?????, ????? ?? ??.
? ??? ????? ??? ??? ???? ??.
public void test() {
if (true) {
log.debug(¡°step 1¡±);
}
if(!actionA()) {
for ( ¡­. ) {
action ¡­.
}
}
if(!actionB()) {
for ( ¡­. ) {
action ¡­.
}
}
}
public void test() {
if (true) {
log.debug(¡°step 1¡±);
}
actionA_B()
}
private void actionA_B() {
if(!actionA()) {
for ( ¡­. ) {
action ¡­.
}
}
if(!actionB()) {
for ( ¡­. ) {
action ¡­.
}
}
}
public void test() {
if (true) {
log.debug(¡°step 1¡±);
}
actionA_B()
}
private void actionA_B() {
runActionA();
runActionB();
}
private void runActionA() {
if(!actionA()) {
for ( ¡­. ) {
action ¡­.
}
}
}
private void runActionB() {
if(!actionB()) {
for ( ¡­. ) {
action ¡­.
}
}
}
?? ??? ??? ???? ??? ?? ??? ???
??? ???? ?? ??.
? ???? ???, ???? ??? Extract Method
? ??? ? ?? ???? ???? ? ??? ?? ??? ??? ?? ????? ? ???
??? ??? ??. ??? ?? ???? ?? ?? ?? ?? ???? ??? ? ??.
???? ?? ?? ??? ?? ???? ?? ?? ???? ?? ? ??? ??.
1.? ?? ?? ??
2.?? ?? ??
3.??? ???? ??? ????? ?, ??? ?? ????
???
?? : ?? ???? ????
? ??? ?? ??? ??? ??? ??? ??? ?? ?
- ?????? ??? ?? ??? ??? ??? ??? ???? ?? ? ??
- ??? ?? ??? Loop? ?? ?? ??? ???? ?? ( JVM? ???? )
? ??? ?? ??? ??? ??? ???
- ?? ???? ??? ?? ?? ?? ?? ?? ?? ? ? ?? ??? ?
? ??? ???? ???? ?? ??
- ? ??? ?? ?? ?? ??? ??? ??? ??? ?? ?? ?? ??? ?
? ??
* SIG ?? ?? ?? ??? ?? ?? ? ? 4?? ?? ?? ???
60 ?? ?? 6.9% ??
30 ?? ?? 22.3% ??
15 ?? ?? 43.7% ??
15 ?? ??? 56.3%
2. ?? ??? ???? ??
?? ???? ???? ?? ? ?? ? ???? ?? ??. (?? ? ???? 4? ??? ???? ??? ??? ? ?? ??? ?? ?? ?? ?? ??
?? ?? ? ???? ?? ??.)
¨C ???? ??? ??? CASE? ???
?? ???? : ?? ??? ??? ? ??? ?? ????? ???? ??? ?? ????
?? ???? ?? ??
?? ?? : ? ??? ?? ?? ??? ?? ??? ???? ?? ?? ??? ?? ?? ??
?? ?? ?? : ??? ??? ??? ?? ?
?? ??? ( ??? ??? ) : ??? + 1 ?? ¡°??? ???? 5? ?? ??¡° ?? ???
????? ??? ???? ??? ??? ???.
switch (a) {
case A :
¡­
break;
case B :
¡­
break;
case C :
¡­
break;
case D :
¡­
break;
case E :
¡­
break;
default :
¡­
break;
}
?? ??? : 6
Case ?? ?? ? ? ?? ???? ?? ?
? JAVA ???
- if,
- case,
- ?,
- &&, ||
- while
- for
- catch
If-then-else ?? ?? ?? ???
- ???? ??
- ??? ??? ?? ??
- ???? ??? ?
??? ?? : ??? ???? ???? ??? ??? ???? ??
??? ?? : ??? ?? ?? ??? ???? ?? ??? ??? ?? ??? ?? ?
???? ??
?? ? ??? ?? ?? : ???? ?? ???? ??? ??? ??? ??? ?? ??
?? ??? ?? : ?? ????? ?? ???? ?? ??? ?? ?? break, continue??
??. ??
?? ? ??? ?? ?? ??? : ?? ? ??? ??? ??? ???? ?? ?? ??? ?
? ?? ??? ?? ?? ??? CASE???? ?? ?? ?? ?? ?? ?? ?,
???? ????? ??? : ?? ?? ?? ??? ??? ??? ??? ?? ?? ???
??? ?? ?? ?? ???? ???. ?? ???? ?? ???? ?? ??? ??
? ???? ???? ???? ?? ?? ???
- ???? ???? ???? ?? ??? ??? ??? CASE? ?? ?? ?? ???, ?
?? ??? 4? ??? ??? ??? ?? ?? ???? ?? ?? ??? ?? ????
?? ??? ???? ?? ??? ? ?? ?? ? ? ??.
* SIG ?? ??? ?? ??? ?? ?? ? ? 4?? ?? ?? ???
> ??? 25 ?? ?? 1.5% ??
> ??? 10 ?? ?? 10.0% ??
> ??? 5 ?? ?? 25.2% ??
<= ??? 5 ?? ??? 74.8%
2. ?? ??? ???? ??
?? ???? ???? ?? ? ?? ? ???? ?? ??. (?? ? ???? 4? ??? ???? ??? ??? ? ?? ??? ?? ?? ?? ?? ??
?? ?? ? ???? ?? ??.)
Decompose Conditional
if (date.before(SUMMER_START) || date.after(SUMMER_END)) {
charge = quantity * winterRate + winterServiceCharge;
}
else {
charge = quantity * summerRate;
}
if (isSummer(date)) {
charge = summerCharge(quantity);
}
else {
charge = winterCharge(quantity);
}
* ?????? ?? *
1. Extract Method ? ?? ???? ??? ???? ??
2. then? else??? ?? ????? ?? .
2. ?? ??? ???? ??
?? ???? ???? ?? ? ?? ? ???? ?? ??. (?? ? ???? 4? ??? ???? ??? ??? ? ?? ??? ?? ?? ?? ?? ??
?? ?? ? ???? ?? ??.)
Consolidate Conditional Expression
if (anEmployee.seniority < 2) return 0;
if (anEmployee.monthsDisabled > 12) return 0;
if (anEmployee.isPartTime) return 0;
if (isNotEligableForDisability()) return 0;
private boolean isNotEligableForDisability() {
return ((anEmployee.seniority < 2)
|| (anEmployee.monthsDisabled > 12)
|| (anEmployee.isPartTime));
}
* ?????? ?? *
1. ?? ??? ???? ?? and?? or. ?? :
- ?? ? ???? and
- ?? ???? ?? or
2. ??? ??? ?? Extract Method ? ?? ?? ???? ??? ???? ???? ??
2. ?? ??? ???? ??
?? ???? ???? ?? ? ?? ? ???? ?? ??. (?? ? ???? 4? ??? ???? ??? ??? ? ?? ??? ?? ?? ?? ?? ??
?? ?? ? ???? ?? ??.)
Consolidate Duplicate Conditional Fragments
if (isSpecialDeal()) {
total = price * 0.95;
send();
}
else {
total = price * 0.98;
send();
}
if (isSpecialDeal()) {
total = price * 0.95;
}
else {
total = price * 0.98;
}
send();
* ?????? ?? *
1. ?? ?? ?? ??
2. ?? ??? ???? ??
?? ???? ???? ?? ? ?? ? ???? ?? ??. (?? ? ???? 4? ??? ???? ??? ??? ? ?? ??? ?? ?? ?? ?? ??
?? ?? ? ???? ?? ??.)
Replace Control Flag with Break
for (const p of people) {
if (! found) {
if ( p === "Don") {
sendAlert();
found = true;
}
for (const p of people) {
if ( p === "Don") {
sendAlert();
break;
}
2. ?? ??? ???? ??
?? ???? ???? ?? ? ?? ? ???? ?? ??. (?? ? ???? 4? ??? ???? ??? ??? ? ?? ??? ?? ?? ?? ?? ??
?? ?? ? ???? ?? ??.)
Replace Nested Conditional with Guard Clauses
public double getPayAmount() {
double result;
if (isDead){
result = deadAmount();
}
else {
if (isSeparated){
result = separatedAmount();
}
else {
if (isRetired){
result = retiredAmount();
}
else{
result = normalPayAmount();
}
}
}
return result;
}
public double getPayAmount() {
if (isDead){
return deadAmount();
}
if (isSeparated){
return separatedAmount();
}
if (isRetired){
return retiredAmount();
}
return normalPayAmount();
}
2. ?? ??? ???? ??
?? ???? ???? ?? ? ?? ? ???? ?? ??. (?? ? ???? 4? ??? ???? ??? ??? ? ?? ??? ?? ?? ?? ?? ??
?? ?? ? ???? ?? ??.)
class Bird {
// ...
double getSpeed() {
switch (type) {
case EUROPEAN:
return getBaseSpeed();
case AFRICAN:
return getBaseSpeed() - getLoadFactor() * numberOfCoconuts;
case NORWEGIAN_BLUE:
return (isNailed) ? 0 : getBaseSpeed(voltage);
}
throw new RuntimeException("Should be unreachable");
}
}
public interface Bird {
double getSpeed();
}
class European implements Bird {
double getSpeed() {
return getBaseSpeed();
}
}
class African implements Bird {
double getSpeed() {
return getBaseSpeed() - getLoadFactor() * numberOfCoconuts;
}
}
class NorwegianBlue implements Bird {
double getSpeed() {
return (isNailed) ? 0 : getBaseSpeed(voltage);
}
}
private static final Map<Nationallity, Flag> FLAGS = new HashMap<>();
static {
FLAGS.put(EUROPEAN, new European();
FLAGS.put(AFRICAN, new African();
FLAGS.put(NORWEGIAN_BLUE, new NorwegianBlue();
}
public double getSpeed(Nationallity nationallity) {
Flag flag = FLAGS.get(nationallity);
flag = flag != null ? Flag : new DefaultNational();
return flag.getSpeed();
}
3. ??? ??? ????
??? ???? ?? ??? ??? ??? ?? ??? ?????? ??? ?? ???? ?? ??? ?? ???? ???.
- ?? ?? ??? ??.
- ???? ???. : ?? ?? ?? ?
- ???? ??? : ?? ?? ?? ?
- ?? : ?? ???, ?? ???? ?? ???, ?? ?? ???? ?? ?? ???? ???
??? ??
??? 6?? ??? ??? ?? ? ?
- ?? ?? ??, ?? ??
Type 1 Clone : 6?? Clone ??
public void setName(String name) {
this.name = name;
}
public void setName(String name) {
this.name = name;
}
Type 2 Clone :
public void setName(String name) {
String lastName = ¡°??¡±;
this.name = name + lastName ;
¡­
}
public void setName(String name) {
String lastName = ¡°??¡±;
this.name = name + lastName ;
¡­
}
???? ??? : ??? code? ???? ?? ?? ???? ??? static ?? ??
?? ??? : ??? code? ???? ?? ?? ?? ???? ?? ? extends? ??? ??
? ?? ?? ???? ??? ???? ? ?? ??
- ?? ? ??. ??? ??? ?? ????? ?? ??? ??.
- 1. ?? ?? ?? ??
- 2. ?? ?? ???? ?? ?? ?? ?? ???? ??? ?? ??
? ??? ??? ??? ?? ??.
- ?? ??? ??? ?? ?????? ??? ??? ??? ??
? ? ??? ??, ?? ?? ?? ??.
- ?? ?? ??? ??? ??? ??. ?? ??? ?? ?? ?? ?
* SIG ?? ?? ??? ??? ?? ? 4?? ?? ?? ???
?? ?? 95.4% ??
?? 4.6% ??
4. ?? ?????? ?? ??
????? ?? ??( 4? ?? )? ???? ??, ???, ????? ????. 4? ???? ???? ??? ??
* SIG ?? ?????
??? ???? ?? ? 4?? ?? ?? ???
7? ?? 0.7 % ??
5~6 ? 2.7 % ??
3~4 ? 13.8 % ??
2? ?? 86.2 % ??
5. ???? ??? ????
???? ??? ??(???)? ??? ?? ??? ?? ??? ??? ? ??.
- ???? ???? ???? ?? ??.
- ?? ??? ??? ?? ?? ?? ??? ????? ??? ???.
- ???? ?? ???? ??? ??.
- ??? ???? ?? ??? ?? ???? ??? ?? ???? ???? ?? ?? ? ??
????. ???? ? ? ?? ???? ???? ?? ?? ?? ?? ? ??.
- ??? ?? ??? ??? ???? ??
: ?? ????? ?? ??? ?? ?? ?? ?? ???? ?? ???? ??
- ???? ?? ?? ?? ???? ?? ??? ??? ?? ?? ?? ???? ??? ???
??.
?? ??? ??
?? ???? ????? ?? ??
??? ??? ???? ?????/??? ?? ??
* Java Interface? ??? 2? ??? ???? ?? ?? ?? ??
6. ?? ??
?? ??.
- ?? ? ???? ??, ??, ???? ? ??? ??? ?? ?? ???? ???? ?? ??? ??? ?? ???? ?? ??
- ??. ???? ??? ??? ?? ?? ??? ?? ?? ? ????. ??? ? ? ?? ??? ?? ???? ??? ?? ??
- ?? ???? TODO, ?? ?? ?? ???? ?? ?? ??
- ???? ??? ??? ??? ????? ???? ? ?? ???? ??? ? ??? ??.
- ????? ???? ???? ?? ??? ?? ???? ??? ?? ??? ? ????? ???? ??? ? ?? ???? ??.
?? C. ??" ?? ??? ???? 7? ??
? ?? ??? ?? ??? ??? ??.
? ?? ??? ??? ??.
? ?? ?? ??? ??? ??.
? ?? ??? ??? ??.
? ? ??? ??? ??? ??.
? ?? ??? ??? ??.
? ??? ?? ? ? ??? ??? ??.
www.iabacus.co.kr
Tel. 82-2-2109-5400
Fax. 82-2-6442-5409
THANKS

More Related Content

What's hot (19)

Jpa ??? (????? ???) ????
Jpa ??? (????? ???) ????Jpa ??? (????? ???) ????
Jpa ??? (????? ???) ????
?? ?
?
????????? ???????????? ????? JPA
????????? ???????????? ????? JPA????????? ???????????? ????? JPA
????????? ???????????? ????? JPA
?? ?
?
Ksug2015 - JPA3, JPA ????????
Ksug2015 - JPA3, JPA ????????Ksug2015 - JPA3, JPA ????????
Ksug2015 - JPA3, JPA ????????
Younghan Kim
?
2007? ?8? JCO ???? POJO ????? ?? ??
2007? ?8? JCO ???? POJO ????? ?? ??2007? ?8? JCO ???? POJO ????? ?? ??
2007? ?8? JCO ???? POJO ????? ?? ??
beom kyun choi
?
?????????? ???? ??? ???????
?????????? ???? ??? ????????????????? ???? ??? ???????
?????????? ???? ??? ???????
YoungSu Son
?
???? null? ???? ??? ??
???? null? ???? ??? ?????? null? ???? ??? ??
???? null? ???? ??? ??
Sungchul Park
?
5.Spring IoC&DI(DI? ??? ?????)
5.Spring IoC&DI(DI? ??? ?????)5.Spring IoC&DI(DI? ??? ?????)
5.Spring IoC&DI(DI? ??? ?????)
?????(????????3??? 2???)
?
[1A5]??????????????????????????????
[1A5]??????????????????????????????[1A5]??????????????????????????????
[1A5]??????????????????????????????
NAVER D2
?
Spring Framework - Inversion of Control Container
Spring Framework - Inversion of Control ContainerSpring Framework - Inversion of Control Container
Spring Framework - Inversion of Control Container
Kyung Koo Yoon
?
?? ??? ???
?? ??? ????? ??? ???
?? ??? ???
Sungchul Park
?
Open Source Engineering V2
Open Source Engineering V2Open Source Engineering V2
Open Source Engineering V2
YoungSu Son
?
[11]Android DataBinding : ???? ????
[11]Android DataBinding : ???? ????[11]Android DataBinding : ???? ????
[11]Android DataBinding : ???? ????
NAVER Engineering
?
Spring 3? jsr 303 ??
Spring 3? jsr 303 ??Spring 3? jsr 303 ??
Spring 3? jsr 303 ??
Sewon Ann
?
JavaEE6 - ?? ??? ???
JavaEE6 - ?? ??? ???JavaEE6 - ?? ??? ???
JavaEE6 - ?? ??? ???
Jay Lee
?
[112] ?????? ???????? ???????????
[112] ?????? ???????? ???????????[112] ?????? ???????? ???????????
[112] ?????? ???????? ???????????
NAVER D2
?
[#9.???????? & ????? (Spring Framework, MyBatis)]_???????/???????/??IT??/????...
[#9.???????? & ????? (Spring Framework, MyBatis)]_???????/???????/??IT??/????...[#9.???????? & ????? (Spring Framework, MyBatis)]_???????/???????/??IT??/????...
[#9.???????? & ????? (Spring Framework, MyBatis)]_???????/???????/??IT??/????...
?????(????????3??? 2???)
?
Java(1/4)
Java(1/4)Java(1/4)
Java(1/4)
handfoot
?
MyBatis ??? Java+MyBatis+MySQL ??
MyBatis ??? Java+MyBatis+MySQL ??MyBatis ??? Java+MyBatis+MySQL ??
MyBatis ??? Java+MyBatis+MySQL ??
?? ?
?
Jpa ??? (????? ???) ????
Jpa ??? (????? ???) ????Jpa ??? (????? ???) ????
Jpa ??? (????? ???) ????
?? ?
?
????????? ???????????? ????? JPA
????????? ???????????? ????? JPA????????? ???????????? ????? JPA
????????? ???????????? ????? JPA
?? ?
?
Ksug2015 - JPA3, JPA ????????
Ksug2015 - JPA3, JPA ????????Ksug2015 - JPA3, JPA ????????
Ksug2015 - JPA3, JPA ????????
Younghan Kim
?
2007? ?8? JCO ???? POJO ????? ?? ??
2007? ?8? JCO ???? POJO ????? ?? ??2007? ?8? JCO ???? POJO ????? ?? ??
2007? ?8? JCO ???? POJO ????? ?? ??
beom kyun choi
?
?????????? ???? ??? ???????
?????????? ???? ??? ????????????????? ???? ??? ???????
?????????? ???? ??? ???????
YoungSu Son
?
[1A5]??????????????????????????????
[1A5]??????????????????????????????[1A5]??????????????????????????????
[1A5]??????????????????????????????
NAVER D2
?
Spring Framework - Inversion of Control Container
Spring Framework - Inversion of Control ContainerSpring Framework - Inversion of Control Container
Spring Framework - Inversion of Control Container
Kyung Koo Yoon
?
Open Source Engineering V2
Open Source Engineering V2Open Source Engineering V2
Open Source Engineering V2
YoungSu Son
?
[11]Android DataBinding : ???? ????
[11]Android DataBinding : ???? ????[11]Android DataBinding : ???? ????
[11]Android DataBinding : ???? ????
NAVER Engineering
?
Spring 3? jsr 303 ??
Spring 3? jsr 303 ??Spring 3? jsr 303 ??
Spring 3? jsr 303 ??
Sewon Ann
?
JavaEE6 - ?? ??? ???
JavaEE6 - ?? ??? ???JavaEE6 - ?? ??? ???
JavaEE6 - ?? ??? ???
Jay Lee
?
[112] ?????? ???????? ???????????
[112] ?????? ???????? ???????????[112] ?????? ???????? ???????????
[112] ?????? ???????? ???????????
NAVER D2
?
[#9.???????? & ????? (Spring Framework, MyBatis)]_???????/???????/??IT??/????...
[#9.???????? & ????? (Spring Framework, MyBatis)]_???????/???????/??IT??/????...[#9.???????? & ????? (Spring Framework, MyBatis)]_???????/???????/??IT??/????...
[#9.???????? & ????? (Spring Framework, MyBatis)]_???????/???????/??IT??/????...
?????(????????3??? 2???)
?
MyBatis ??? Java+MyBatis+MySQL ??
MyBatis ??? Java+MyBatis+MySQL ??MyBatis ??? Java+MyBatis+MySQL ??
MyBatis ??? Java+MyBatis+MySQL ??
?? ?
?

Similar to Java ???? ??? ?? ?? (20)

Sonarqube 20160509
Sonarqube 20160509Sonarqube 20160509
Sonarqube 20160509
?? ?
?
Legacy code refactoring video rental system
Legacy code refactoring   video rental systemLegacy code refactoring   video rental system
Legacy code refactoring video rental system
Jaehoon Oh
?
»Ø¹úÈ¥ÄÄÂò±ÏÒµÖ¤°ìµÏ¿Ï´óѧ±ÏÒµÖ¤Deakin±ÏÒµÖ¤Ê顾Q΢202-661-4433¡¿ DeakinÊÛ°ÄÖÞ±ÏÒµÖ¤Ô­°æбÏÒµÖ¤Êé³öÊÛ¸÷¹ú±ÏÒµÖ¤Âò°ÄÖÞ±ÏÒµÖ¤µÄ¼Û...
»Ø¹úÈ¥ÄÄÂò±ÏÒµÖ¤°ìµÏ¿Ï´óѧ±ÏÒµÖ¤Deakin±ÏÒµÖ¤Ê顾Q΢202-661-4433¡¿ DeakinÊÛ°ÄÖÞ±ÏÒµÖ¤Ô­°æбÏÒµÖ¤Êé³öÊÛ¸÷¹ú±ÏÒµÖ¤Âò°ÄÖÞ±ÏÒµÖ¤µÄ¼Û...»Ø¹úÈ¥ÄÄÂò±ÏÒµÖ¤°ìµÏ¿Ï´óѧ±ÏÒµÖ¤Deakin±ÏÒµÖ¤Ê顾Q΢202-661-4433¡¿ DeakinÊÛ°ÄÖÞ±ÏÒµÖ¤Ô­°æбÏÒµÖ¤Êé³öÊÛ¸÷¹ú±ÏÒµÖ¤Âò°ÄÖÞ±ÏÒµÖ¤µÄ¼Û...
»Ø¹úÈ¥ÄÄÂò±ÏÒµÖ¤°ìµÏ¿Ï´óѧ±ÏÒµÖ¤Deakin±ÏÒµÖ¤Ê顾Q΢202-661-4433¡¿ DeakinÊÛ°ÄÖÞ±ÏÒµÖ¤Ô­°æбÏÒµÖ¤Êé³öÊÛ¸÷¹ú±ÏÒµÖ¤Âò°ÄÖÞ±ÏÒµÖ¤µÄ¼Û...
asfasf4
?
[????] ?? ???? ???? ?? ??(??)
[????] ?? ???? ???? ?? ??(??)[????] ?? ???? ???? ?? ??(??)
[????] ?? ???? ???? ?? ??(??)
SangIn Choung
?
Responding to change
Responding to changeResponding to change
Responding to change
?? ?
?
Android Native Module ????? ????
Android Native Module ????? ????Android Native Module ????? ????
Android Native Module ????? ????
hanbeom Park
?
TDD.JUnit.???.??
TDD.JUnit.???.??TDD.JUnit.???.??
TDD.JUnit.???.??
Wonchang Song
?
?? ?????1? W.E.L.C.
?? ?????1?  W.E.L.C.?? ?????1?  W.E.L.C.
?? ?????1? W.E.L.C.
Ryan Park
?
NDC11_???_?????
NDC11_???_?????NDC11_???_?????
NDC11_???_?????
Sungik Kim
?
Android unit testing
Android unit testingAndroid unit testing
Android unit testing
Hyeoungkyu Chang
?
X unittestpattern 1?_???
X unittestpattern 1?_???X unittestpattern 1?_???
X unittestpattern 1?_???
?? ?
?
???? ???? ???? ???? - PyCon Korea 2018
???? ???? ???? ???? - PyCon Korea 2018???? ???? ???? ???? - PyCon Korea 2018
???? ???? ???? ???? - PyCon Korea 2018
Kenneth Ceyer
?
????? ??: ???? ??
????? ??: ???? ??????? ??: ???? ??
????? ??: ???? ??
Leonardo YongUk Kim
?
???? ????
???? ???????? ????
???? ????
Kyoung Up Jung
?
Okjsp 13?? ????: ?? ????? Test
Okjsp 13?? ????: ?? ????? TestOkjsp 13?? ????: ?? ????? Test
Okjsp 13?? ????: ?? ????? Test
beom kyun choi
?
About Visual C++ 10
About  Visual C++ 10About  Visual C++ 10
About Visual C++ 10
?? ?
?
The roadtocodecraft
The roadtocodecraftThe roadtocodecraft
The roadtocodecraft
bbongcsu
?
Working Effectively With Legacy Code - xp2005
Working Effectively With Legacy Code - xp2005Working Effectively With Legacy Code - xp2005
Working Effectively With Legacy Code - xp2005
Ryan Park
?
Sonarqube 20160509
Sonarqube 20160509Sonarqube 20160509
Sonarqube 20160509
?? ?
?
Legacy code refactoring video rental system
Legacy code refactoring   video rental systemLegacy code refactoring   video rental system
Legacy code refactoring video rental system
Jaehoon Oh
?
»Ø¹úÈ¥ÄÄÂò±ÏÒµÖ¤°ìµÏ¿Ï´óѧ±ÏÒµÖ¤Deakin±ÏÒµÖ¤Ê顾Q΢202-661-4433¡¿ DeakinÊÛ°ÄÖÞ±ÏÒµÖ¤Ô­°æбÏÒµÖ¤Êé³öÊÛ¸÷¹ú±ÏÒµÖ¤Âò°ÄÖÞ±ÏÒµÖ¤µÄ¼Û...
»Ø¹úÈ¥ÄÄÂò±ÏÒµÖ¤°ìµÏ¿Ï´óѧ±ÏÒµÖ¤Deakin±ÏÒµÖ¤Ê顾Q΢202-661-4433¡¿ DeakinÊÛ°ÄÖÞ±ÏÒµÖ¤Ô­°æбÏÒµÖ¤Êé³öÊÛ¸÷¹ú±ÏÒµÖ¤Âò°ÄÖÞ±ÏÒµÖ¤µÄ¼Û...»Ø¹úÈ¥ÄÄÂò±ÏÒµÖ¤°ìµÏ¿Ï´óѧ±ÏÒµÖ¤Deakin±ÏÒµÖ¤Ê顾Q΢202-661-4433¡¿ DeakinÊÛ°ÄÖÞ±ÏÒµÖ¤Ô­°æбÏÒµÖ¤Êé³öÊÛ¸÷¹ú±ÏÒµÖ¤Âò°ÄÖÞ±ÏÒµÖ¤µÄ¼Û...
»Ø¹úÈ¥ÄÄÂò±ÏÒµÖ¤°ìµÏ¿Ï´óѧ±ÏÒµÖ¤Deakin±ÏÒµÖ¤Ê顾Q΢202-661-4433¡¿ DeakinÊÛ°ÄÖÞ±ÏÒµÖ¤Ô­°æбÏÒµÖ¤Êé³öÊÛ¸÷¹ú±ÏÒµÖ¤Âò°ÄÖÞ±ÏÒµÖ¤µÄ¼Û...
asfasf4
?
[????] ?? ???? ???? ?? ??(??)
[????] ?? ???? ???? ?? ??(??)[????] ?? ???? ???? ?? ??(??)
[????] ?? ???? ???? ?? ??(??)
SangIn Choung
?
Responding to change
Responding to changeResponding to change
Responding to change
?? ?
?
Android Native Module ????? ????
Android Native Module ????? ????Android Native Module ????? ????
Android Native Module ????? ????
hanbeom Park
?
?? ?????1? W.E.L.C.
?? ?????1?  W.E.L.C.?? ?????1?  W.E.L.C.
?? ?????1? W.E.L.C.
Ryan Park
?
X unittestpattern 1?_???
X unittestpattern 1?_???X unittestpattern 1?_???
X unittestpattern 1?_???
?? ?
?
???? ???? ???? ???? - PyCon Korea 2018
???? ???? ???? ???? - PyCon Korea 2018???? ???? ???? ???? - PyCon Korea 2018
???? ???? ???? ???? - PyCon Korea 2018
Kenneth Ceyer
?
Okjsp 13?? ????: ?? ????? Test
Okjsp 13?? ????: ?? ????? TestOkjsp 13?? ????: ?? ????? Test
Okjsp 13?? ????: ?? ????? Test
beom kyun choi
?
About Visual C++ 10
About  Visual C++ 10About  Visual C++ 10
About Visual C++ 10
?? ?
?
The roadtocodecraft
The roadtocodecraftThe roadtocodecraft
The roadtocodecraft
bbongcsu
?
Working Effectively With Legacy Code - xp2005
Working Effectively With Legacy Code - xp2005Working Effectively With Legacy Code - xp2005
Working Effectively With Legacy Code - xp2005
Ryan Park
?

More from Hyosang Hong (20)

MSA_????.pdf
MSA_????.pdfMSA_????.pdf
MSA_????.pdf
Hyosang Hong
?
Java ?????
Java ?????Java ?????
Java ?????
Hyosang Hong
?
Java ???
Java ???Java ???
Java ???
Hyosang Hong
?
Java lambda
Java lambdaJava lambda
Java lambda
Hyosang Hong
?
Java inner class
Java inner classJava inner class
Java inner class
Hyosang Hong
?
Java generic
Java genericJava generic
Java generic
Hyosang Hong
?
Java extends
Java extendsJava extends
Java extends
Hyosang Hong
?
Java ??
Java ??Java ??
Java ??
Hyosang Hong
?
Java collection
Java collectionJava collection
Java collection
Hyosang Hong
?
Java class
Java classJava class
Java class
Hyosang Hong
?
Spring ?? ??
Spring ?? ??Spring ?? ??
Spring ?? ??
Hyosang Hong
?
Map struct
Map structMap struct
Map struct
Hyosang Hong
?
Kafka ?? v0.1
Kafka ?? v0.1Kafka ?? v0.1
Kafka ?? v0.1
Hyosang Hong
?
Jpa ?? ?? ??
Jpa ?? ?? ??Jpa ?? ?? ??
Jpa ?? ?? ??
Hyosang Hong
?
Java ???? ?? ?? 20210405
Java ???? ?? ?? 20210405Java ???? ?? ?? 20210405
Java ???? ?? ?? 20210405
Hyosang Hong
?
Java stream v0.1
Java stream v0.1Java stream v0.1
Java stream v0.1
Hyosang Hong
?
Map struct
Map structMap struct
Map struct
Hyosang Hong
?
Kafka ?? v0.1
Kafka ?? v0.1Kafka ?? v0.1
Kafka ?? v0.1
Hyosang Hong
?
Java ???? ?? ?? 20210405
Java ???? ?? ?? 20210405Java ???? ?? ?? 20210405
Java ???? ?? ?? 20210405
Hyosang Hong
?

Java ???? ??? ?? ??

  • 1. ?? ?? ??? ?? ????? ?? ??(SIG) ?? ?? Hong Hyo Sang ???? : ??? ?? ?????? ?? ???? ??? ?? ?? ?? : https://www.refactoring.com/catalog/, https://refactoring.guru/refactoring ¡° ???? ??? ? ?? ??? ???? ? ? ??. ??? ?????? ??? ??? ? ?? ??? ??.¡± ???? ??? ???? ?? ??? ?? ?? ?
  • 2. II. ????? ?? ??(SIG) ?? Contents 1. ?? ??? ?? ?? 2. ?? ??? ???? ?? 3. ??? ??? ???? 4. ?? ?????? ?? ?? 5. ???? ??? ?? ? ?? ?? 1. Reliabilty(???), Scalabilty(???) 2. Maintainability(?????) I. ???? ?? ? ????
  • 3. Content 1. Reliabilty(???), Scalabilty(???) 2. Maintainability(?????) I. ????
  • 4. 1. Reliabilty(???), Scalabilty(???) ???? ??? ?????? ????? ???? ???? ???? ???? ???? ??? ??? ? ??? ??? ???? ?? ?. ?? : ?? : ??? ?? ?????? ?? ? ???? ?? ????? ??, ? ??, ?? ? - ????? ????? ?? ??? ??(redundancy)? ???? ?? ? ??? RAID ?? ? ?? ?? ???? ?? ? ?? ??? ?? ??? ?? ? ????? ?? ?? ??, ?? ??? ???? ?? ???? ?? ? - ?? ?? ???, ???? ??, ???? ?? ???? ?? ???? ??? ?? ?? ?? ?? - ? ??? ???, ???? ??, ?? ????? ?? ????? ? ??? ??? ?? ??? ?? ? ?? ???? ? ??? ?? ?? ? - ??????? ?? ? ?? ?? - ?? ??? ? ? scaling up / scailing out
  • 5. 2. Maintainability(?????) ????? ??? ???? ?? ??? ?? ???? ??? ?? ?. ?? : ?? : ??? ?? ?????? ??, https://devforperson.tistory.com/entry/ISO-25010-%ED%92%88%EC%A7%88-%ED%8A%B9%EC%84%B1 ? ??? (Operability) ???? ???? ???? ?? ??? ? ??? ??. ? ??? ??? ?. ? ??? (Simplicity) ???? ???? ??? ??? ?? ???? ?? ??? ?? ??? ????? ??? ???? ??? ? ???? ???? ????? ? ???? ??? ???? ?? ?? ??? ? ?? ??? ? ?? ??? (Functional suitability), ?? ??? (Performance efficiency), ??? (Compatibility), ??? (Usability), ??? (Reliability), ?? (Security), ? ???? (Maintainability), ??? (Portability) ??? ? ?? ??? ? ??? (Modularity) : ??? ??? ??? ??? ?? ?? ?? ??? ???(SW)? ??? ?? ? ???? (Reusability) : ??(??)? ? ? ??? ????? ??? ? ???, ?? ??? ??? ? ?? ?? ? ??? (Analyzability) : ??(???)? ??? ????, ??? ??? ???? ????? ???? ??? ????? ?? ??? ???? ?? ?? ? ?? ??? (Modifiability) : ??(???)? ??? ?, ?? ??? ??? ?????? ??? ????? ???? ????? ????? ??? ? ?? ?? ? ?? ??? (Testability) : ??(???, ????)? ??? ??? ????? ??? ? ?? ?? ? ??? (Portability) : ??(???, ????)? ?? ??? ??(SW/HW/Network) ???? ??? ??? ?? ? ??? (Adaptability) : ??(???)? ?? SW(HW)? ????? ????? ????? ??? ? ?? ?? ? ?? ??? (Installability) : ??(???)? ????? ??/??? ? ?? ?? ? ??? (Replaceability) : ??? ??? ???? ??? ??? ?? ?? ??? SW ???? ??? ? ?? ??
  • 6. 2. Maintainability(?????) ????? ??? ???? ?? ??? ?? ???? ??? ?? ?. ?? : http://i-bada.blogspot.com/2012/07/blog-post_3628.html ? ??? ??? ??? ???? ?? ?????? ????. ? ?????? ???? ?? ??? ??? ?? ???? ?? ???? ??? ??? ?? ??? ???? ??. - ?? ??? ?? ??? ?? -> ?? ?? ?? ?? ? ?????? ??? ? ???? ????? ???? ?????? ?? ??.
  • 7. Content 1. ?? ??? ?? ?? 2. ?? ??? ???? ?? 3. ??? ??? ???? 4. ?? ?????? ?? ?? 5. ???? ??? ???? 6. ?? ?? II. ????? ?? ??(SIG) ??
  • 8. 1. ?? ??? ?? ?? ??? ??? 15??? ???? ?? ???? ?? ???? ??(??)??, ?????, ????? ?? ??. ? ??? ????? ??? ??? ???? ??. public void test() { if (true) { log.debug(¡°step 1¡±); } if(!actionA()) { for ( ¡­. ) { action ¡­. } } if(!actionB()) { for ( ¡­. ) { action ¡­. } } } public void test() { if (true) { log.debug(¡°step 1¡±); } actionA_B() } private void actionA_B() { if(!actionA()) { for ( ¡­. ) { action ¡­. } } if(!actionB()) { for ( ¡­. ) { action ¡­. } } } public void test() { if (true) { log.debug(¡°step 1¡±); } actionA_B() } private void actionA_B() { runActionA(); runActionB(); } private void runActionA() { if(!actionA()) { for ( ¡­. ) { action ¡­. } } } private void runActionB() { if(!actionB()) { for ( ¡­. ) { action ¡­. } } } ?? ??? ??? ???? ??? ?? ??? ??? ??? ???? ?? ??. ? ???? ???, ???? ??? Extract Method ? ??? ? ?? ???? ???? ? ??? ?? ??? ??? ?? ????? ? ??? ??? ??? ??. ??? ?? ???? ?? ?? ?? ?? ???? ??? ? ??. ???? ?? ?? ??? ?? ???? ?? ?? ???? ?? ? ??? ??. 1.? ?? ?? ?? 2.?? ?? ?? 3.??? ???? ??? ????? ?, ??? ?? ???? ??? ?? : ?? ???? ???? ? ??? ?? ??? ??? ??? ??? ??? ?? ? - ?????? ??? ?? ??? ??? ??? ??? ???? ?? ? ?? - ??? ?? ??? Loop? ?? ?? ??? ???? ?? ( JVM? ???? ) ? ??? ?? ??? ??? ??? ??? - ?? ???? ??? ?? ?? ?? ?? ?? ?? ? ? ?? ??? ? ? ??? ???? ???? ?? ?? - ? ??? ?? ?? ?? ??? ??? ??? ??? ?? ?? ?? ??? ? ? ?? * SIG ?? ?? ?? ??? ?? ?? ? ? 4?? ?? ?? ??? 60 ?? ?? 6.9% ?? 30 ?? ?? 22.3% ?? 15 ?? ?? 43.7% ?? 15 ?? ??? 56.3%
  • 9. 2. ?? ??? ???? ?? ?? ???? ???? ?? ? ?? ? ???? ?? ??. (?? ? ???? 4? ??? ???? ??? ??? ? ?? ??? ?? ?? ?? ?? ?? ?? ?? ? ???? ?? ??.) ¨C ???? ??? ??? CASE? ??? ?? ???? : ?? ??? ??? ? ??? ?? ????? ???? ??? ?? ???? ?? ???? ?? ?? ?? ?? : ? ??? ?? ?? ??? ?? ??? ???? ?? ?? ??? ?? ?? ?? ?? ?? ?? : ??? ??? ??? ?? ? ?? ??? ( ??? ??? ) : ??? + 1 ?? ¡°??? ???? 5? ?? ??¡° ?? ??? ????? ??? ???? ??? ??? ???. switch (a) { case A : ¡­ break; case B : ¡­ break; case C : ¡­ break; case D : ¡­ break; case E : ¡­ break; default : ¡­ break; } ?? ??? : 6 Case ?? ?? ? ? ?? ???? ?? ? ? JAVA ??? - if, - case, - ?, - &&, || - while - for - catch If-then-else ?? ?? ?? ??? - ???? ?? - ??? ??? ?? ?? - ???? ??? ? ??? ?? : ??? ???? ???? ??? ??? ???? ?? ??? ?? : ??? ?? ?? ??? ???? ?? ??? ??? ?? ??? ?? ? ???? ?? ?? ? ??? ?? ?? : ???? ?? ???? ??? ??? ??? ??? ?? ?? ?? ??? ?? : ?? ????? ?? ???? ?? ??? ?? ?? break, continue?? ??. ?? ?? ? ??? ?? ?? ??? : ?? ? ??? ??? ??? ???? ?? ?? ??? ? ? ?? ??? ?? ?? ??? CASE???? ?? ?? ?? ?? ?? ?? ?, ???? ????? ??? : ?? ?? ?? ??? ??? ??? ??? ?? ?? ??? ??? ?? ?? ?? ???? ???. ?? ???? ?? ???? ?? ??? ?? ? ???? ???? ???? ?? ?? ??? - ???? ???? ???? ?? ??? ??? ??? CASE? ?? ?? ?? ???, ? ?? ??? 4? ??? ??? ??? ?? ?? ???? ?? ?? ??? ?? ???? ?? ??? ???? ?? ??? ? ?? ?? ? ? ??. * SIG ?? ??? ?? ??? ?? ?? ? ? 4?? ?? ?? ??? > ??? 25 ?? ?? 1.5% ?? > ??? 10 ?? ?? 10.0% ?? > ??? 5 ?? ?? 25.2% ?? <= ??? 5 ?? ??? 74.8%
  • 10. 2. ?? ??? ???? ?? ?? ???? ???? ?? ? ?? ? ???? ?? ??. (?? ? ???? 4? ??? ???? ??? ??? ? ?? ??? ?? ?? ?? ?? ?? ?? ?? ? ???? ?? ??.) Decompose Conditional if (date.before(SUMMER_START) || date.after(SUMMER_END)) { charge = quantity * winterRate + winterServiceCharge; } else { charge = quantity * summerRate; } if (isSummer(date)) { charge = summerCharge(quantity); } else { charge = winterCharge(quantity); } * ?????? ?? * 1. Extract Method ? ?? ???? ??? ???? ?? 2. then? else??? ?? ????? ?? .
  • 11. 2. ?? ??? ???? ?? ?? ???? ???? ?? ? ?? ? ???? ?? ??. (?? ? ???? 4? ??? ???? ??? ??? ? ?? ??? ?? ?? ?? ?? ?? ?? ?? ? ???? ?? ??.) Consolidate Conditional Expression if (anEmployee.seniority < 2) return 0; if (anEmployee.monthsDisabled > 12) return 0; if (anEmployee.isPartTime) return 0; if (isNotEligableForDisability()) return 0; private boolean isNotEligableForDisability() { return ((anEmployee.seniority < 2) || (anEmployee.monthsDisabled > 12) || (anEmployee.isPartTime)); } * ?????? ?? * 1. ?? ??? ???? ?? and?? or. ?? : - ?? ? ???? and - ?? ???? ?? or 2. ??? ??? ?? Extract Method ? ?? ?? ???? ??? ???? ???? ??
  • 12. 2. ?? ??? ???? ?? ?? ???? ???? ?? ? ?? ? ???? ?? ??. (?? ? ???? 4? ??? ???? ??? ??? ? ?? ??? ?? ?? ?? ?? ?? ?? ?? ? ???? ?? ??.) Consolidate Duplicate Conditional Fragments if (isSpecialDeal()) { total = price * 0.95; send(); } else { total = price * 0.98; send(); } if (isSpecialDeal()) { total = price * 0.95; } else { total = price * 0.98; } send(); * ?????? ?? * 1. ?? ?? ?? ??
  • 13. 2. ?? ??? ???? ?? ?? ???? ???? ?? ? ?? ? ???? ?? ??. (?? ? ???? 4? ??? ???? ??? ??? ? ?? ??? ?? ?? ?? ?? ?? ?? ?? ? ???? ?? ??.) Replace Control Flag with Break for (const p of people) { if (! found) { if ( p === "Don") { sendAlert(); found = true; } for (const p of people) { if ( p === "Don") { sendAlert(); break; }
  • 14. 2. ?? ??? ???? ?? ?? ???? ???? ?? ? ?? ? ???? ?? ??. (?? ? ???? 4? ??? ???? ??? ??? ? ?? ??? ?? ?? ?? ?? ?? ?? ?? ? ???? ?? ??.) Replace Nested Conditional with Guard Clauses public double getPayAmount() { double result; if (isDead){ result = deadAmount(); } else { if (isSeparated){ result = separatedAmount(); } else { if (isRetired){ result = retiredAmount(); } else{ result = normalPayAmount(); } } } return result; } public double getPayAmount() { if (isDead){ return deadAmount(); } if (isSeparated){ return separatedAmount(); } if (isRetired){ return retiredAmount(); } return normalPayAmount(); }
  • 15. 2. ?? ??? ???? ?? ?? ???? ???? ?? ? ?? ? ???? ?? ??. (?? ? ???? 4? ??? ???? ??? ??? ? ?? ??? ?? ?? ?? ?? ?? ?? ?? ? ???? ?? ??.) class Bird { // ... double getSpeed() { switch (type) { case EUROPEAN: return getBaseSpeed(); case AFRICAN: return getBaseSpeed() - getLoadFactor() * numberOfCoconuts; case NORWEGIAN_BLUE: return (isNailed) ? 0 : getBaseSpeed(voltage); } throw new RuntimeException("Should be unreachable"); } } public interface Bird { double getSpeed(); } class European implements Bird { double getSpeed() { return getBaseSpeed(); } } class African implements Bird { double getSpeed() { return getBaseSpeed() - getLoadFactor() * numberOfCoconuts; } } class NorwegianBlue implements Bird { double getSpeed() { return (isNailed) ? 0 : getBaseSpeed(voltage); } } private static final Map<Nationallity, Flag> FLAGS = new HashMap<>(); static { FLAGS.put(EUROPEAN, new European(); FLAGS.put(AFRICAN, new African(); FLAGS.put(NORWEGIAN_BLUE, new NorwegianBlue(); } public double getSpeed(Nationallity nationallity) { Flag flag = FLAGS.get(nationallity); flag = flag != null ? Flag : new DefaultNational(); return flag.getSpeed(); }
  • 16. 3. ??? ??? ???? ??? ???? ?? ??? ??? ??? ?? ??? ?????? ??? ?? ???? ?? ??? ?? ???? ???. - ?? ?? ??? ??. - ???? ???. : ?? ?? ?? ? - ???? ??? : ?? ?? ?? ? - ?? : ?? ???, ?? ???? ?? ???, ?? ?? ???? ?? ?? ???? ??? ??? ?? ??? 6?? ??? ??? ?? ? ? - ?? ?? ??, ?? ?? Type 1 Clone : 6?? Clone ?? public void setName(String name) { this.name = name; } public void setName(String name) { this.name = name; } Type 2 Clone : public void setName(String name) { String lastName = ¡°??¡±; this.name = name + lastName ; ¡­ } public void setName(String name) { String lastName = ¡°??¡±; this.name = name + lastName ; ¡­ } ???? ??? : ??? code? ???? ?? ?? ???? ??? static ?? ?? ?? ??? : ??? code? ???? ?? ?? ?? ???? ?? ? extends? ??? ?? ? ?? ?? ???? ??? ???? ? ?? ?? - ?? ? ??. ??? ??? ?? ????? ?? ??? ??. - 1. ?? ?? ?? ?? - 2. ?? ?? ???? ?? ?? ?? ?? ???? ??? ?? ?? ? ??? ??? ??? ?? ??. - ?? ??? ??? ?? ?????? ??? ??? ??? ?? ? ? ??? ??, ?? ?? ?? ??. - ?? ?? ??? ??? ??? ??. ?? ??? ?? ?? ?? ? * SIG ?? ?? ??? ??? ?? ? 4?? ?? ?? ??? ?? ?? 95.4% ?? ?? 4.6% ??
  • 17. 4. ?? ?????? ?? ?? ????? ?? ??( 4? ?? )? ???? ??, ???, ????? ????. 4? ???? ???? ??? ?? * SIG ?? ????? ??? ???? ?? ? 4?? ?? ?? ??? 7? ?? 0.7 % ?? 5~6 ? 2.7 % ?? 3~4 ? 13.8 % ?? 2? ?? 86.2 % ??
  • 18. 5. ???? ??? ???? ???? ??? ??(???)? ??? ?? ??? ?? ??? ??? ? ??. - ???? ???? ???? ?? ??. - ?? ??? ??? ?? ?? ?? ??? ????? ??? ???. - ???? ?? ???? ??? ??. - ??? ???? ?? ??? ?? ???? ??? ?? ???? ???? ?? ?? ? ?? ????. ???? ? ? ?? ???? ???? ?? ?? ?? ?? ? ??. - ??? ?? ??? ??? ???? ?? : ?? ????? ?? ??? ?? ?? ?? ?? ???? ?? ???? ?? - ???? ?? ?? ?? ???? ?? ??? ??? ?? ?? ?? ???? ??? ??? ??. ?? ??? ?? ?? ???? ????? ?? ?? ??? ??? ???? ?????/??? ?? ?? * Java Interface? ??? 2? ??? ???? ?? ?? ?? ??
  • 19. 6. ?? ?? ?? ??. - ?? ? ???? ??, ??, ???? ? ??? ??? ?? ?? ???? ???? ?? ??? ??? ?? ???? ?? ?? - ??. ???? ??? ??? ?? ?? ??? ?? ?? ? ????. ??? ? ? ?? ??? ?? ???? ??? ?? ?? - ?? ???? TODO, ?? ?? ?? ???? ?? ?? ?? - ???? ??? ??? ??? ????? ???? ? ?? ???? ??? ? ??? ??. - ????? ???? ???? ?? ??? ?? ???? ??? ?? ??? ? ????? ???? ??? ? ?? ???? ??. ?? C. ??" ?? ??? ???? 7? ?? ? ?? ??? ?? ??? ??? ??. ? ?? ??? ??? ??. ? ?? ?? ??? ??? ??. ? ?? ??? ??? ??. ? ? ??? ??? ??? ??. ? ?? ??? ??? ??. ? ??? ?? ? ? ??? ??? ??.