이거를 상속이용해서 쉽게만들려고하는데 어떻게 해야되나요??? 자바프로그래밍 연습중인데
class A {
private int n;
public int getN() {
return n;
}
public void setN(int i) {
n = i;
}
}
class B {
public String s;
private int n;
public int m;
private char c;
public void setN(int i) {
n=i;
}
public void setC(char ch) {
c = ch;
}
public char getC() {
return c;
}
public int getN() {
return n;
}
}
class C {
public String s;
private char c;
private int n;
public int m;
public double d;
public void setN(int i) {
n=i;
}
public void setC(char ch) {
c= ch;
}
public char getC() {
return c;
}
public int hetN() {
return n;
}
}