From e8cf63f69a1e2e5a2dea461767bf34a436118cb5 Mon Sep 17 00:00:00 2001 From: Angel Dimitriev Date: Sat, 29 May 2021 13:57:33 +0300 Subject: Update ShapesCollection.cpp --- Sem. 14/Collection/ShapesCollection.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Sem. 14/Collection/ShapesCollection.cpp') 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 +} -- cgit v1.3.1-23-gd82d