쉽게 풀어쓴 C 프로그래밍

Size: px
Start display at page:

Download "쉽게 풀어쓴 C 프로그래밍"

Transcription

1

2 tkinter 는파이썬에서그래픽사용자인터페이스 (GUI: graphical user interface) 를개발할때필요한모듈

3 tkinter 는예전부터유닉스계열에서사용되던 Tcl/Tk 위에객체지향계층을입힌것이다. Tk 는 John Ousterhout 에의하여 Tcl 스크립팅언어를위한 GUI 확장으로개발

4 from tkinter import * window = Tk() label = Label(window, text="hello World!") label.pack() window.mainloop()

5 from tkinter import * window = Tk() b1 = Button(window, text=" 이것이파이썬버튼입니다.") b1.pack() window.mainloop()

6 from tkinter import * window = Tk() b1 = Button(window, text=" 첫번째버튼 ") b2 = Button(window, text=" 두번째버튼 ") b1.pack() b2.pack() window.mainloop()

7 from tkinter import * window = Tk() b1 = Button(window, text=" 첫번째버튼 ") b2 = Button(window, text=" 두번째버튼 ") b1.pack(side=left) b2.pack(side=left) window.mainloop()

8 from tkinter import * window = Tk() b1 = Button(window, text=" 첫번째버튼 ") b2 = Button(window, text=" 두번째버튼 ") b1.pack(side=left,padx=10) b2.pack(side=left,padx=10) window.mainloop()

9 from tkinter import * window = Tk() b1 = Button(window, text=" 첫번째버튼 ") b2 = Button(window, text=" 두번째버튼 ") b1.pack(side=left,padx=10) b2.pack(side=left,padx=10) b1["text"] = "One" b2["text"] = "Two" window.mainloop()

10 tkinter 프로그램은이벤트에기반을두고동작된다.

11 from tkinter import * def callback(): button["text"] =" 버튼이클릭되었음!" window = Tk() button = Button(window, text=" 클릭 ", command=callback) button.pack(side=left) window.mainloop()

12 from tkinter import * window = Tk() label = Label(window, text=" 안녕하세요!") label.pack() button = Button(window, text="tkinter 로버튼을쉽게만들수있습니다.") button.pack() window.mainloop()

13 from tkinter import * class App: def init (self ): window = Tk() hellob = Button(window, text="hello", command=self.hello, fg="red") hellob.pack(side=left) quitb = Button(window, text="quit", command=self.quit) quitb.pack(side=left) window.mainloop() def hello(self): print("hello 버튼이클릭되었음!") def quit(self): print("quit 버튼이클릭되었음!") App()

14 Button Canvas Checkbutton Entry Frame Label Listbox Menu Menubutton Message Radiobutton Scale Scrollbar Text Toplevel LabelFrame PanedWindow Spinbox

15

16 Grid 격자배치관리자 (grid geometry manager) 는테이블형태의배치 Pack 압축배치관리자 (pack geometry manager) 는위젯들을부모위젯안에압축 Place 절대배치관리자 (place geometry manager) 는주어진위치에위젯을배치

17 색상 : 부분의위젯은배경 (bg) 과전경 (fg) 변수를사용하여위젯및텍스트색상을지정 from tkinter import * window = Tk() button = Button(window, text=" 버튼을클릭하세요 ") button.pack() button["fg"] = "yellow" button["bg"] = "green"

18 사용자에게색상을선택하게한다. from tkinter import * color=colorchooser.askcolor() print(color)

19 폰트를튜플로지정할수있는데여기에는 ( 폰트이름, 폰트의크기, 폰트스타일 ) 과같은형식을사용한다. ("Times", 10, "bold") ("Helvetica", 10, "bold italic") ("Symbol", 8) 문자열로도지정 w = Label(master, text="helvetica", font="helvetica 16 )

20 import tkinter as tk import tkinter.font as font class App: def init (self): root=tk.tk() self.customfont = font.font(family="helvetica", size=12) buttonframe = tk.frame() label = tk.label(root, text="hello, World!", font=self.customfont) buttonframe.pack() label.pack() bigger = tk.button(root, text=" 폰트를크게 ", command=self.bigfont) smaller = tk.button(root, text=" 폰트를작게 ", command=self.smallfont) bigger.pack() smaller.pack()

21 root.mainloop() def BigFont(self): size = self.customfont['size'] self.customfont.configure(size=size+2) def SmallFont(self): size = self.customfont['size'] self.customfont.configure(size=size-2) app=app()

22

23 from tkinter import * window = Tk() photo = PhotoImage(file="a1.gif") w = Label(window, image=photo) w.photo = photo w.pack() window.mainloop()

24 from tkinter import * window = Tk() photo = PhotoImage(file="wl.gif") w = Label(window, image=photo).pack(side="right") message= """ 삶이그대를속일지라도슬퍼하거나노하지말라! 우울한날들을견디면 : 믿으라, 기쁨의날이오리니. 마음은미래에사는것현재는슬픈것 : 모든것은순간적인것, 지나가는것이니그리고지나가는것은훗날소중하게되리니. """ w2 = Label(window, justify=left, padx = 10, text=message).pack(side="left") window.mainloop()

25 from tkinter import * window = Tk() Label(window, text="times Font 폰트와빨강색을사용합니다.", fg = "red", font = "Times 32 bold italic").pack() Label(window, text="helvetica 폰트와녹색을사용합니다.", fg = "blue", bg = "yellow", font = "Helvetica 32 bold italic").pack() window.mainloop()

26

27 from tkinter import * window = Tk() Label(window, text=" 이름 ").grid(row=0) Label(window, text=" 나이 ").grid(row=1) e1 = Entry(window) e2 = Entry(window) e1.grid(row=0, column=1) e2.grid(row=1, column=1) window.mainloop( )

28 from tkinter import * def show(): print(" 이름 : %s\n 나이 : %s" % (e1.get(), e2.get())) parent = Tk() Label(parent, text=" 이름 ").grid(row=0) Label(parent, text=" 나이 ").grid(row=1) e1 = Entry(parent) e2 = Entry(parent) e1.grid(row=0, column=1) e2.grid(row=1, column=1) Button(parent, text=' 보이기 ', command=show).grid(row=3, column=1, sticky=w, pady=4) Button(parent, text=' 종료 ', command=parent.quit).grid(row=3, column=0, sticky=w, pady=4) mainloop( )

29 from tkinter import * window = Tk() T = Text(window, height=5, width=60) T.pack() T.insert(END, " 테스트위젯은여러줄의 \n 텍스트를표시할수있습니다.") mainloop()

30 수식을텍스트로입력하면이것을평가하고그결과를출력할수있는간단한계산기를작성하여본다. 수식의형식은파이썬과동일하여야한다. eval() 함수를사용하여사용자가입력한수식을계산할수있다.

31 from tkinter import * from math import * def calculate(event): label.configure(text = " 결과 : " + str(eval(entry.get()))) window = Tk() Label(window, text=" 파이썬수식입력 :").pack() entry = Entry(window) entry.bind("<return>", calculate) entry.pack() label = Label(window, text =" 결과 :") label.pack() w.mainloop()

32 Canvas 위젯을이용하여그래프를그린다거나그래픽에디터를작성할수도있고많은종류의커스텀위젯을작성할수있다.

33 from tkinter import * window = Tk() w = Canvas(window, width=300, height=200) w.pack() w.create_rectangle(50, 25, 200, 100, fill="blue") w.create_line(0, 0, 300, 200) w.create_line(0, 0, 300, 100, fill="red") mainloop()

34 호 (arc) 비트맵 (bitmap, 내장파일이나 XBM 파일형식 ) 이미지 (image, BitmapImage나 PhotoImage 객체 ) 직선 (line) 타원 (oval, 원이나타원 ) 다각형 (polygon) 사각형 (rectangle) 텍스트 (text) 윈도우 (window)

35 윈도우를하나만들고여기에랜덤한크기의사각형을여러개그려보자. 위치도랜덤이어야하고크기, 색상도랜덤으로하여본다.

36 import random from tkinter import * window = Tk() canvas = Canvas(window, width=500, height=400) canvas.pack() color = ["red", "orange", "yellow", "green", "blue", "violet"] def draw_rect(): x = random.randint(0, 500) y = random.randint(0, 400) w = random.randrange(100) h = random.randrange(100) canvas.create_rectangle(x, y, w, h, fill = random.choice(color)) for i in range(10): draw_rect() window.mainloop()

37 from tkinter import * window = Tk() canvas = Canvas(window, width=300, height=200) canvas.pack() canvas.create_oval(10, 10, 200, 150) window.mainloop()

38 from tkinter import * window = Tk() canvas = Canvas(window, width=300, height=200) canvas.pack() canvas.create_arc(10, 10, 200, 150, extent=90, style=arc) window.mainloop()

39 from tkinter import * window = Tk() canvas = Canvas(window, width=300, height=200) canvas.pack() canvas.create_polygon(10, 10, 150, 110, 250, 20, fill="blue") window.mainloop()

40 from tkinter import * window = Tk() canvas = Canvas(window, width=300, height=200) canvas.pack() canvas.create_text(100, 100, text=' 싱스트리트 (Sing Street)') mainloop()

41 from tkinter import * window = Tk() canvas = Canvas(window, width=300, height=200) canvas.pack() img = PhotoImage(file="D:\\starship.png") canvas.create_image(20, 20, anchor=nw, image=img) mainloop()

42 import time from tkinter import * window = Tk() canvas = Canvas(window, width=400, height=300) canvas.pack() id=canvas.create_oval(10, 100, 50, 150, fill="green") for i in range(100): canvas.move(id, 3, 0) window.update() time.sleep(0.05)

43

44 from tkinter import * window = Tk() canvas = Canvas(window, width=400, height=300) canvas.pack() id=canvas.create_oval(10, 100, 50, 150, fill="green") def move_right(event): canvas.move(id, 5, 0) canvas.bind_all('<keypress-right>', move_right)

45 다음과같이마우스를움직여서화면에그림을그리는애플리케이션을작성해보자.

46 from tkinter import * w = 500 h = 300 def drawdot( event ): x1, y1 = ( event.x - 1 ), ( event.y - 1 ) x2, y2 = ( event.x + 1 ), ( event.y + 1 ) canvas.create_oval( x1, y1, x2, y2, fill = "red" ) window = Tk() canvas = Canvas(window, width=w, height=h) canvas.pack(expand = YES, fill = BOTH) canvas.bind( "<B1-Motion>", drawdot ) message = Label( window, text = " 마우스를드래그하면점들이그려집니다." ) message.pack( side = BOTTOM ) window.mainloop()

47 라디오버튼 (radio button) 은체크박스와비슷하지만하나의그룹안에서는한개의버튼만선택할수있다는점이다르다.

48 from tkinter import * window = Tk() choice = IntVar() Label(window, text=" 가장선호하는프로그래밍언어를선택하시오 ", justify = LEFT, padx = 20).pack() Radiobutton(window, text="python", padx = 20, variable=choice, value=1).pack(anchor=w) Radiobutton(window, text="c", padx = 20, variable=choice, value=2).pack(anchor=w) Radiobutton(window, text="java", padx = 20, variable=choice, value=3).pack(anchor=w) Radiobutton(window, text="swift", padx = 20, variable=choice, value=4).pack(anchor=w) window.mainloop()

49 체크박스 (check box) 란사용자가클릭하여서체크된상태와체크되지않은상태중의하나로만들수있는위젯이다.

50 from tkinter import * window = Tk() Label(window, text=" 선호하는언어를모두선택하시오 :").grid(row=0, sticky=w) value1 = IntVar() Checkbutton(window, text="python", variable=value1).grid(row=1, sticky=w) value2 = IntVar() Checkbutton(window, text="c", variable=value2).grid(row=2, sticky=w) value3 = IntVar() Checkbutton(window, text="java", variable=value3).grid(row=3, sticky=w) value4 = IntVar() Checkbutton(window, text="swift", variable=value4).grid(row=4, sticky=w) window.mainloop()

51 from tkinter import * window = Tk() lb = Listbox(window, height=4) lb.pack() lb.insert(end,"python") lb.insert(end,"c") lb.insert(end,"java") lb.insert(end,"swift")

52 배치관리자는컨테이너안에존재하는위젯의크기와위치를자동적으로관리하는객체이다.

53 격자배치관리자 (grid geometry manager) 는위젯 ( 버튼, 레이블등 ) 을테이블형태로배치한다. from tkinter import * window = Tk() b1 = Button(window, text="one") b2 = Button(window, text="two") b1.grid(row=0, column=0) b2.grid(row=1, column=1) window.mainloop()

54 격자배치관리자 (grid geometry manager) 는위젯 ( 버튼, 레이블등 ) 을테이블형태로배치한다. from Tkinter import * window = Tk() Label(window, text=" 박스 #1", bg="red", fg="white").pack() Label(window, text=" 박스 #2", bg="green", fg="black").pack() Label(window, text=" 박스 #3", bg="blue", fg="white").pack() window.mainloop()

55 격자배치관리자 (grid geometry manager) 는위젯 ( 버튼, 레이블등 ) 을테이블형태로배치한다. from tkinter import * window = Tk() w = Label(window, text=" 박스 #1", bg="red", fg="white") w.place(x=0, y=0) w = Label(window, text=" 박스 #2", bg="green", fg="black") w.place(x=20, y=20) w = Label(window, text=" 박스 #3", bg="blue", fg="white") w.place(x=40, y=40) window.mainloop()

56 Tic-Tac-Toe 는 3 3 칸을가지는게임판을만들고, 경기자 2 명이동그라미심볼 (O) 와가위표심볼 (X) 을고른다. 경기자는번갈아가며게임판에동그라미나가위표를놓는다. 가로, 세로, 대각선으로동일한심볼을먼저만들면승리하게된다.

57 from tkinter import * # i 번째버튼을누를수있는지검사한다. 누를수있으면 X 나 O 를표시한다. def checked(i): global player button = list[i] # 리스트에서 I 번째버튼객체를가져온다. # 버튼이초기상태가아니면이미누른버튼이므로아무것도하지않고리턴한다. if button["text"]!= " ": return button["text"] = " " + player+" " button["bg"] = "yellow" if player=="x": player = "O" button["bg"] = "yellow" else : player = "X" button["bg"] = "lightgreen"

58 window = Tk() # 윈도우를생성한다. player="x" # 시작은플레이어 X이다. list = [] # 9개의버튼을생성하여격자형태로윈도우에배치한다. for i in range(9): b = Button(window, text=" ", command=lambda k=i: checked(k)) b.grid(row=i//3, column=i%3) list.append(b) # 버튼객체를리스트에저장한다. window.mainloop()

59 격자배치관리자를사용하여레이블과버튼을배치한다. 색상의개수만큼반복하면서레이블과버튼을생성하고격자형태로배치하면된다.

60 from tkinter import * 약간의 3 차원효과를낸다. window = Tk() colors = ['green', 'red', 'orange','white','yellow','blue'] r = 0 for c in colors: Label(window, text=c, relief=ridge, width=15).grid(row=r, column=0) Button(window, bg=c, width=10).grid(row=r, column=1) r = r + 1 window.mainloop()

61 레이블을사용하여간단한스톱워치를작성하여보자. 시작버튼을누르면시작되고중지버튼을누르면스톱워치가중지된다.

62 import tkinter as tk def starttimer(): if (running): global timer timer += 1 timetext.configure(text=str(timer)) window.after(10, starttimer) def start(): global running running = True def stop(): global running running = False running = False

63 window = tk.tk() timer = 0 timetext = tk.label(window, text="0", font=("helvetica", 80)) timetext.pack() startbutton = tk.button(window, text=' 시작 ', bg="yellow", command=start) startbutton.pack(fill=tk.both) stopbutton = tk.button(window, text=' 중지 ', bg="yellow", command=stop) stopbutton.pack(fill=tk.both) starttimer() window.mainloop()

64 파이썬을이용하여버튼을가지는계산기를작성하여보자. 적절한배치관리자를선택하여사용하라.

65 from tkinter import * def click(key): if key == '=': # = 버튼이면수식을계산하여결과를표시한다. try: result = eval(entry.get()) entry.delete(0, END) entry.insert(end, str(result)) except: entry.insert(end, " 오류!") elif key == 'C': entry.delete(0, END) else: entry.insert(end, key) window = Tk() window.title(" 간단한계산기 ")

66 buttons = [ '7', '8', '9', '+', 'C', '4', '5', '6', '-', ' ', '1', '2', '3', '*', ' ', '0', '.', '=', '/', ' ' ] # 반복문으로버튼을생성한다. i=0 for b in buttons: cmd = lambda x=b: click(x) b = Button(window,text=b,width=5,relief='ridge',command=cmd) b.grid(row=i//5+1,column=i%5) i += 1 # 엔트리위젯은맨윗줄의 5 개의셀에걸쳐서배치된다. entry = Entry(window, width=33, bg="yellow") entry.grid(row=0, column=0, columnspan=5) window.mainloop()

67

68 window = Tk() def callback(event): print(event.x, event.y, " 에서마우스이벤트발생 ") frame = Frame(window, width=100, height=100) frame.bind("<button-1>", callback) frame.pack() window.mainloop() 에서마우스이벤트발생 6 52 에서마우스이벤트발생

69 from tkinter import * window = Tk() def key(event): print ( repr(event.char), " 가눌렸습니다. ") def callback(event): frame.focus_set() print(event.x, event.y, " 에서마우스이벤트발생 ") frame = Frame(window, width=100, height=100) frame.bind("<key>", key) frame.bind("<button-1>", callback) frame.pack() window.mainloop() 에서마우스이벤트발생 'k' 가눌렸습니다.

70 <Button-1> <B1-Motion> <ButtonRelease-1> <Double-Button-1> <Enter> <Leave> <FocusIn> <FocusOut> <Return> <Key> a <Shift-Up> <Configure>

71 from tkinter import * def sleft(event): print(" 단일클릭, 왼쪽버튼 ") def dleft(event): print(" 더블클릭, 왼쪽버튼 ") widget = Button(None, text=' 마우스클릭 ') widget.pack() widget.bind('<button-1>', sleft) widget.bind('<double-1>', dleft) widget.mainloop() 단일클릭, 왼쪽버튼단일클릭, 왼쪽버튼더블클릭, 왼쪽버튼

72 from tkinter import * def motion(event): print(" 마우스위치 : (%s %s)" % (event.x, event.y)) return window = Tk() message = """ 당신스스로가하지않으면아무도당신의운명을개선시켜주지않을것이다. """ msg = Message(window, text = message) msg.config(bg='yellow',fg='blue', font="times 20 italic") msg.bind('<motion>',motion) msg.pack() window.mainloop() 마우스위치 : (274 45) 마우스위치 : (271 55) 마우스위치 : (270 69)

73 사용자가컴퓨터가생성한숫자 (1 부터 100 사이의난수 ) 를알아맞히는게임을그래픽사용자인터페이스를사용하여제작해보자.

74 from tkinter import * import random answer = random.randint(1,100) def guessing(): guess = int(guessfield.get()) if guess > answer: msg = " 높음!" elif guess < answer: msg = " 낮음!" else: msg = " 정답!" resultlabel["text"] = msg guessfield.delete(0, 5)

75 def reset(): global answer answer = random.randint(1,100) resultlabel["text"] = " 다시한번하세요!" window = Tk() window.configure(bg="white") window.title(" 숫자를맞춰보세요!") window.geometry("500x80") titlelabel = Label(window, text=" 숫자게임에오신것을환영합니다!", bg="white") titlelabel.pack()

76 guessfield = Entry(window) guessfield.pack(side="left") trybutton = Button(window, text=" 시도 ", fg="green", bg="white", command=guessing ) trybutton.pack(side="left") resetbutton = Button(window, text=" 초기화 ", fg="red", bg="white", command=reset) resetbutton.pack(side="left") resultlabel = Label(window, text="1 부터 100 사이의숫자를입력하시오.", bg="white") resultlabel.pack(side="left") window.mainloop()

77 tkinter 에서는먼저루프윈도우를생성하고레이블이나버튼을생성할때첫번째인수로윈도우를넘기면된다. 파이썬은 3 종류의배치관리자를제공한다. 압축 (pack) 배치관리자, 격자 (grid) 배치관리자. 절대 (place) 배치관리자가바로그것이다. 위젯에이벤트를처리하는함수를연결하려면 bind() 메소드를사용한다. 예를들면 widget.bind('<button-1>', sleft) 와같이하면된다.

78

PowerPoint Template

PowerPoint Template Turtle Graphics Python for Computational Thinking Variable, Calculation, Selection & Loop [GUI 프로그래밍 ] 을 이용한 컴퓨팅사고력 File I/O, Recursion, Sort & Search Class, Object & GUI Programming Function & Data Type

More information

tkinter를 이용한 계산기 구현

tkinter를 이용한 계산기 구현 tkinter 를이용한계산기구현 박창이 서울시립대학교통계학과 박창이 ( 서울시립대학교통계학과 ) tkinter 를이용한계산기구현 1 / 26 학습내용 그림판계산기설계연산가능한계산기 To do 박창이 ( 서울시립대학교통계학과 ) tkinter 를이용한계산기구현 2 / 26 그림판 I 크기 600 400 인캔버스에서화살표를이용하여녹색선으로스케치하며 u 키로화면지움

More information

PowerPoint Template

PowerPoint Template JavaScript 회원정보 입력양식만들기 HTML & JavaScript Contents 1. Form 객체 2. 일반적인입력양식 3. 선택입력양식 4. 회원정보입력양식만들기 2 Form 객체 Form 객체 입력양식의틀이되는 태그에접근할수있도록지원 Document 객체의하위에위치 속성들은모두 태그의속성들의정보에관련된것

More information

Visual Basic 반복문

Visual Basic 반복문 학습목표 반복문 For Next문, For Each Next문 Do Loop문, While End While문 구구단작성기로익히는반복문 2 5.1 반복문 5.2 구구단작성기로익히는반복문 3 반복문 주어진조건이만족하는동안또는주어진조건이만족할때까지일정구간의실행문을반복하기위해사용 For Next For Each Next Do Loop While Wend 4 For

More information

PowerPoint Presentation

PowerPoint Presentation 객체지향프로그래밍 인터페이스, 람다식, 패키지 ( 실습 ) 손시운 ssw5176@kangwon.ac.kr 예제 1. 홈네트워킹 public interface RemoteControl { public void turnon(); // 가전제품을켠다. public void turnoff(); // 가전제품을끈다. 인터페이스를구현 public class Television

More information

제이쿼리 (JQuery) 정의 자바스크립트함수를쉽게사용하기위해만든자바스크립트라이브러리. 웹페이지를즉석에서변경하는기능에특화된자바스크립트라이브러리. 사용법 $( 제이쿼리객체 ) 혹은 $( 엘리먼트 ) 참고 ) $() 이기호를제이쿼리래퍼라고한다. 즉, 제이쿼리를호출하는기호

제이쿼리 (JQuery) 정의 자바스크립트함수를쉽게사용하기위해만든자바스크립트라이브러리. 웹페이지를즉석에서변경하는기능에특화된자바스크립트라이브러리. 사용법 $( 제이쿼리객체 ) 혹은 $( 엘리먼트 ) 참고 ) $() 이기호를제이쿼리래퍼라고한다. 즉, 제이쿼리를호출하는기호 제이쿼리 () 정의 자바스크립트함수를쉽게사용하기위해만든자바스크립트라이브러리. 웹페이지를즉석에서변경하는기능에특화된자바스크립트라이브러리. 사용법 $( 제이쿼리객체 ) 혹은 $( 엘리먼트 ) 참고 ) $() 이기호를제이쿼리래퍼라고한다. 즉, 제이쿼리를호출하는기호 CSS와마찬가지로, 문서에존재하는여러엘리먼트를접근할수있다. 엘리먼트접근방법 $( 엘리먼트 ) : 일반적인접근방법

More information

쉽게 풀어쓴 C 프로그래밍

쉽게 풀어쓴 C 프로그래밍 제 5 장생성자와접근제어 1. 객체지향기법을이해한다. 2. 클래스를작성할수있다. 3. 클래스에서객체를생성할수있다. 4. 생성자를이용하여객체를초기화할수 있다. 5. 접근자와설정자를사용할수있다. 이번장에서만들어볼프로그램 생성자 생성자 (constructor) 는초기화를담당하는함수 생성자가필요한이유 #include using namespace

More information

쉽게 풀어쓴 C 프로그래밍

쉽게 풀어쓴 C 프로그래밍 CHAPTER 11. 자바스크립트와캔버스로게임 만들기 캔버스 캔버스는 요소로생성 캔버스는 HTML 페이지상에서사각형태의영역 실제그림은자바스크립트를통하여코드로그려야한다. 컨텍스트객체 컨텍스트 (context) 객체 : 자바스크립트에서물감과붓의역할을한다. var canvas = document.getelementbyid("mycanvas"); var

More information

PowerPoint Presentation

PowerPoint Presentation 객체지향프로그래밍 클래스, 객체, 메소드 ( 실습 ) 손시운 ssw5176@kangwon.ac.kr 예제 1. 필드만있는클래스 텔레비젼 2 예제 1. 필드만있는클래스 3 예제 2. 여러개의객체생성하기 4 5 예제 3. 메소드가추가된클래스 public class Television { int channel; // 채널번호 int volume; // 볼륨 boolean

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 파이썬을이용한빅데이터수집. 분석과시각화 Part 2. 데이터시각화 이원하 목 차 1 2 3 4 WordCloud 자연어처리 Matplotlib 그래프 Folium 지도시각화 Seabean - Heatmap 03 07 16 21 1 WORDCLOUD - 자연어처리 KoNLPy 형태소기반자연어처리 http://www.oracle.com/technetwork/java/javase/downloads/index.html

More information

제8장 자바 GUI 프로그래밍 II

제8장 자바 GUI 프로그래밍 II 제8장 MVC Model 8.1 MVC 모델 (1/7) MVC (Model, View, Controller) 모델 스윙은 MVC 모델에기초를두고있다. MVC란 Xerox의연구소에서 Smalltalk 언어를바탕으로사용자인터페이스를개발하기위한방법 MVC는 3개의구성요소로구성 Model : 응용프로그램의자료를표현하기위한모델 View : 자료를시각적으로 (GUI 방식으로

More information

17장 클래스와 메소드

17장 클래스와 메소드 17 장클래스와메소드 박창이 서울시립대학교통계학과 박창이 ( 서울시립대학교통계학과 ) 17 장클래스와메소드 1 / 18 학습내용 객체지향특징들객체출력 init 메소드 str 메소드연산자재정의타입기반의버전다형성 (polymorphism) 박창이 ( 서울시립대학교통계학과 ) 17 장클래스와메소드 2 / 18 객체지향특징들 객체지향프로그래밍의특징 프로그램은객체와함수정의로구성되며대부분의계산은객체에대한연산으로표현됨객체의정의는

More information

Microsoft PowerPoint PythonGUI-sprite

Microsoft PowerPoint PythonGUI-sprite (Sprite) 순천향대학교컴퓨터공학과 이상정 순천향대학교컴퓨터공학과 1 학습내용 소개 클래스 그룹클래스 충돌 블록수집게임예 게임레벨증가및점수표시 이동 순천향대학교컴퓨터공학과 2 소개 (sprite) 큰그래픽장면의부분으로사용되는단일 2차원이미지 => 쪽화면 게임의장면에서서로상호작용 ( 충돌등 ) 하는물체 => 캐릭터, 아바타 파이게임에서는일반적으로클래스로구현된객체

More information

PowerPoint Presentation

PowerPoint Presentation 객체지향프로그래밍 그래픽사용자인터페이스 ( 실습 ) 손시운 ssw5176@kangwon.ac.kr 예제 1. 프레임생성 (1) import javax.swing.*; public class FrameTest { public static void main(string[] args) { JFrame f = new JFrame("Frame Test"); JFrame

More information

윈도우즈프로그래밍(1)

윈도우즈프로그래밍(1) 제어문 (2) For~Next 문 윈도우즈프로그래밍 (1) ( 신흥대학교컴퓨터정보계열 ) 2/17 Contents 학습목표 프로그램에서주어진특정문장을부분을일정횟수만큼반복해서실행하는문장으로 For~Next 문등의구조를이해하고활용할수있다. 내용 For~Next 문 다중 For 문 3/17 제어문 - FOR 문 반복문 : 프로그램에서주어진특정문장들을일정한횟수만큼반복해서실행하는문장

More information

Javascript

Javascript 1. 이벤트와이벤트핸들러의이해 이벤트 (Event) 는웹브라우저에서발생하는다양한사건을말합니다. 예를들면, 버튼을마우스로을했다거나브라우저를닫았다거나 Enter 키를눌렀다거나등등아주다양한사건들이있습니다. 그렇다면이벤트핸들러 (Event Handler) 는무엇일까요? 이다양한이벤트들을핸들링 ( 처리 ) 해주는것입니다. 예를들면, 어떤버튼을했을때메시지창이뜨게하는등을말합니다.

More information

Week3

Week3 2015 Week 03 / _ Assignment 1 Flow Assignment 1 Hello Processing 1. Hello,,,, 2. Shape rect() ellipse() 3. Color stroke() fill() color selector background() 4 Hello Processing 4. Interaction setup() draw()

More information

쉽게 풀어쓴 C 프로그래밍

쉽게 풀어쓴 C 프로그래밍 CHAPTER 13. HTML5 위치정보와드래그앤드롭 SVG SVG(Scalable Vector Graphics) 는 XML- 기반의벡터이미지포맷 웹에서벡터 - 기반의그래픽을정의하는데사용 1999 년부터 W3C 에의하여표준 SVG 의장점 SVG 그래픽은확대되거나크기가변경되어도품질이손상되지않는다. SVG 파일에서모든요소와속성은애니메이션이가능하다. SVG 이미지는어떤텍스트에디터로도생성하고편집할수있다.

More information

JAVA 프로그래밍실습 실습 1) 실습목표 - 메소드개념이해하기 - 매개변수이해하기 - 새메소드만들기 - Math 클래스의기존메소드이용하기 ( ) 문제 - 직사각형모양의땅이있다. 이땅의둘레, 면적과대각

JAVA 프로그래밍실습 실습 1) 실습목표 - 메소드개념이해하기 - 매개변수이해하기 - 새메소드만들기 - Math 클래스의기존메소드이용하기 (   ) 문제 - 직사각형모양의땅이있다. 이땅의둘레, 면적과대각 JAVA 프로그래밍실습 실습 1) 실습목표 - 메소드개념이해하기 - 매개변수이해하기 - 새메소드만들기 - Math 클래스의기존메소드이용하기 ( http://java.sun.com/javase/6/docs/api ) 문제 - 직사각형모양의땅이있다. 이땅의둘레, 면적과대각선의길이를계산하는메소드들을작성하라. 직사각형의가로와세로의길이는주어진다. 대각선의길이는 Math클래스의적절한메소드를이용하여구하라.

More information

var answer = confirm(" 확인이나취소를누르세요."); // 확인창은사용자의의사를묻는데사용합니다. if(answer == true){ document.write(" 확인을눌렀습니다."); else { document.write(" 취소를눌렀습니다.");

var answer = confirm( 확인이나취소를누르세요.); // 확인창은사용자의의사를묻는데사용합니다. if(answer == true){ document.write( 확인을눌렀습니다.); else { document.write( 취소를눌렀습니다.); 자바스크립트 (JavaScript) - HTML 은사용자에게인터페이스 (interface) 를제공하는언어 - 자바스크립트는서버로데이터를전송하지않고서할수있는데이터처리를수행한다. - 자바스크립트는 HTML 나 JSP 에서작성할수있고 ( 내부스크립트 ), 별도의파일로도작성이가능하다 ( 외 부스크립트 ). - 내부스크립트 - 외부스크립트

More information

[ 그림 8-1] XML 을이용한옵션메뉴설정방법 <menu> <item 항목ID" android:title=" 항목제목 "/> </menu> public boolean oncreateoptionsmenu(menu menu) { getme

[ 그림 8-1] XML 을이용한옵션메뉴설정방법 <menu> <item 항목ID android:title= 항목제목 /> </menu> public boolean oncreateoptionsmenu(menu menu) { getme 8 차시메뉴와대화상자 1 학습목표 안드로이드에서메뉴를작성하고사용하는방법을배운다. 안드로이드에서대화상자를만들고사용하는방법을배운다. 2 확인해볼까? 3 메뉴 1) 학습하기 [ 그림 8-1] XML 을이용한옵션메뉴설정방법 public boolean

More information

Microsoft PowerPoint - ÀÚ¹Ù08Àå-1.ppt

Microsoft PowerPoint - ÀÚ¹Ù08Àå-1.ppt AWT 컴포넌트 (1) 1. AWT 패키지 2. AWT 프로그램과이벤트 3. Component 클래스 4. 컴포넌트색칠하기 AWT GUI 를만들기위한 API 윈도우프로그래밍을위한클래스와도구를포함 Graphical User Interface 그래픽요소를통해프로그램과대화하는방식 그래픽요소를 GUI 컴포넌트라함 윈도우프로그램만들기 간단한 AWT 프로그램 import

More information

PowerPoint Presentation

PowerPoint Presentation Package Class 3 Heeseung Jo 목차 section 1 패키지개요와패키지의사용 section 2 java.lang 패키지의개요 section 3 Object 클래스 section 4 포장 (Wrapper) 클래스 section 5 문자열의개요 section 6 String 클래스 section 7 StringBuffer 클래스 section

More information

Orcad Capture 9.x

Orcad Capture 9.x OrCAD Capture Workbook (Ver 10.xx) 0 Capture 1 2 3 Capture for window 4.opj ( OrCAD Project file) Design file Programe link file..dsn (OrCAD Design file) Design file..olb (OrCAD Library file) file..upd

More information

데이터 시각화

데이터 시각화 데이터시각화 박창이 서울시립대학교통계학과 박창이 ( 서울시립대학교통계학과 ) 데이터시각화 1 / 22 학습내용 matplotlib 막대그래프히스토그램선그래프산점도참고 박창이 ( 서울시립대학교통계학과 ) 데이터시각화 2 / 22 matplotlib I 간단한막대그래프, 선그래프, 산점도등을그릴때유용 http://matplotlib.org 에서설치방법참고윈도우의경우명령프롬프트를관리자권한으로실행한후아래의코드실행

More information

<4D F736F F F696E74202D20C1A63233C0E520B1D7B7A1C7C820C7C1B7CEB1D7B7A1B9D628B0ADC0C729205BC8A3C8AF20B8F0B5E55D>

<4D F736F F F696E74202D20C1A63233C0E520B1D7B7A1C7C820C7C1B7CEB1D7B7A1B9D628B0ADC0C729205BC8A3C8AF20B8F0B5E55D> Power Java 제 23 장그래픽프로그래밍 이번장에서학습할내용 자바에서의그래픽 기초사항 기초도형그리기 색상 폰트 Java 2D Java 2D를이용한그리기 Java 2D 를이용한채우기 도형회전과평행이동 자바를이용하여서화면에그림을그려봅시다. 자바그래픽데모 자바그래픽의두가지방법 자바그래픽 AWT Java 2D AWT를사용하면기본적인도형들을쉽게그릴수있다. 어디서나잘실행된다.

More information

Microsoft PowerPoint - Java7.pptx

Microsoft PowerPoint - Java7.pptx HPC & OT Lab. 1 HPC & OT Lab. 2 실습 7 주차 Jin-Ho, Jang M.S. Hanyang Univ. HPC&OT Lab. jinhoyo@nate.com HPC & OT Lab. 3 Component Structure 객체 (object) 생성개념을이해한다. 외부클래스에대한접근방법을이해한다. 접근제어자 (public & private)

More information

4. #include <stdio.h> #include <stdlib.h> int main() { functiona(); } void functiona() { printf("hihi\n"); } warning: conflicting types for functiona

4. #include <stdio.h> #include <stdlib.h> int main() { functiona(); } void functiona() { printf(hihi\n); } warning: conflicting types for functiona 이름 : 학번 : A. True or False: 각각항목마다 True 인지 False 인지적으세요. 1. (Python:) randint 함수를사용하려면, random 모듈을 import 해야한다. 2. (Python:) '' (single quote) 는한글자를표현할때, (double quote) 는문자열을표현할때사용한다. B. 다음에러를수정하는방법을적으세요.

More information

슬라이드 1

슬라이드 1 핚국산업기술대학교 제 14 강 GUI (III) 이대현교수 학습안내 학습목표 CEGUI 라이브러리를이용하여, 게임메뉴 UI 를구현해본다. 학습내용 CEGUI 레이아웃의로딩및렌더링. OIS 와 CEGUI 의연결. CEGUI 위젯과이벤트의연동. UI 구현 : 하드코딩방식 C++ 코드를이용하여, 코드내에서직접위젯들을생성및설정 CEGUI::PushButton* resumebutton

More information

쉽게 풀어쓴 C 프로그래밍

쉽게 풀어쓴 C 프로그래밍 객체지향프로그래밍 (OOP: object-oriented programming) 은우리가살고있는실제세계가객체 (object) 들로구성되어있는것과비슷하게, 소프트웨어도객체로구성하는방법이다. 객체는상태와동작을가지고있다. 객체의상태 (state) 는객체의속성이다. 객체의동작 (behavior) 은객체가취할수있는동작 ( 기능 ) 이다. 객체에대한설계도를클래스 (class)

More information

Microsoft PowerPoint - 6-PythonGUI-sprite

Microsoft PowerPoint - 6-PythonGUI-sprite (Computer Science with Python and Pygame, Ch.14 introduction to Sprites) 순천향대학교컴퓨터공학과이상정 순천향대학교컴퓨터공학과 1 학습내용 스프라이트클래스 그룹클래스 스프라이트충돌 블록수집게임예 게임레벨증가및점수표시 스프라이트이동 순천향대학교컴퓨터공학과 2 (1) 스프라이트 (sprite) 큰그래픽장면의부분으로사용되는단일

More information

Lab10

Lab10 Lab 10: Map Visualization 2015 Fall human-computer interaction + design lab. Joonhwan Lee Map Visualization Shape Shape (.shp): ESRI shp http://sgis.kostat.go.kr/html/index.html 3 d3.js SVG, GeoJSON, TopoJSON

More information

9장.key

9장.key JAVA Programming 1 GUI(Graphical User Interface) 2 GUI!,! GUI! GUI, GUI GUI! GUI AWT Swing AWT - java.awt Swing - javax.swing AWT Swing 3 AWT(Abstract Windowing Toolkit)! GUI! java.awt! AWT (Heavy weight

More information

Microsoft PowerPoint - 06-Chapter09-Event.ppt

Microsoft PowerPoint - 06-Chapter09-Event.ppt AWT 이벤트처리하기 1. 이벤트처리방식 2. 이벤트클래스와리스너 3. 이벤트어댑터 4. 이벤트의종류 이벤트 (Event) 이벤트 사용자가 UI 컴포넌트에대해취하는행위로인한사건이벤트기반프로그래밍 무한루프를돌면서사용자의행위로인한이벤트를청취하여응답하는형태로작동하는프로그래밍 java.awt.event 이벤트처리 AWT 컴포넌트에서발생하는다양한이벤트를처리하기위한인터페이스와클래스제공

More information

Microsoft Word - src.doc

Microsoft Word - src.doc IPTV 서비스탐색및콘텐츠가이드 RI 시스템운용매뉴얼 목차 1. 서버설정방법... 5 1.1. 서비스탐색서버설정... 5 1.2. 컨텐츠가이드서버설정... 6 2. 서버운용방법... 7 2.1. 서비스탐색서버운용... 7 2.1.1. 서비스가이드서버실행... 7 2.1.2. 서비스가이드정보확인... 8 2.1.3. 서비스가이드정보추가... 9 2.1.4. 서비스가이드정보삭제...

More information

Microsoft PowerPoint - 04windows.ppt

Microsoft PowerPoint - 04windows.ppt Game Programming I Windows 프로그래밍 (1) March 27, 2006 목표 윈도우프로그래밍에서이용되는이벤트구동프로그래밍모델의이해 Direct3D 를이용하는윈도우어플리케이션의작성을위한최소한의코드이해 윈도우 (Win32) 어플리케이션 Direct3D API ( 어플리케이션프로그래밍인터페이스 ) 를이용하기위해필요 Win32 API 를이용해작성

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 실습 1 배효철 th1g@nate.com 1 목차 조건문 반복문 System.out 구구단 모양만들기 Up & Down 2 조건문 조건문의종류 If, switch If 문 조건식결과따라중괄호 { 블록을실행할지여부결정할때사용 조건식 true 또는 false값을산출할수있는연산식 boolean 변수 조건식이 true이면블록실행하고 false 이면블록실행하지않음 3

More information

4S 1차년도 평가 발표자료

4S 1차년도 평가 발표자료 모바일 S/W 프로그래밍 안드로이드개발환경설치 2012.09.05. 오병우 모바일공학과 JDK (Java Development Kit) SE (Standard Edition) 설치순서 Eclipse ADT (Android Development Tool) Plug-in Android SDK (Software Development Kit) SDK Components

More information

<4D F736F F F696E74202D20C1A63139C0E520B9E8C4A120B0FCB8AEC0DA28B0ADC0C729205BC8A3C8AF20B8F0B5E55D>

<4D F736F F F696E74202D20C1A63139C0E520B9E8C4A120B0FCB8AEC0DA28B0ADC0C729205BC8A3C8AF20B8F0B5E55D> Power Java 제 19 장배치관리자 이번장에서학습할내용 배치관리자의개요 배치관리자의사용 FlowLayout BorderLayout GridLayout BoxLayout CardLayout 절대위치로배치 컨테이너안에서컴포넌트를배치하는방법에대하여살펴봅시다. 배치관리자 (layout manager) 컨테이너안의각컴포넌트의위치와크기를결정하는작업 [3/70] 상당히다르게보인다.

More information

어댑터뷰

어댑터뷰 04 커스텀어댑터뷰 (Custom Adapter View) 커스텀어댑터뷰 (Custom Adapter View) 커스텀어댑터뷰 (Custom Adatper View) 란? u 어댑터뷰의항목하나는단순한문자열이나이미지뿐만아니라, 임의의뷰가될수 있음 이미지뷰 u 커스텀어댑터뷰설정절차 1 2 항목을위한 XML 레이아웃정의 어댑터정의 3 어댑터를생성하고어댑터뷰객체에연결

More information

쉽게 풀어쓴 C 프로그래밍

쉽게 풀어쓴 C 프로그래밍 두근두근 파이썬수업 4 장자료의종류에는어떤것들이있나요? 이번장에서만들프로그램 (1) 터틀그래픽의거북이와인사하는프로그램을작성해보자. Run Python (2) 여러개의색상을리스트에저장하였다가하나씩꺼내서원들을그려보자 Run Python 파이썬에서사용할수있는자료의종류 파이썬과자료형 변수에어떤종류의자료도저장할수있다 x = 10 print("x =", x) x = 3.14

More information

untitled

untitled A Leader of Enterprise e-business Solution FORCS Co., LTD 1 OZ Application Getting Started 2 FORCS Co., LTD A Leader of Enterprise e-business Solution FORCS Co., LTD 3 OZ Application Getting Started 'OZ

More information

이장에서다룰내용 테두리를제어하는스타일시트 외부여백 (Margin) 과내부여백 (Padding) 관련속성 위치관련속성 2

이장에서다룰내용 테두리를제어하는스타일시트 외부여백 (Margin) 과내부여백 (Padding) 관련속성 위치관련속성 2 03 장. 테두리여백지정하는속성 이번장에서는테이블, 레이어, 폼양식등의더예쁘게꾸미기위해서 CSS 를이용하여 HTML 요소의테두리속성을바꾸어보자. 이장에서다룰내용 1 2 3 테두리를제어하는스타일시트 외부여백 (Margin) 과내부여백 (Padding) 관련속성 위치관련속성 2 01. 테두리를제어하는스타일시트 속성값설명 border-width border-left-width

More information

iii. Design Tab 을 Click 하여 WindowBuilder 가자동으로생성한 GUI 프로그래밍환경을확인한다.

iii. Design Tab 을 Click 하여 WindowBuilder 가자동으로생성한 GUI 프로그래밍환경을확인한다. Eclipse 개발환경에서 WindowBuilder 를이용한 Java 프로그램개발 이예는 Java 프로그램의기초를이해하고있는사람을대상으로 Embedded Microcomputer 를이용한제어시스템을 PC 에서 Serial 통신으로제어 (Graphical User Interface (GUI) 환경에서 ) 하는프로그램개발예를설명한다. WindowBuilder:

More information

Structure and Interpretation of Computer Programs: Assignment 3 Seung-Hoon Na October 4, George (아래 3개의 문제에 대한 구현이 모두 포함된 george.rkt파일을 제출하시오.

Structure and Interpretation of Computer Programs: Assignment 3 Seung-Hoon Na October 4, George (아래 3개의 문제에 대한 구현이 모두 포함된 george.rkt파일을 제출하시오. Structure and Interpretation of Computer Programs: Assignment 3 Seung-Hoon Na October 4, 2018 1 George (아래 3개의 문제에 대한 구현이 모두 포함된 george.rkt파일을 제출하시오. 실행후 Problem 1.3에 대한 Display결과가 나와야 함) George 그림은 다음과

More information

PowerSHAPE 따라하기 Calculate 버튼을 클릭한다. Close 버튼을 눌러 미러 릴리프 페이지를 닫는다. D 화면을 보기 위하여 F 키를 누른다. - 모델이 다음과 같이 보이게 될 것이다. 열매 만들기 Shape Editor를 이용하여 열매를 만들어 보도록

PowerSHAPE 따라하기 Calculate 버튼을 클릭한다. Close 버튼을 눌러 미러 릴리프 페이지를 닫는다. D 화면을 보기 위하여 F 키를 누른다. - 모델이 다음과 같이 보이게 될 것이다. 열매 만들기 Shape Editor를 이용하여 열매를 만들어 보도록 PowerSHAPE 따라하기 가구 장식 만들기 이번 호에서는 ArtCAM V를 이용하여 가구 장식물에 대해서 D 조각 파트를 생성해 보도록 하겠다. 중심 잎 만들기 투 레일 스윕 기능을 이용하여 개의 잎을 만들어보도록 하겠다. 미리 준비된 Wood Decoration.art 파일을 불러온다. Main Leaves 벡터 레이어를 on 시킨다. 릴리프 탭에 있는

More information

확률 및 분포

확률 및 분포 확률및분포 박창이 서울시립대학교통계학과 박창이 ( 서울시립대학교통계학과 ) 확률및분포 1 / 15 학습내용 조건부확률막대그래프히스토그램선그래프산점도참고 박창이 ( 서울시립대학교통계학과 ) 확률및분포 2 / 15 조건부확률 I 첫째가딸일때두아이모두딸일확률 (1/2) 과둘중의하나가딸일때둘다딸일확률 (1/3) 에대한모의실험 >>> from collections import

More information

1

1 1 2 3 4 5 6 b b t P A S M T U s 7 m P P 8 t P A S M T U s 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 Chapter 1 29 1 2 3 4 18 17 16 15 5 6 7 8 9 14 13 12 11 10 1 2 3 4 5 9 10 11 12 13 14 15

More information

Microsoft Word - ntasFrameBuilderInstallGuide2.5.doc

Microsoft Word - ntasFrameBuilderInstallGuide2.5.doc NTAS and FRAME BUILDER Install Guide NTAS and FRAME BUILDER Version 2.5 Copyright 2003 Ari System, Inc. All Rights reserved. NTAS and FRAME BUILDER are trademarks or registered trademarks of Ari System,

More information

UI TASK & KEY EVENT

UI TASK & KEY EVENT 2007. 2. 5 PLATFORM TEAM 정용학 차례 CONTAINER & WIDGET SPECIAL WIDGET 질의응답및토의 2 Container LCD에보여지는화면한개 1개이상의 Widget을가짐 3 Container 초기화과정 ui_init UMP_F_CONTAINERMGR_Initialize UMP_H_CONTAINERMGR_Initialize

More information

쉽게 풀어쓴 C 프로그래밍

쉽게 풀어쓴 C 프로그래밍 제 11 장상속 1. 상속의개념을이해한다. 2. 상속을이용하여자식클래스를작성할수있다. 3. 상속과접근지정자와의관계를이해한다. 4. 상속시생성자와소멸자가호출되는순서를이해한다. 이번장에서만들어볼프로그램 class Circle { int x, y; int radius;... class Rect { int x, y; int width, height;... 중복 상속의개요

More information

Microsoft PowerPoint - HS6000 Full HD Subtitle Generator Module Presentation

Microsoft PowerPoint - HS6000 Full HD Subtitle Generator Module Presentation HS6000 Full HD Subtitle Generator Module High-performance Network DVR Solution Preliminary Product Overview (Without notice, following described technical spec. can be changed) AddPac Technology 2010,

More information

Microsoft PowerPoint - chap02-C프로그램시작하기.pptx

Microsoft PowerPoint - chap02-C프로그램시작하기.pptx #include int main(void) { int num; printf( Please enter an integer "); scanf("%d", &num); if ( num < 0 ) printf("is negative.\n"); printf("num = %d\n", num); return 0; } 1 학습목표 을 작성하면서 C 프로그램의

More information

쉽게 풀어쓴 C 프로그래밍

쉽게 풀어쓴 C 프로그래밍 리스트 (list) 는여러개의데이터가저장되어있는장소이다. scores = [ 32, 56, 64, 72, 12, 37, 98, 77, 59, 69] scores = [ ] for i in range(10): scores.append(int(input(" 성적을입력하시오 :"))) print(scores) scores = [ 32, 56, 64, 72, 12,

More information

BY-FDP-4-70.hwp

BY-FDP-4-70.hwp RS-232, RS485 FND Display Module BY-FDP-4-70-XX (Rev 1.0) - 1 - 1. 개요. 본 Display Module은 RS-232, RS-485 겸용입니다. Power : DC24V, DC12V( 주문사양). Max Current : 0.6A 숫자크기 : 58mm(FND Size : 70x47mm 4 개) RS-232,

More information

학습목표 함수프로시저, 서브프로시저의의미를안다. 매개변수전달방식을학습한다. 함수를이용한프로그래밍한다. 2

학습목표 함수프로시저, 서브프로시저의의미를안다. 매개변수전달방식을학습한다. 함수를이용한프로그래밍한다. 2 학습목표 함수프로시저, 서브프로시저의의미를안다. 매개변수전달방식을학습한다. 함수를이용한프로그래밍한다. 2 6.1 함수프로시저 6.2 서브프로시저 6.3 매개변수의전달방식 6.4 함수를이용한프로그래밍 3 프로시저 (Procedure) 프로시저 (Procedure) 란무엇인가? 논리적으로묶여있는하나의처리단위 내장프로시저 이벤트프로시저, 속성프로시저, 메서드, 비주얼베이직내장함수등

More information

리니어레이아웃 - 2 -

리니어레이아웃 - 2 - 4 차시레이아웃 1 학습목표 레이아웃의개념을이해한다. 중복리니어레이아웃의개념이해한다. 2 확인해볼까? 3 레이아웃개념익히기 1) 학습하기 [ 그림 4-1] ViewGroup 클래스계층도 리니어레이아웃 - 2 - [ 예제 4-1]orientation 속성-horizontal 1

More information

<4D F736F F F696E74202D20C1A63236C0E520BED6C7C3B8B428B0ADC0C729205BC8A3C8AF20B8F0B5E55D>

<4D F736F F F696E74202D20C1A63236C0E520BED6C7C3B8B428B0ADC0C729205BC8A3C8AF20B8F0B5E55D> Power Java 제 26 장애플릿 이번장에서학습할내용 애플릿소개 애플릿작성및소개 애플릿의생명주기 애플릿에서의그래픽컴포넌트의소개 Applet API의이용 웹브라우저상에서실행되는작은프로그램인애플릿에대하여학습합니다. 애플릿이란? 애플릿은웹페이지같은 HTML 문서안에내장되어실행되는자바프로그램이다. 애플릿을실행시키는두가지방법 1. 웹브라우저를이용하는방법 2. Appletviewer를이용하는방법

More information

untitled

untitled A Leader of Enterprise e-business Solution FORCS Co., LTD 1 OZ Application Designer Getting Started 2 FORCS Co., LTD A Leader of Enterprise e-business Solution FORCS Co., LTD 3 OZ Application Designer

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 Python TA Session turtle, tkinter 21300008 강민수 Indexes [ Introduction 0 1 ] [ ] to turtle 0 2 Practice: Turtle [ Introduction 0 3 ] [ ] to tkinter 0 4 Practice: tkinter I. Introduction to turtle What is

More information

8장 문자열

8장 문자열 8 장문자열 박창이 서울시립대학교통계학과 박창이 ( 서울시립대학교통계학과 ) 8 장문자열 1 / 24 학습내용 문자열 (string) 훑기 (traversal) 부분추출 (slicing) print 함수불변성 (immutablity) 검색 (search) 세기 (count) Method in 연산자비교 박창이 ( 서울시립대학교통계학과 ) 8 장문자열 2 /

More information

untitled

untitled A Leader of Enterprise e-business Solution FORCS Co., LTD 1 OZ Application Designer Getting Started 2 FORCS Co., LTD A Leader of Enterprise e-business Solution FORCS Co., LTD 3 OZ Application Designer

More information

지도상 유의점 m 학생들이 어려워하는 낱말이 있으므로 자세히 설명해주도록 한다. m 버튼을 무리하게 조작하면 고장이 날 위험이 있으므로 수업 시작 부분에서 주의를 준다. m 활동지를 보고 어려워하는 학생에게는 영상자료를 접속하도록 안내한다. 평가 평가 유형 자기 평가

지도상 유의점 m 학생들이 어려워하는 낱말이 있으므로 자세히 설명해주도록 한다. m 버튼을 무리하게 조작하면 고장이 날 위험이 있으므로 수업 시작 부분에서 주의를 준다. m 활동지를 보고 어려워하는 학생에게는 영상자료를 접속하도록 안내한다. 평가 평가 유형 자기 평가 수업주제 경찰 출동! (버튼, LED, 버저 사용하기) 9 / 12 차시 수업의 주제와 목표 본 수업에서는 이전 차시에 배웠던 블록들의 기능을 복합적으로 활용한다. 스위치 기능을 가진 버튼을 활용하여 LED와 버저를 동시에 작동시키도록 한다. 각 블록들을 함께 사용하는 프로젝트를 통해 각각의 기능을 익히고 보다 다양한 활용 방법을 구상할 수 있다. 교수 학습

More information

8장.그래픽 프로그래밍

8장.그래픽 프로그래밍 윈도우프레임 도형그리기색과폰트이미지그리기그리기응용 2 윈도우프레임 제목표시줄을갖는윈도우를의미 생성과정 1 JFrame 객체생성 2 프레임의크기설정 3 프레임의제목설정 4 기본닫힘연산지정 5 프레임이보이도록만듦. 3 윈도우프레임예제 [ 예제 8.1 - EmptyFrameViewer.java] import javax.swing.*; public class EmptyFrameViewer

More information

MVVM 패턴의 이해

MVVM 패턴의 이해 Seo Hero 요약 joshua227.tistory. 2014 년 5 월 13 일 이문서는 WPF 어플리케이션개발에필요한 MVVM 패턴에대한내용을담고있다. 1. Model-View-ViewModel 1.1 기본개념 MVVM 모델은 MVC(Model-View-Contorl) 패턴에서출발했다. MVC 패턴은전체 project 를 model, view 로나누어

More information

Microsoft PowerPoint - web-part02-ch16-이벤트.pptx

Microsoft PowerPoint - web-part02-ch16-이벤트.pptx 과목명 : 웹프로그래밍응용교재 : 모던웹을위한 JavaScript Jquery 입문, 한빛미디어 Part2. jquery Ch16. 이벤트 2014년 1학기 Professor Seung-Hoon Choi 16 이벤트 jquery 에서는 자바스크립트보다더쉽게이벤트를연결할수있음 예 $(document).ready(function(event) { } ) 16.1

More information

Microsoft PowerPoint - 3ÀÏ°_º¯¼ö¿Í »ó¼ö.ppt

Microsoft PowerPoint - 3ÀÏ°_º¯¼ö¿Í »ó¼ö.ppt 변수와상수 1 변수란무엇인가? 변수 : 정보 (data) 를저장하는컴퓨터내의특정위치 ( 임시저장공간 ) 메모리, register 메모리주소 101 번지 102 번지 변수의크기에따라 주로 byte 단위 메모리 2 기본적인변수형및변수의크기 변수의크기 해당컴퓨터에서는항상일정 컴퓨터마다다를수있음 short

More information

슬라이드 1

슬라이드 1 기초 PYTHON 프로그래밍 14. 함수 - 1 1. 함수 2. 파이썬내장함수 3. 사용자정의함수 4. 함수의인수와반환값 5. 함수의위치와 main 작성하기 1. 함수 블랙박스 (black box) 함수는입력과출력을갖는 black box이다. 주어진입력에대해서어떤과정을거쳐출력이나오는지가숨겨져있다. >>> print('hello world') Hello world

More information

Microsoft PowerPoint - java1-lab5-ImageProcessorTestOOP.pptx

Microsoft PowerPoint - java1-lab5-ImageProcessorTestOOP.pptx 2018 학년도 1 학기 JAVA 프로그래밍 II 514760-1 2018 년봄학기 5/10/2018 박경신 Lab#1 (ImageTest) Lab#1 은영상파일 (Image) 을읽어서정보를출력 Java Tutorials Lesson: Working with Images https://docs.oracle.com/javase/tutorial/2d/images/index.html

More information

Modern Javascript

Modern Javascript ES6 - Arrow Function Class Template String Destructuring Default, Rest, Spread let, const for..of Promises Module System Map, Set * Generator * Symbol * * https://babeljs.io/ Babel is a JavaScript compiler.

More information

슬라이드 1

슬라이드 1 이벤트 () 란? - 사용자가입력장치 ( 키보드, 마우스등 ) 등을이용해서발생하는사건 - 이벤트를처리하는프로그램은이벤트가발생할때까지무한루프를돌면서대기상태에있는다. 이벤트가발생하면발생한이벤트의종류에따라특정한작업을수행한다. - 이벤트관련프로그램작성을위해 java.awt.event.* 패키지가필요 - 버튼을누른경우, 1 버튼클릭이벤트발생 2 발생한이벤트인식 ( 이벤트리스너가수행

More information

Visual Basic Visual Basic 소개

Visual Basic Visual Basic 소개 1. Visual Basic 소개 학습목표 MS 비주얼베이직 6.0과 2010의차이 비주얼베이직 2010 express 설치 비주얼베이직 2010의통합개발환경 프로그램의시작과실행 2 1. 소개 1.1 MS 비주얼베이직 6.0과 2010의차이 1.2 비주얼베이직 2010 express 설치 1.3 비주얼베이직 2010의통합개발환경 1.4 프로그램의시작과실행 3

More information

<4D F736F F F696E74202D20B8B6C0CCC5A9B7CEC7C1B7CEBCBCBCAD202839C1D6C2F7207E203135C1D6C2F >

<4D F736F F F696E74202D20B8B6C0CCC5A9B7CEC7C1B7CEBCBCBCAD202839C1D6C2F7207E203135C1D6C2F > 10주차 문자 LCD 의인터페이스회로및구동함수 Next-Generation Networks Lab. 5. 16x2 CLCD 모듈 (HY-1602H-803) 그림 11-18 19 핀설명표 11-11 번호 분류 핀이름 레벨 (V) 기능 1 V SS or GND 0 GND 전원 2 V Power DD or V CC +5 CLCD 구동전원 3 V 0 - CLCD 명암조절

More information

C 언어 프로그래밊 과제 풀이

C 언어 프로그래밊 과제 풀이 과제풀이 (1) 홀수 / 짝수판정 (1) /* 20094123 홍길동 20100324 */ /* even_or_odd.c */ /* 정수를입력받아홀수인지짝수인지판정하는프로그램 */ int number; printf(" 정수를입력하시오 => "); scanf("%d", &number); 확인 주석문 가필요한이유 printf 와 scanf 쌍

More information

Chapter 1

Chapter 1 3 Oracle 설치 Objectives Download Oracle 11g Release 2 Install Oracle 11g Release 2 Download Oracle SQL Developer 4.0.3 Install Oracle SQL Developer 4.0.3 Create a database connection 2 Download Oracle 11g

More information

화판_미용성형시술 정보집.0305

화판_미용성형시술 정보집.0305 CONTENTS 05/ 07/ 09/ 12/ 12/ 13/ 15 30 36 45 55 59 61 62 64 check list 9 10 11 12 13 15 31 37 46 56 60 62 63 65 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43

More information

9 차시고급위젯다루기 1 학습목표 날짜 / 시간과관련된위젯을배운다. 웹뷰를사용하여간단한웹브라우저기능을구현한다. 매니패스트파일의설정법을배운다. 2 확인해볼까? 3 날짜 / 시간위젯 1) 활동하기 활동개요

9 차시고급위젯다루기 1 학습목표 날짜 / 시간과관련된위젯을배운다. 웹뷰를사용하여간단한웹브라우저기능을구현한다. 매니패스트파일의설정법을배운다. 2 확인해볼까? 3 날짜 / 시간위젯 1) 활동하기 활동개요 9 차시고급위젯다루기 1 학습목표 날짜 / 시간과관련된위젯을배운다. 웹뷰를사용하여간단한웹브라우저기능을구현한다. 매니패스트파일의설정법을배운다. 2 확인해볼까? 3 날짜 / 시간위젯 1) 활동하기 활동개요 [ 그림 9-1] 시간예약앱 활동과정 - 2 - [ 그림 9-2] 안드로이드 SDK Manager [ 예제 9-1]main.xml 1

More information

Multi-pass Sieve를 이용한 한국어 상호참조해결 반-자동 태깅 도구

Multi-pass Sieve를 이용한 한국어 상호참조해결 반-자동 태깅 도구 Python: 파이썬이란무엇인가? Kangwon Natl. University Department of Computer Science Cheoneum Park Intelligent software Lab. 파이썬이란? Python 1990년암스테르담의귀도반로섬 (Guido Van Rossum) 이개발한인터프리터언어 국내외에서교육, 실무등에서많이사용 구글의소프트웨어,

More information

[ 그림 7-1] 프로젝트 res 폴더 이미지뷰 [ 예제 7-1] 이미지뷰 1 <LinearLayout 2 ~~~~ 중간생략 ~~~~ 3 android:orientation="vertical" > 4 <ImageView

[ 그림 7-1] 프로젝트 res 폴더 이미지뷰 [ 예제 7-1] 이미지뷰 1 <LinearLayout 2 ~~~~ 중간생략 ~~~~ 3 android:orientation=vertical > 4 <ImageView 7 차시이미지처리 1 학습목표 이미지뷰를사용하는방법을배운다. 비트맵을사용하는방법을배운다. 2 확인해볼까? 3 이미지뷰와이미지버튼 1) 학습하기 [ 그림 7-1] 프로젝트 res 폴더 이미지뷰 [ 예제 7-1] 이미지뷰 1 4

More information

Ext JS À¥¾ÖÇø®ÄÉÀ̼ǰ³¹ß-³¹Àå.PDF

Ext JS À¥¾ÖÇø®ÄÉÀ̼ǰ³¹ß-³¹Àå.PDF CHAPTER 2 (interaction) Ext JS., HTML, onready, MessageBox get.. Ext JS HTML CSS Ext JS.1. Ext JS. Ext.Msg: : Ext Ext.get: DOM 22 CHAPTER 2 (config). Ext JS.... var test = new TestFunction( 'three', 'fixed',

More information

다른 JSP 페이지호출 forward() 메서드 - 하나의 JSP 페이지실행이끝나고다른 JSP 페이지를호출할때사용한다. 예 ) <% RequestDispatcher dispatcher = request.getrequestdispatcher(" 실행할페이지.jsp");

다른 JSP 페이지호출 forward() 메서드 - 하나의 JSP 페이지실행이끝나고다른 JSP 페이지를호출할때사용한다. 예 ) <% RequestDispatcher dispatcher = request.getrequestdispatcher( 실행할페이지.jsp); 다른 JSP 페이지호출 forward() 메서드 - 하나의 JSP 페이지실행이끝나고다른 JSP 페이지를호출할때사용한다. 예 ) RequestDispatcher dispatcher = request.getrequestdispatcher(" 실행할페이지.jsp"); dispatcher.forward(request, response); - 위의예에서와같이 RequestDispatcher

More information

class Sale void makelineitem(productspecification* spec, int qty) SalesLineItem* sl = new SalesLineItem(spec, qty); ; 2. 아래의액티비티다이어그램을보고 Java 또는 C ++,

class Sale void makelineitem(productspecification* spec, int qty) SalesLineItem* sl = new SalesLineItem(spec, qty); ; 2. 아래의액티비티다이어그램을보고 Java 또는 C ++, Level 1은객관식사지선다형으로출제예정 1. 다음은 POST(Post of Sales Terminal) 시스템의한콜레보레이션다이어그램이다. POST 객체의 enteritem(upc, qty) 와 Sale 객체의 makellineitem(spec,qty) 를 Java 또는 C ++, C # 언어로구현하시오. 각메소드구현과관련하여각객체내에필요한선언이있으면선언하시오.

More information

MAX+plus II Getting Started - 무작정따라하기

MAX+plus II Getting Started - 무작정따라하기 무작정 따라하기 2001 10 4 / Version 20-2 0 MAX+plus II Digital, Schematic Capture MAX+plus II, IC, CPLD FPGA (Logic) ALTERA PLD FLEX10K Series EPF10K10QC208-4 MAX+plus II Project, Schematic, Design Compilation,

More information

Javascript.pages

Javascript.pages JQuery jquery part1 JavaScript : e-mail:leseraphina@naver.com http://www.webhard.co.kr I.? 2 ......,,. : : html5 ; ; .

More information

Chapter_02-3_NativeApp

Chapter_02-3_NativeApp 1 TIZEN Native App April, 2016 Dept. of software Dankook University http://embedded.dankook.ac.kr/~baeksj 목차 2 Tizen EFL Tizen EFL 3 Tizen EFL Enlightment Foundation Libraries 타이젠핵심코어툴킷 Tizen EFL 4 Tizen

More information

0806 블랙박스 메뉴얼 L5 원고작업_수정

0806 블랙박스 메뉴얼 L5 원고작업_수정 CLON L5 USER'S MANUAL Full HD Driving Image Recorder EFL3.0mm F2.0 DRIVING IMAGE RECORDER Digital L5 Recorder 본 제품을 사용하기 전에... www.eyeclon.com 제품을 구입해 주셔서 감사합니다. (아이클론)은 엠씨넥스의 상표입니다. 엠씨넥스 설명서의 모든 내용은 저작권법에

More information

tiawPlot ac 사용방법

tiawPlot ac 사용방법 tiawplot ac 매뉴얼 BORISOFT www.borisoft.co.kr park.ji@borisoft.co.kr HP : 00-370-077 Chapter 프로그램설치. 프로그램설치 3 2 Chapter tiawplot ac 사용하기.tiawPlot ac 소개 2.tiawPlot ac 실행하기 3. 도면파일등록및삭제 4. 출력장치설정 5. 출력옵션설정

More information

리포트_23.PDF

리포트_23.PDF Working Paper No 23 e-business Integrator From Strategy to Technology To remove the gap between e-biz strategy and implementation (eeyus@e-bizgroupcom) Creative Design 2001 04 24 e-business Integrator

More information

중간고사

중간고사 중간고사 예제 1 사용자로부터받은두개의숫자 x, y 중에서큰수를찾는알고리즘을의사코드로작성하시오. Step 1: Input x, y Step 2: if (x > y) then MAX

More information

슬라이드 1

슬라이드 1 프로세싱 광운대학교로봇학부박광현 프로세싱실행 2 C:\processing-3.2.1 폴더 창나타내기 실행 정지 3 폭 높이 600 400 도형그리기 배경칠하기 5 background(255, 255, 255); R G B background(255, 0, 0); background(255, 122, 0); 선그리기 6 background(255, 122, 0);

More information

Multi-pass Sieve를 이용한 한국어 상호참조해결 반-자동 태깅 도구

Multi-pass Sieve를 이용한 한국어 상호참조해결 반-자동 태깅 도구 Python: 파이썬프로그래밍의기초, 함수 Kangwon Natl. University Department of Computer Science Cheoneum Park Intelligent software Lab. 함수 Intelligent software Lab. 2 함수란무엇인가? Intelligent software Lab. 3 함수를사용하는이유는? 프로그래밍을하다보면똑같은내용을반복해서작성하는경우다반사

More information

gnu-lee-oop-kor-lec10-1-chap10

gnu-lee-oop-kor-lec10-1-chap10 어서와 Java 는처음이지! 제 10 장이벤트처리 이벤트분류 액션이벤트 키이벤트 마우스이동이벤트 어댑터클래스 스윙컴포넌트에의하여지원되는이벤트는크게두가지의카테고리로나누어진다. 사용자가버튼을클릭하는경우 사용자가메뉴항목을선택하는경우 사용자가텍스트필드에서엔터키를누르는경우 두개의버튼을만들어서패널의배경색을변경하는프로그램을작성하여보자. 이벤트리스너는하나만생성한다. class

More information

No Slide Title

No Slide Title 사건처리와 GUI 프로그래밍 이충기 명지대학교컴퓨터공학과 사건 사건은우리가관심을가질지모르는어떤일이일어나는것을나타내는객체이다. 예를들면, 다음이일어날때프로그램이어떤일을수행해야하는경우에사건이발생한다 : 1. 마우스를클릭한다. 2. 단추를누른다. 3. 키보드의키를누른다. 4. 메뉴항목을선택한다. 2 사건 사건은컴포넌트에서사용자나시스템에의하여발생하는일이다. 자바는사건을나타내는많은사건클래스를제공한다.

More information

UI TASK & KEY EVENT

UI TASK & KEY EVENT T9 & AUTOMATA 2007. 3. 23 PLATFORM TEAM 정용학 차례 T9 개요 새로운언어 (LDB) 추가 T9 주요구조체 / 주요함수 Automata 개요 Automata 주요함수 추후세미나계획 질의응답및토의 T9 ( 2 / 30 ) T9 개요 일반적으로 cat 이라는단어를쓸려면... 기존모드 (multitap) 2,2,2, 2,8 ( 총 6번의입력

More information

PowerPoint Presentation

PowerPoint Presentation Class - Property Jo, Heeseung 목차 section 1 클래스의일반구조 section 2 클래스선언 section 3 객체의생성 section 4 멤버변수 4-1 객체변수 4-2 클래스변수 4-3 종단 (final) 변수 4-4 멤버변수접근방법 section 5 멤버변수접근한정자 5-1 public 5-2 private 5-3 한정자없음

More information

Smart Power Scope Release Informations.pages

Smart Power Scope Release Informations.pages v2.3.7 (2017.09.07) 1. Galaxy S8 2. SS100, SS200 v2.7.6 (2017.09.07) 1. SS100, SS200 v1.0.7 (2017.09.07) [SHM-SS200 Firmware] 1. UART Command v1.3.9 (2017.09.07) [SHM-SS100 Firmware] 1. UART Command SH모바일

More information

Microsoft Word _mentor_conf_output5.docx

Microsoft Word _mentor_conf_output5.docx < 이재성교수님연구실멘토링자료 > 20151012 최현준제작 # 목차 1. 간단한파이썬 1.1 파이썬설치및설명. 1.2 파이썬데이터형과연산자. 1.3 간단한입출력과형변환. 1.4 for, while, if, with ~ as, indent. 1.5 def 함수정의와 default / return values 1.6 import 와 try except, pip.

More information

(Microsoft Word - \301\337\260\243\260\355\273\347.docx)

(Microsoft Word - \301\337\260\243\260\355\273\347.docx) 내장형시스템공학 (NH466) 중간고사 학번 : 이름 : 문제 배점 점수 1 20 2 20 3 20 4 20 5 10 6 10 7 15 8 20 9 15 합계 150 1. (20 점 ) 다음용어에대해서설명하시오. (1) 정보은닉 (Information Hiding) (2) 캡슐화 (Encapsulation) (3) 오버로딩 (Overloading) (4) 생성자

More information

<4D F736F F F696E74202D20C1A63034B0AD202D20C7C1B7B9C0D3B8AEBDBAB3CABFCD20B9ABB9F6C6DBC0D4B7C2>

<4D F736F F F696E74202D20C1A63034B0AD202D20C7C1B7B9C0D3B8AEBDBAB3CABFCD20B9ABB9F6C6DBC0D4B7C2> 게임엔진 제 4 강프레임리스너와 OIS 입력시스템 이대현교수 한국산업기술대학교게임공학과 학습내용 프레임리스너의개념 프레임리스너를이용한엔터티의이동 OIS 입력시스템을이용한키보드입력의처리 게임루프 Initialization Game Logic Drawing N Exit? Y Finish 실제게임루프 오우거엔진의메인렌더링루프 Root::startRendering()

More information