개정판
-
[Java] 명품 자바 프로그래밍(Java Programming) 7장 실습문제 10번 Java / CSECSE/Java 2015. 6. 13. 11:08
Location.java 12345678910111213141516171819202122232425262728293031323334353637383940 package chap6; public class Location { private String lname; private double latitude, longitude; public Location(String lname, double latitude, double longitude) { super(); this.lname = lname; this.latitude = latitude; this.longitude = longitude; } public String getLname() { return lname; } public void setLname..
-
[Java] 명품 자바 프로그래밍(Java Programming) 7장 실습문제 6번CSE/Java 2015. 6. 13. 11:07
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768package chap6; import java.util.Iterator;import java.util.Vector; abstract class GraphicObject { int x, y, w, h; public GraphicObject(int x, int y, int w, int h) { super(); this.x = x; this.y = y; this.w = w; this.h = h; } public abstract void view();} class Rect extends..
-
[Java] 명품 자바 프로그래밍(Java Programming) 7장 실습문제 12번 Java / CSECSE/Java 2015. 6. 13. 11:06
Phone.java 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 package ch07; public class Phone { private String name; private String address; private String phoneNumber; public Phone() { } public Phone(String name, String address, String phoneNumber) { super(); this.name = name; this.address = address; this.phoneNumber = phoneNumber; } public String getName()..
-
[Java] 명품 자바 프로그래밍(Java Programming) 7장 Open ChallengeCSE/Java 2015. 6. 13. 11:06
Phone.java 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 package ch07; public class Phone { private String name; private String address; private String phoneNumber; public Phone() { } public Phone(String name, String address, String phoneNumber) { super(); this.name = name; this.address = address; this.phoneNumber = phoneNumber; } public String getName()..
-
[Java] 명품 자바 프로그래밍(Java Programming) 6장 실습문제 12번CSE/Java 2015. 6. 13. 11:05
Person.java 1234567891011121314151617181920212223242526272829303132333435363738394041 package ch06; public class Person { private String name; private int[] arr; public Person(String name) { this.name = name; arr = new int[3]; } public boolean generate() { for (int i = 0; i
-
[Java] 명품 자바 프로그래밍(Java Programming) 6장 실습문제 10번CSE/Java 2015. 6. 13. 11:05
1234567891011121314151617181920212223 package ch06; import java.util.StringTokenizer; public class Practice10 { public static void main(String[] args) { String query = args[0]; StringTokenizer st = new StringTokenizer(query, "&"); String[] arr; String tmp = ""; while (st.hasMoreTokens()) { tmp = st.nextToken(); arr = tmp.split("="); System.out.print(arr[0] + "\t" + arr[1] + "\n"); } }} Colored b..
-
[Java] 명품 자바 프로그래밍(Java Programming) 6장 실습문제 8번CSE/Java 2015. 6. 13. 11:04
12345678910111213141516171819202122232425262728293031 package ch06; import java.util.Scanner;import java.util.StringTokenizer; public class Practice08 { @SuppressWarnings("resource") public static void main(String[] args) { Scanner scan = new Scanner(System.in); String query = scan.nextLine(); StringTokenizer st = new StringTokenizer(query, " "); String maxToken = ""; String tmp = ""; int maxLen..