- 302 名前:デフォルトの名無しさん mailto:sage [2009/01/07(水) 03:56:04 ]
- 宿題出てるんですがよくわかりません
よろしくお願いします 次のように、整数値を表すクラスを設計する データメンバ x:xの座標(ただし 0-1000とする) y:yの座標(ただし 0-1000とする) z:zの座標(ただし 0-1000とする) メンバ関数 void setX(int a): xの座標を設計する(範囲外の値は、error messageを出力する) void setY(int b): Yの座標を設計する(範囲外の値は、error messageを出力する) void setZ(int c) Zの座標を設計する(範囲外の値は、error messageを出力する) int getX(): Xの座標値を得る int getY(): Yの座標値を得る int getZ(): Zの座標値を得る 結果は、次のように表示する Please Input X 3 Please Input Y 1000067 The value of Y is a mistake, Please input Y again! 5 Please Input Z 7 The result is: (3,5,7)
|

|