VD
Size: a a a
VD
VD
q
ЮЗ
ЮЗ
VD
VD
VD
VD
А
P
#include <string>
#include <iostream>
#ifndef CYLINDER
#define CYLINDER
class Cylinder{
private:
double radius;
double height;
public:
Cylinder();
Cylinder(const Cylinder &num);
~Cylinder();
void setHeight(double h);
double getHeight() const;
void setRadius(double r);
double getRadius() const;
friend ostream &operator<<(ostream &output, const Cylinder &C );
friend istream &operator>>(istream &input, Cylinder &C );
};
#endif
А это Cylinder.cpp source file#include <iostream>
#include "Cylinder.h"
using namespace std;
Cylinder::Cylinder(){
height = 0;
radius = 0;
}
Cylinder::Cylinder(const Cylinder &num){
radius = num.radius;
height = num.height;
}
void Cylinder::setHeight(double h){
height = h;
}
double Cylinder::getHeight() const{
return height;
};
void Cylinder::setRadius(double r){
radius = r;
}
double Cylinder::getRadius() const{
return radius;
}
ostream &operator<<( ostream &output, const Cylinder &C ) { KS
AP
AP
AP
AP
KS
KS
G
#include <string>
#include <iostream>
#ifndef CYLINDER
#define CYLINDER
class Cylinder{
private:
double radius;
double height;
public:
Cylinder();
Cylinder(const Cylinder &num);
~Cylinder();
void setHeight(double h);
double getHeight() const;
void setRadius(double r);
double getRadius() const;
friend ostream &operator<<(ostream &output, const Cylinder &C );
friend istream &operator>>(istream &input, Cylinder &C );
};
#endif
А это Cylinder.cpp source file#include <iostream>
#include "Cylinder.h"
using namespace std;
Cylinder::Cylinder(){
height = 0;
radius = 0;
}
Cylinder::Cylinder(const Cylinder &num){
radius = num.radius;
height = num.height;
}
void Cylinder::setHeight(double h){
height = h;
}
double Cylinder::getHeight() const{
return height;
};
void Cylinder::setRadius(double r){
radius = r;
}
double Cylinder::getRadius() const{
return radius;
}
ostream &operator<<( ostream &output, const Cylinder &C ) { OS