36 lines
1.1 KiB
C++

#include "Painting.h"
Painting::Painting(std::string title, std::string description, int price, int year, std::shared_ptr<Artist> artist, double width, double height, double depth, PaintingTechnique technique) :
Artwork(title, description, price, year, artist, width, height, depth), technique(technique)
{}
std::string Painting::getTechnique() const
{
switch (technique)
{
case PaintingTechnique::Oil:
return "Oil";
break;
case PaintingTechnique::Acrylic:
return "Acrylic";
break;
case PaintingTechnique::Graphite:
return "Graphite";
break;
default:
return "?";
}
}
std::string Painting::toString() const
{
return "Title: " + title +
"\nDescription: " + description +
"\nPrice: " + std::to_string(price) +
" EUR\nYear: " + std::to_string(year) +
"\nArtist: " + artist->toString() +
"\nDimension: " + dimension.toString() +
"\nPainting technique: " + getTechnique() + "\n\n";
}