consolidate all repos to one for archive
This commit is contained in:
62
semester_2/programiranje_2/naloga1001/main.cpp
Normal file
62
semester_2/programiranje_2/naloga1001/main.cpp
Normal file
@@ -0,0 +1,62 @@
|
||||
#include <iostream>
|
||||
#include "Gallery.h"
|
||||
#include "Functions.h"
|
||||
|
||||
int main() {
|
||||
Gallery slo("galer");
|
||||
|
||||
Artist artist1("Leonardo da Vinci", "biografi", 15, 4, 1452);
|
||||
Artwork art1("Mona Lisa", "desc", 100, 1797, &artist1, 32, 56, 94);
|
||||
slo.addArtwork(&art1);
|
||||
|
||||
Artist artist2 = {"Vincent van Goth", "bio", 30, 3, 1853};
|
||||
Artwork art2 = {"The starry Night", "desc", 256, 1889, &artist2, 56, 86, 15};
|
||||
slo.addArtwork(&art2);
|
||||
|
||||
Artist artist3 = {"Jahannes Vermeer", "biog", 1, 10, 1632};
|
||||
Artwork art3 = {"Girl with a Pearl Erring", "desc", 568, 1665, &artist3, 59, 56, 1};
|
||||
slo.addArtwork(&art3);
|
||||
|
||||
Artist artist4 = {"Gustav Klimt", "biog", 14, 7, 1862};
|
||||
Artwork art4 = {"The kiss", "desc", 465, 1907, &artist4, 47, 56, 2};
|
||||
slo.addArtwork(&art4);
|
||||
|
||||
Artist artist5 = {"Sandro Botticelli", "biog", 17, 5, 1510};
|
||||
Artwork art5 = {"The birth of Venus", "desc", 573, 1458, &artist5, 56, 89, 3.56};
|
||||
slo.addArtwork(&art5);
|
||||
|
||||
Artwork *painting1 = new Painting{"itoao", "desc", 1598, 789, &artist3, 43, 4, 7, PaintingTechnique::Oil};
|
||||
slo.addArtwork(painting1);
|
||||
|
||||
Artwork *painting2 = new Painting{"ito", "de", 1598, 789, &artist3, 43, 4, 7, PaintingTechnique::Acrylic};
|
||||
slo.addArtwork(painting2);
|
||||
|
||||
Artwork *Liter = new Literature("liter", "description", 597, 1590, &artist2, 56, 86, 15, LiteratureType::Biography);
|
||||
slo.addArtwork(Liter);
|
||||
|
||||
slo.printArtworks();
|
||||
//std::cout << slo.toString();
|
||||
std::cout << "--------------Sort-----------------\n";
|
||||
|
||||
slo.sort(ascendingPrice);
|
||||
slo.printArtworks();
|
||||
|
||||
std::cout << "--------------is cheper-----------------\n";
|
||||
|
||||
std::vector<Artwork *> returned;
|
||||
returned = slo.filteredVector(isCheperThen);
|
||||
for (int i = 0; i < returned.size(); ++i) {
|
||||
std::cout << returned[i]->toString();
|
||||
}
|
||||
|
||||
|
||||
std::cout << "------------FindRenaissance-------------------\n";
|
||||
if (slo.find(isRenaissanceArt))
|
||||
std::cout << slo.find(isRenaissanceArt);
|
||||
|
||||
std::cout << "------------Print paint-------------------\n";
|
||||
PrintIfPainting paint;
|
||||
slo.printArtworks(paint);
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user