This is the diagram:
Integer
-number: int
+Integer():
+Integer(num: int):
+~Integer():
+getInt(): int
+operator<(Integer): bool
+operator++(): int
+operator--(): int
Here is my code, prob. not quite right but was a little confused on a few lines and the book had about 2 pages on UML which did not help me much. Some of these lines I'm not sure are right but I tried what I could from reading the book. For example the operators. If I could just get some input or maybe some help on what I need to do. Thanks
Code:#ifndef INTEGER_H #define INTEGER_H class Integer { private: int number; public: Integer(); // Constructor Integer(int num) ~Integer(); // Destructor int getInt(); bool operator < (int Integer &); int operator ++ (const Integer &); int operator -- (const Integer &); }; #endif



LinkBack URL
About LinkBacks



