201901 JAVA프로그래밍실습
--> wow!
Emoji Chatter is a simple Server-Client chatting program
Multi threaded : more than 2 user can use this chatting program at once!
if you request an emoji to server, server will send you
aSmallServer.java : Server
aSmallClient.java : Client
guiClientLaunch.java : guiClient
- connect to server / as localhost:5901 / and input "vncserver"
- open server with tightVNC / and download VScode
- pull from your own github account / get your previous files!!
now you can write a code on your server ᕕ( ᐛ )ᕗ
→ Save Objects
ObjectOutputStream : Save objects in 1 file
ObjectInputStream : Load saved objects from file
serial Version UID : Version Control
→ Project 1 : CALCULATOR
이미지gui로 작동하는 calculator를 작성하였습니다.
사이즈는 300*500px으로 아래 이미지와 같이 입력버튼과 출력 스크린으로 이루어져 있습니다.
자세한 구조는 PDF FILE 에 있답니다!
→ Class Hierarchy
A_ calculator
B_ Function, GUI, Screen
C_ NumbButton, OperButton, SpecButton
D_ Label
→ CalculatorGUI
아래와 같은 형태의 calculator gui를 구성하였습니다.
→ Launch EC2 instance
→ GUI
버튼 3개와 클릭 횟수를 표시하는 GUI를 제작하였습니다. 사이즈는 200*200입니다
→ review : fork
fork 기능은 다른 사람(들)이 제작한 프로젝트를 저의 repository로 가져와서 편집하고, 수정해 볼 수 있도록 지원해줍니다.
fork기능 없이 download만 가능하게 해 두었더라면 다른 사람의 프로젝트를 로컬 컴퓨터에서만 사용할 수 있었을 것이고 이를 공유하는데에 여러 어려움이 있었을 것 같은데, 바로 본인 github의 repository로 가져올 수 있는 기능을 제공해서 여러 모로 유용하겠다는 생각이 들었습니다.
super | classname | sub | ||
---|---|---|---|---|
A_animalLauncher | ||||
A_animalFunc | ||||
A_animal | - | B_canine B_feline | ||
A_pet | ||||
A_robot | ||||
A_animal | - | B_canine | - | C_dog C_wolf |
A_animal | - | B_feline | - | C_cat C_tiger |
B_feline A_pet | - | C_cat | ||
B_canine A_pet | - | C_dog | ||
A_pet A_robot | - | C_robodog | ||
B_feline | - | C_tiger | ||
B_canine | - | C_wolf |
w04 : private, getter and setter
A_super | private | B_mid | C_sub | ||
---|---|---|---|---|---|
A_animalLauncher | , | ||||
A_animalFunc | , | ||||
A_animal | private food, getter and setter | -> | B_canine | -> | C_dog |
-> | C_wolf | ||||
-> | B_feline | -> | C_cat | ||
-> | C_tiger |
→ abstract, interface
→ with animal class
→ (ab) means abstracted class
→ inherit structure
superclass | <-> | subclass | ||
---|---|---|---|---|
A_ | B_ | C_ | ||
A_animalLauncher | ||||
A_animalFunc | ||||
(ab)A_animal | -> | (ab)B_human | -> | C_vet |
-> | C_PetOwner | |||
-> | (ab)B_feline | -> | C_tiger | |
-> | C_cat | |||
-> | (ab)B_Canine | -> | C_wolf | |
-> | C_Dog | |||
-> | -----------> | -> | C_hippo |
→ inheritance, polymorphism
→ with animal class
→ inherit structure
superclass | <-> | subclass | ||
---|---|---|---|---|
A_ | B_ | C_ | ||
A_animalLauncher | ||||
A_animal | -> | B_human | -> | C_vet |
-> | C_PetOwner | |||
-> | B_feline | -> | C_tiger | |
-> | C_cat | |||
-> | B_Canine | -> | C_wolf | |
-> | C_Dog | |||
-> | -------> | -> | C_hippo |