Programming
-
[Java] 명품 자바 프로그래밍(Java Programming) 6장 실습문제 6번CSE/Java 2015. 6. 13. 11:03
12345678910111213141516171819202122232425262728293031323334 package ch06; import java.io.IOException;import java.io.InputStreamReader; public class Practice06 { public static void main(String[] args) { InputStreamReader rd = new InputStreamReader(System.in); int c = 0; int count = 0; try { while (true) { c = rd.read(); if (65
-
[Java] 명품 자바 프로그래밍(Java Programming) 6장 Open ChallengeCSE/Java 2015. 6. 13. 11:03
OpenChallenge.java 123456789101112131415161718192021222324252627282930313233343536373839404142 import java.io.IOException;import java.io.InputStreamReader; public class OpenChallenge06 { public static void main(String[] args) { InputStreamReader rd = new InputStreamReader(System.in); int[] histgram = new int[26]; int c = 0; try { while (true) { c = rd.read(); for (int i = 0; i
-
[Java] 명품 자바 프로그래밍(Java Programming) 5장 실습문제 2번CSE/Java 2015. 6. 13. 11:02
Calc.java 123456789101112package ch05; public abstract class Calc { protected int a; protected int b; public abstract void setValue(int a, int b); public abstract int calculate();} Colored by Color Scriptercs Add.java 12345678910111213141516 package ch05; public class Add extends Calc { public void setValue(int a, int b) { this.a = a; this.b = b; } public int calculate() { return a + b; } } Colo..
-
[Java] 명품 자바 프로그래밍(Java Programming) 5장 Open ChallengeCSE/Java 2015. 6. 13. 11:02
Product.java 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 package ch05; public class Product { private int id; private String describe; private String producer; private int price; public Product() { } public Product(int id, String describe, String producer, int price) { super(); this.id = id; this.describe = describe; this.pr..
-
[Java] 명품 자바 프로그래밍(Java Programming) 4장 실습문제 6번CSE/Java 2015. 6. 13. 11:01
Practice06.java 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 package ch03; import java.util.Scanner; public class Practice06 { @SuppressWarnings("resource") public static void main(String[] args) { Scanner scan = new Scanner(System.in); Threater threater = new Threater(); while (true) { System.ou..
-
[Java] 명품 자바 프로그래밍(Java Programming) 4장 Open ChallengeCSE/Java 2015. 6. 13. 11:00
OpenChallenge03.java 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 package ch03; import java.util.Scanner; public class OpenChallenge03 { @SuppressWarnings("resource") public static void main(String[] args) { Scanner scan = new Scanner(System.in); int count = 0; String word = "아버지"; String nextWord = ""; System.out.print("게임에 참가하는 인원은 몇명입니까 >..
-
[Java] 명품 자바 프로그래밍(Java Programming) 3장 실습문제 12번CSE/Java 2015. 6. 13. 11:00
1234567891011121314151617181920212223242526272829303132333435 package ch02; public class Practice12 { public static void main(String[] args) { int tenLine = 0; int clappingCount = 0; int threesixnine = 0; boolean flag = false; for (int i = 1; i