전체 글

class Point { private int x,y; public Point(int x,int y) {this.x = x; this.y = y;} public int getX() {return x;} public int getY() {return y;} protected void move(int x,int y) {this.x= x; this.y = y;} } public class ColorPoint extends Point { private String color; public ColorPoint(int x, int y,String color) { super(x, y); this.color = color; } public ColorPoint() { super(0,0); color = "BLACK"; ..
class Point { private int x,y; public Point(int x,int y) {this.x = x; this.y = y;} public int getX() {return x;} public int getY() {return y;} protected void move(int x,int y) {this.x= x; this.y = y;} } public class ColorPoint extends Point { private String color; public ColorPoint(int x, int y,String color) { super(x, y); this.color = color; } void setXY(int x, int y) { move(x,y); } void setCol..
import java.util.Scanner; public abstract class Converter { abstract protected double convert(double src); abstract protected String getSrcString(); abstract protected String getDestString(); protected double ratio; public void run() { Scanner scanner = new Scanner(System.in); System.out.println(getSrcString()+"을 "+getDestString()+"로 바꿉니다."); System.out.print(getSrcString()+"을 입력하세요>> "); double..
import java.util.Scanner; public abstract class Converter { abstract protected double convert(double src); abstract protected String getSrcString(); abstract protected String getDestString(); protected double ratio; public void run() { Scanner scanner = new Scanner(System.in); System.out.println(getSrcString()+"을 "+getDestString()+"로 바꿉니다."); System.out.print(getSrcString()+"을 입력하세요>> "); double..
class TV { private int size; public TV(int size) {this.size = size;} protected int getSize() {return size;} } public class ColorTV extends TV { private int color; protected int getColor() {return color;} public ColorTV(int size,int color) { super(size); this.color = color; } void printProperty() { System.out.println(getSize()+"인치 "+color+"컬러"); } public static void main(String[] args) { // TODO ..
class TV { private int size; public TV(int size) {this.size = size;} protected int getSize() {return size;} } public class ColorTV extends TV { private int color; public ColorTV(int size,int color) { super(size); this.color = color; } void printProperty() { System.out.println(getSize()+"인치 "+color+"컬러"); } public static void main(String[] args) { // TODO Auto-generated method stub ColorTV myTV =..
예림의 코딩
예림의 코딩