파워자바솔루션27 [파워자바] 11장 프로그래밍 솔루션 답지 1. class Circle { double radius; String color; public Circle(double radius) { super(); this.radius = radius; } public Circle() { super(); this.radius = 0; } public double getRadius() { return radius; } public void setRadius(double radius) { this.radius = radius; } public double getArea() { return 3.141592 * radius * radius; } } class Cylinder extends Circle { public Cylinder(double radius, doubl.. 2023. 2. 15. [파워자바] 10장 프로그래밍 솔루션 답지 1. import java.util.Scanner; class Theater { int[] seats; int size; public Theater(int size) { this.size=size; seats = new int[size]; } public void print() { System.out.println("----------------------------"); for(int i=0; i 2023. 2. 15. [파워자바] 9장 프로그래밍 솔루션 답지 1. public class Dog { private String name; private String breed; private int age; public Dog(String name, int age){ this.name = name; this.age = age; } public Dog(String name, String breed, int age){ this.name = name; this.breed = breed; this.age = age; } public String getName() { return name; } public String getBreed() { return breed; } public int getAge() { return age; } public void setName(St.. 2023. 2. 15. [파워자바] 8장 프로그래밍 솔루션 답지 1. class Circle { double r; double cx; double cy; public double area() { return 3.141592*r*r; } public double getR() { return r; } public void setR(double r) { this.r = r; } public double getCx() { return cx; } public void setCx(double cx) { this.cx = cx; } public double getCy() { return cy; } public void setCy(double cy) { this.cy = cy; } } public class CircleTest { public static void main(Stri.. 2023. 2. 15. 이전 1 2 3 4 5 6 7 다음