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

📄 ball.cpp

📁 Data Abstraction & Problem Solving with C++源码
💻 CPP
字号:
#include "Ball387.h"#include <iostream>using namespace std;Ball::Ball() : Sphere(){   setName("");} // end default constructorBall::Ball(double initialRadius,            const string& initialName)            : Sphere(initialRadius){   setName(initialName);}  // end constructorvoid Ball::getName(string& currentName) const{   currentName = theName;}  // end getNamevoid Ball::setName(const string& newName){   theName = newName;}  // end setNamevoid Ball::resetBall(double newRadius,                      const string& newName){   setRadius(newRadius);   setName(newName);}  // end resetBallvoid Ball::displayStatistics() const{   cout << "Statistics for a " << theName << ":";   Sphere::displayStatistics();}  // end displayStatistics

⌨️ 快捷键说明

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