Website Summary Files Commits Branches @commit @diff @stats
path: root / Sem. 14 / Collection
diff options
context:
space:
mode:
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
+}