Skip to content

Instantly share code, notes, and snippets.

@mindwing
Created December 13, 2015 06:38
Show Gist options
  • Save mindwing/29c864c9433ecbfc1e0b to your computer and use it in GitHub Desktop.
Save mindwing/29c864c9433ecbfc1e0b to your computer and use it in GitHub Desktop.
5일차 견우직녀문제 풀이입니다.
package cosmos.aquila;
/**
* Created by mindwing on 2015-12-13.
* Altair 는 독수리자리(Aquila)의 알파성(가장 밝은 별)입니다.
*/
public class Altair {
public String getName() {
return "독수리자리-알타이르(견우)";
}
}
package cosmos.lyra;
/**
* Created by mindwing on 2015-12-13.
* Vega 는 거문고자리(Lyra)의 알파성(가장 밝은 별)입니다.
*/
public class Vega {
public String getName() {
return "거문고자리-베가(직녀)";
}
}
package cosmos.solarsystem;
import cosmos.lyra.Vega;
import cosmos.aquila.Altair;
/**
* Created by mindwing on 2015-12-13.
*/
public class D5_Solar {
public static void main(String[] args) {
Sun sun = new Sun();
Vega vega = new Vega();
Altair altair = new Altair();
System.out.println(sun.getName());
System.out.println(vega.getName());
System.out.println(altair.getName());
}
}
class Sun {
public String getName() {
return "태양";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment