Contents
- 1. 데블2004/
- 2. 는 기
- 3. : Programming
- 4. Code Review - 떤 각 며 나?
- 5.
- 6. Structured Programming 개
- 7. HIPO
- 8. Paper Programming : HIPO 그리기
- 9. HIPO 그린 것 근로 구
- 10.
- 11. OOP 개
- 12. : CRC Card
- 13. OOP Demo 1 : Message 를 날립다~ (Python)
- 14. OOP Demo 2 : Message 를 날립다~ (Java & Eclipse)
- 15.
- 16. 바 단 명
- 17.
- 18. interface 개념 가 명
- 19. 구 : 다른 객 대 & 기능 변
- 20. 론 & 발
- 21. 무리
- 22. 기
1.1.1. 바 및 ¶
PT나? PT 내 뒤를 때리는것 같군.
바 래 및 개발
바 래 및 개발
는 래가 군. C기반 라, C++(문법), Smalltalk(vm) 반다. Early History 는 고링 만든것 럼 되 군. (SeeAlso Java Early history
개발 는 Java를 구 Servlet-JSP 기 빠고, 2001 기 'JavaTM 2 Playtform 1.3,'는 J2SE 로 바꾸. 1.4는 1 나고, 1.5 가 8 발됩다. Java는 major upgrade 많 부 변경됩다
Java 개발 는 Java를 구 Servlet-JSP 기 빠고, 2001 기 'JavaTM 2 Playtform 1.3,'는 J2SE 로 바꾸. 1.4는 1 나고, 1.5 가 8 발됩다. Java는 major upgrade 많 부 변경됩다
는 더 다. 보 가 다 ActiveX 구물다.국내 Rich Client 는 부 ActiveX 고 는 Flash게 내다. (2003) Java 80% applet 닌 J2EE 모바 J2ME 다.
--NeoCoin1.1.2.4. 단 로그램 및 ¶
- 로그램(FirstJava.java)
~cpp public class FirstJava { public static void main(String argv[]) { System.out.println("Hello world!"); } }
1.1.3. 기 ¶
- JFrame show() 메드 -> 보게 다.
- JFrame setBounds(int x, int y, int weight, int height) 메드
-> int 달가 대로 는 'x', 'y', '', '높' 를 가리다
~cpp
import javax.swing.*;
public class FirstJava extends JFrame{
public FirstJava()
{
}
public static void main(String args[]) {
FirstJava helloWorld = new FirstJava();
helloWorld.setBounds(100,100,800,600);
helloWorld.show();
}
}
~cpp
package WindowFrame;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import javax.swing.JFrame;
public class WindowFrame {
static BufferedReader breader;
public WindowFrame(String title, int width, int height) {
JFrame f = new JFrame(title);
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
f.setSize(width, height);
f.show();
}
public static int inputInt() throws IOException {
breader
= new BufferedReader(new InputStreamReader(System.in));
return Integer.parseInt(breader.readLine());
}
public static String inputString() throws IOException {
return breader.readLine();
}
public static void main(String[] args) {
breader = new BufferedReader(new InputStreamReader(System.in));
try {
System.out.print(" : ");
String title = inputString();
System.out.print(" : ");
int w = inputInt();
System.out.print("높 : ");
int h = inputInt();
new WindowFrame(title, w, h);
} catch(IOException ex) {
ex.printStackTrace();
}
}
}

1.1.4. 그림그리기 ¶
- java.awt.Graphics 가
- public void paint(Graphics g) 메드
-> 그리는 부 담당는 다.
- g.drawString(String string, int s, int y) 메드
-> int 달가 대로 문 그리는 ' x', ' y' 를 가리다
- g.drawLine(int startX, int startY, int endX, int endY) 메드
-> int 달가 대로 리는 ' x', ' y', '끝 x', '끝 y' 를 가리다
- g.drawOval(int x, int y, int weight, int height) 메드
-> int 달가 대로 그리는 ' x', ' y', ' ', ' 높' 를 가리다
- g.fillOval(int x, int y, int weight, int height) 메드
-> int 달가 대로 그리는 ' x', ' y', ' ', ' 높' 를 가리다
~cpp
import java.awt.Graphics;
import javax.swing.*;
public class FirstJava extends JFrame{
public FirstJava()
{
}
public static void main(String args[]) {
FirstJava helloWorld = new FirstJava();
helloWorld.setBounds(100,100,800,600);
helloWorld.show();
}
public void paint(Graphics g)
{
g.drawLine(100,100,300,300);
g.drawOval(200,200,400,400);
g.fillOval(500,500,100,100);
}
}
1.1.5. 벤 ¶
- addMouseListener 로 들러를 가다.
- mouseClicked 메드 -> 메를 릭 경 동
~cpp import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; import javax.swing.*; public class FirstJava extends JFrame{ public FirstJava() { addMouseListener(new MouseAdapter() { public void mouseClicked(MouseEvent e) { int x = e.getX(); int y = e.getY(); System.out.println("x : " + x); System.out.println("y : " + y); } }); } public static void main(String args[]) { FirstJava helloWorld = new FirstJava(); helloWorld.setBounds(100,100,800,600); helloWorld.show(); } }
1.1.6.1. 를 릭 경 paint 를 ¶
- repaint() 메드를
~cpp
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import javax.swing.*;
public class FirstJava extends JFrame{
public FirstJava()
{
addMouseListener(new MouseAdapter() {
public void mouseClicked(MouseEvent e) {
int x = e.getX();
int y = e.getY();
repaint();
}
});
}
public static void main(String args[]) {
FirstJava helloWorld = new FirstJava();
helloWorld.setBounds(100,100,800,600);
helloWorld.show();
}
public void paint(Graphics g)
{
System.out.print("Click!! ");
}
}
3. : Programming ¶
~cpp 6 0 0 222244451 999 Output 1 1 1 1 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 2 0 0 0 0 1 0 0 0 0 0 0 0 0 5 0 0 22224444346 999 Output 2 1 1 1 1 1 0 0 0 2 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 3 0 0 44220064 999 Output 1 1 1 1 1 1 1 1 1
13. OOP Demo 1 : Message 를 날립다~ (Python) ¶
고, 당 디렉리 들 뒤 c:\python23\python.exe 를 .
~cpp
from StarCraft import StarCraft
sc = StarCraft ()
dir(sc)
gateway = sc.createGateway ()
dir(gateway)
z1 = gateway.createZealot ()
dir(z1)
z1.move (160,160)
d1 = gateway.createDragoon ()
dir(d1)
d1.move (180,180)
z1.printHp()
z1.getPosition()
d1.printHp()
d1.getPosition()
z1.setAttackTarget(d1)
z1.printAttackTarget()
z1.getAttackTarget().printHp()
z1.getAttackTarget().getPosition()
z1.attack()
d1.printHp()















