

Учись благодаря многочисленным ресурсам, которые есть на Docsity
Заработай баллы, помогая другим студентам, или приобретай их по тарифом Премиум
Эта страница недоступна для предварительного просмотра
Не пропусти важные части!


#include
double getV(); friend double frd(Cylinder, Cylinder); }; Cylinder::Cylinder() { this->height = 0; this->radius = 0; } Cylinder::Cylinder(double height, double radius) { this->height = height; this->radius = radius; } double Cylinder::getHeight() { return this->height; } double Cylinder::getRadius() { return this->radius; } void Cylinder::setHeight(double height) { this->height = height; } void Cylinder::setRadius(double radius) { this->radius = radius; } double Cylinder::basisArea() { return 3.14 * (this->radius * this->radius); } double Cylinder::getV() { return basisArea() * this->height; } double frd(Cylinder x, Cylinder y) { return x.getV() + y.getV(); }