본문 바로가기

전체 글148

순서도 그리는 법 시작 / 끝 모양. 둥근 모양으로 시작했다가, 둥근 모양으로 끝난다. Input/Output 은 비스듬한 마름모 모양 결정은 다이아 모양 Declare variables num1,num2 and sum 같은 프로세싱은 네모 참고사이트 https://www.programiz.com/article/flowchart-programming Design Flowchart In Programming (With Examples) - Programiz www.programiz.com 2020. 3. 17.
Pseudo Code 작성법 의사코드 작성법 1. Start by writing down the purpose of the process. 의사코드가 무엇을 하려는 지 적어준다. 2. Write only one statement per line. 3. IF,ELSE,WHILE 같은 실행식은 대문자로 써야 구분돼 보여진다. ex) IF grade is grater than or equal to 60 Print "passed" ELSE Print "failed" 4. 요약하지 말고, 코딩을 모르는 사람이 봐도 알 수 있게 작성해야 한다. ex) IF input is odd, output "y" (x) IF user enters ad odd number, display "y" (o) 5. Pseudocode statements are c.. 2020. 3. 17.
Buffered Reader/Writer Buffer을 사용하는 이유: 하드디스크의 속도는 매우 느리다. 또한 하드디스크 뿐 아니라 키보드,모니터와 같은 외부장치의 속도는 시간이 많이 걸리는 작업이다. 고로 버퍼링없이 키보드가 눌릴 때마다 눌린 정보를 바로 목적지로 이동시켜주는 것보다 중간에 Memory Buffer를 두어서 data를 한데 묶어서 이동시키는 것이 효율적이고 빠르다. 그냥 전송하게 되면 Cpu와 성능 차이가 많이 나서 비효율적이다. 비유적으로 말하자면 버스에 한 사람 한 사람 태우고 옮기냐 vs 버스에 여러사람 올 때까지 기다렸다가 한 번에 옮기냐 이다. 스캐너는 입력될 때마다 "잠깐 모두 멈춰! 나 얘 입력받을거야!" 하는거고 , 버퍼는 모으고모으다가 모두 멈춰! 하는거이다. BufferedReader br = new Buff.. 2020. 3. 16.
자바 8 Optional https://www.baeldung.com/java-8-new-features New Features in Java 8 | Baeldung A short intro into the new features of Java 8; the focus is on default and static interface methods, static method references, and Optional. www.baeldung.com Starting with Java 8, interfaces can have static and default methods that, despite being declared in an interface, have a defined behavior. static String produce.. 2020. 3. 11.