Website Summary Files Commits Branches @commit @diff @stats
path: root / Sem. 14 / Collection / ShapesCollection.cpp
diff options
context:
space:
mode:
Commite8cf63f69a1e2e5a2dea461767bf34a436118cb5 (patch)
Author
 Angel Dimitriev <achi_d@abv.bg>
2021-05-29 13:57:33 +0300
Committer
 GitHub <noreply@github.com>
2021-05-29 13:57:33 +0300
Filesc3b2e74e24f0dad31fb7531d1e28c22357baa3b2 /Sem. 14/Collection/ShapesCollection.cpp
Object-oriented_programming_FMI-e8cf63f69a1e2e5a2dea461767bf34a436118cb5.tar
Object-oriented_programming_FMI-e8cf63f69a1e2e5a2dea461767bf34a436118cb5.tar.gz
Object-oriented_programming_FMI-e8cf63f69a1e2e5a2dea461767bf34a436118cb5.zip
Parent080eb19fb7c69216d78d61cf9ddb1cd2450a9e7d (diff)
Update ShapesCollection.cpp
1 files changed, 3 insertions, 3 deletions
-rw-r--r--Sem. 14/Collection/ShapesCollection.cpp6
diff --git a/Sem. 14/Collection/ShapesCollection.cpp b/Sem. 14/Collection/ShapesCollection.cpp
index 0fe828c..5bd2711 100644
--- a/Sem. 14/Collection/ShapesCollection.cpp
+++ b/Sem. 14/Collection/ShapesCollection.cpp
@@ -25,12 +25,12 @@ void ShapesCollection::addSquare(double x1, double y1, double sideLength)
collection.push_back(new Square(x1, y1, sideLength));
}
-void ShapesCollection::printAreas()
+void ShapesCollection::printAreas() const
{
for (int i = 0; i < collection.size(); i++)
std::cout << collection[i]->getArea() << " " << std::endl;
}
-void ShapesCollection::printPers()
+void ShapesCollection::printPers() const
{
for (int i = 0; i < collection.size(); i++)
std::cout << collection[i]->getPer() << " " << std::endl;
@@ -64,4 +64,4 @@ ShapesCollection& ShapesCollection::operator= (const ShapesCollection& other)
ShapesCollection::~ShapesCollection()
{
free();
-} \ No newline at end of file
+}