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 내 뒤를 리는 .
바 및
--NeoCoin
바 및
는 . 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 많 부 변됩
--NeoCoin
1.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()















