c08p407b.txt

来自「Data Abstraction & Problem Solving with 」· 文本 代码 · 共 2 行

TXT
2
字号
class Sphere
{
public:
// constructors and operations as before
   friend void readSphereData(Sphere& s); 
   friend void writeSphereData(Sphere& s); 
private:
   double theRadius;  // the sphere's radius
};  // end class

class Ball: public Sphere
{
public:
   Ball();
   Ball(double initialRadius, 
        const string initialName);
   void getName(string currentName) const;
   void setName(const string newName);
   void resetBall(double newRadius, 
                  const string newName);
   void displayStatistics() const;
private:
   string theName;  // the ball's name
};  // end class

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?