blob: c4949f30e84cc23f5d5de8ecd484cdb190a054da (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
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<iostream>
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
|