⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ball398.h

📁 Data Abstraction & Problem Solving with C++源码
💻 H
字号:
#include "Sphere396.h"#include <string>using namespace std; class Ball: public Sphere{public:  // everything as before, except  // displayStatistics is omitted  // and getArea is revised:// constructors:   Ball();   Ball(double initialRadius,        const string initialName);   // Creates a ball with radius initialRadius and   // name initialName.// additional or revised operations:   void getName(string currentName) const;   // Determines the name of a ball.   void setName(const string newName);   // Sets (alters) the name of an existing ball.   void resetBall(double newRadius,                  const string newName);   // Sets (alters) the radius and name of an existing   // ball to newRadius and newName, respectively.   double getArea() const; // cross-sectional areaprivate:   string theName; // the ball's name}; // end class

⌨️ 快捷键说明

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