-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Кудряшов Михаил КМБО - 06 -21 #41
base: master
Are you sure you want to change the base?
Conversation
virtual const Pole* getPole(const std::string& name) const; | ||
|
||
protected: | ||
virtual const Pole* getPole(size_t idx) const; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Нет реализации.
|
||
virtual size_t getPoleCount() const { return 2; } | ||
|
||
virtual const Pole* getPole(const std::string& name) const; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Эту функцию перереализовывать не требовалось.
electricy.cpp
Outdated
|
||
return nullptr; | ||
} | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Нет main()
, демонстрирующего создание цепи.
electricy.h
Outdated
virtual const Pole* getPole(const std::string& name) const = 0; | ||
|
||
virtual size_t getPoleCount() const = 0; | ||
bool isConnectedTo(const Object& other) const; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Не реализована.
electricy.h
Outdated
|
||
virtual size_t getPoleCount() const = 0; | ||
bool isConnectedTo(const Object& other) const; | ||
bool connect(const std::string& poleName, const Object& other, const std::string& otherPoleName); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Не реализована.
vector3d.cpp
Outdated
v1[2] = 54; | ||
//vector3d v4 = v1 + v2, v5 = v1 - v2, v6 = v1 * 0.5f; | ||
//cout << "v4: " << v4 << endl << "v5: " << v5 << endl << "v6: " << v6 << endl; | ||
class Vec { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Этот код должен был оказаться внутри изначально данного класса vector3d
.
vector3d.cpp
Outdated
Vec operator -(const Vec& other) { | ||
return Vec(data[0] - other[0], data[1] - other[1], data[2] - other[2]); | ||
}; | ||
Vec operator *(const float value) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Передаваемые по значению аргументы нет смысла делать const
.
vector3d.cpp
Outdated
}; | ||
Vec operator !() { | ||
if ((data[0] == 0) && (data[1] == 0) && (data[2] == 0)) | ||
return Vec(data[0] == 1, data[1] == 1, data[2] == 1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Неверно
vector3d.cpp
Outdated
if ((data[0] == 0) && (data[1] == 0) && (data[2] == 0)) | ||
return Vec(data[0] == 1, data[1] == 1, data[2] == 1); | ||
else | ||
return Vec(data[0] == 0, data[1] == 0, data[2] == 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Тоже неверно
vector3d.cpp
Outdated
}; | ||
|
||
return 0; | ||
bool test_Vec() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Эта функция должна была быть отдельной, и её должна вызывать main()
.
No description provided.