Files
hwr2024_b/cpp/classes/ClassA.h
T

30 lines
599 B
C++

#ifndef POINTER_CLASSA_H
#define POINTER_CLASSA_H
#include "IComparable.h"
class ClassA : public IComparable {
// private
public:
// public
ClassA(); // default constructor
ClassA(const ClassA& other); // copy constructor
~ClassA() override; // destructor
void Print();
int CompareTo(IComparable* other) override;
const float& GetDecimal() const { return *_pDecimal; }
void SetDecimal(float decimal) { *_pDecimal = decimal; }
protected:
// protected
private:
// private
int _number = 0;
float* _pDecimal = nullptr;
};
#endif //POINTER_CLASSA_H