Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //SEGMENT
- #ifndef SEGMENT_H
- #define SEGMENT_H
- #include<string>
- class Segment
- {
- public:
- Segment();
- virtual double pole() = 0;
- virtual double obwod() = 0;
- virtual std::string typ() = 0;
- };
- #endif
- //TROJKAT
- #ifndef TROJKAT_H
- #define TROJKAT_H
- #include "segment.h"
- class Trojkat : public Segment
- {
- double a;
- double b;
- public:
- Trojkat(double a, double b);
- double pole();
- double obwod();
- std::string typ();
- };
- #endif
- //KWADRAT
- #ifndef KWADRAT_H
- #define KWADRAT_H
- #include "segment.h"
- class Kwadrat : public Segment
- {
- double a;
- public:
- Kwadrat(double a);
- double pole();
- double obwod();
- std::string typ();
- };
- #endif
- //PROSTOKAT
- #ifndef PROSTOKAT_H
- #define PROSTOKAT_H
- #include "segment.h"
- class Prostokat : public Segment
- {
- double a;
- double b;
- public:
- Prostokat(double a, double b);
- double pole();
- double obwod();
- std::string typ();
- };
- #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement