From 33613a85afc4b1481367fbe92a17ee59c240250b Mon Sep 17 00:00:00 2001 From: Sven Eisenhauer Date: Fri, 10 Nov 2023 15:11:48 +0100 Subject: add new repo --- Bachelor/Prog1/Prakt6/prg1p6_3/Int40.h | 55 ++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 Bachelor/Prog1/Prakt6/prg1p6_3/Int40.h (limited to 'Bachelor/Prog1/Prakt6/prg1p6_3/Int40.h') diff --git a/Bachelor/Prog1/Prakt6/prg1p6_3/Int40.h b/Bachelor/Prog1/Prakt6/prg1p6_3/Int40.h new file mode 100644 index 0000000..c4949f3 --- /dev/null +++ b/Bachelor/Prog1/Prakt6/prg1p6_3/Int40.h @@ -0,0 +1,55 @@ +// Programmieren 1, Praktikum 6, Aufgabe 3 +// Author: Sven Eisenhauer +// Date: 17.01.2005 +// File: Int40.h +// Description: class Integer40 + +#ifndef INT40_1 +#define INT40_1 + +#include +using std::ostream; +using std::istream; + + +const static int ARRAYSIZE=40; + +class Integer40 +{ +public: + Integer40(); + Integer40(const Integer40&); + ~Integer40(); + const Integer40& read(); + friend istream& operator>> (istream&, Integer40 &); + const Integer40& write(); + friend ostream& operator<< (ostream&, const Integer40&); + friend Integer40& operator+ (const Integer40&, const Integer40&); + friend Integer40& operator- (const Integer40&, const Integer40&); + const Integer40& add(const Integer40&); + const Integer40& operator+=(const Integer40&); + const Integer40& substract(const Integer40&); + const Integer40& operator-=(const Integer40&); + const Integer40& operator=(const Integer40&); + bool isEqual(const Integer40&) const; + bool operator==(const Integer40&) const; + bool isNotEqual(const Integer40&) const; + bool operator!=(const Integer40&) const; + bool isGreaterThan(const Integer40&) const; + bool operator>(const Integer40&) const; + bool isSmallerThan(const Integer40&) const; + bool operator<(const Integer40&) const; + bool isGreaterOrEqual(const Integer40&) const; + bool operator>=(const Integer40&) const; + bool isSmallerOrEqual(const Integer40&) const; + bool operator<=(const Integer40&) const; + bool isZero(); + //const Integer40& operator-(const Integer40&); + //const Integer40& operator+(const Integer40&); + +private: + int *int40; + //static int nrInt40; +}; + +#endif \ No newline at end of file -- cgit v1.2.3