此外,在UML图表中,重载运算符成员函数最佳的格式是什么?
这是我的类:
以下是我目前拥有的UML图表:
这是我的类:
class matrix
{
friend ostream& operator << (ostream&, const matrix&);
friend bool operator == (const matrix &, const matrix &);
friend matrix operator - (const matrix &, const matrix &);
private:
int size;
int range;
int array[10][10];
public:
matrix(int);
matrix(int, int);
bool operator != (const matrix &) const;
matrix operator + (const matrix &) const;
const matrix & operator = (const matrix &);
};
以下是我目前拥有的UML图表:
![enter image description here](https://istack.dev59.com/DcH16.webp)