21/01/31 20:18:52.57 OeszCOeJ.net
class Box {
private int h;
private int w;
public int getHeight(){
return this.h;
}
public int getWidth(){
return this.w;
}
public int setHeight(int value) {
this.h = value;
}
public int setWidth(int value){
this.w = value;
}
}
俺も出題しよっと
俺は上記、箱クラスを作った
カプセル化もしてるし、インスタンス化もできるし、まさにオブジェクト指向(キリッ)
さて、何が駄目でしょうか
前提...命名規則やインデント等の書き方の問題ではない
考えるべきこと...クラス設計的な問題点を見つけよ