Skip to content

Conversation

@wayflayer
Copy link

No description provided.

@wayflayer wayflayer changed the title Кудряшов Кудряшов Михаил КМБО - 06 -21 Jun 6, 2022
@wayflayer wayflayer closed this Jun 6, 2022
@wayflayer wayflayer reopened this Jun 6, 2022
virtual const Pole* getPole(const std::string& name) const;

protected:
virtual const Pole* getPole(size_t idx) const;
Copy link
Owner

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;
Copy link
Owner

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;
}
}; No newline at end of file
Copy link
Owner

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;
Copy link
Owner

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);
Copy link
Owner

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 {
Copy link
Owner

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) {
Copy link
Owner

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);
Copy link
Owner

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);
Copy link
Owner

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() {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Эта функция должна была быть отдельной, и её должна вызывать main().

@wayflayer wayflayer requested a review from grayed June 13, 2022 08:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants