consolidate all repos to one for archive
This commit is contained in:
23
semester_2/programiranje_2/naloga1002/PaintingLiterature.cpp
Normal file
23
semester_2/programiranje_2/naloga1002/PaintingLiterature.cpp
Normal file
@@ -0,0 +1,23 @@
|
||||
//
|
||||
// Created by Nik on 16/05/2022.
|
||||
//
|
||||
|
||||
#include "PaintingLiterature.h"
|
||||
|
||||
PaintingLiterature::PaintingLiterature(std::string title, std::string description, int price, int year, std::shared_ptr<Artist> artist, double width, double height, double depth,
|
||||
PaintingTechnique technique, LiteratureType material) :
|
||||
Painting(title, description, price, year, artist, width, height, depth, technique),
|
||||
Literature(title, description, price, year, artist, width, height, depth, material)
|
||||
{}
|
||||
|
||||
std::string PaintingLiterature::toString() const
|
||||
{
|
||||
return "Title: " + Painting::title +
|
||||
"\nDescription: " + Painting::description +
|
||||
"\nPrice: " + std::to_string(Painting::price) +
|
||||
" EUR\nYear: " + std::to_string(Painting::year) +
|
||||
"\nArtist: " + Painting::artist->toString() +
|
||||
"\nDimension: " + Painting::dimension.toString() +
|
||||
"\nPainting technique: " + getTechnique() +
|
||||
"\nLiterature type: " + getMaterial() + "\n\n";
|
||||
}
|
||||
Reference in New Issue
Block a user