-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
28 lines (26 loc) · 897 Bytes
/
Copy pathmain.cpp
File metadata and controls
28 lines (26 loc) · 897 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include <QApplication>
#include <iostream>
#include "view.h"
#include "model.h"
#include "controller.h"
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
Ingrediente ingr = Ingrediente("zucchero", 300, false);
Prodotto* cocktail = new Cocktail("Mojito", 150, ingr, 23);
Prodotto* cocktail2 = new Cocktail("Caipiroska", 150, ingr, 34);
Prodotto* cocktail3 = new Cocktail("Gin basil", 150, ingr);
Prodotto* cocktail4 = new Cocktail("Black russian", 150, ingr, 25);
Prodotto* ciao = new Bevanda("coca cola", 50, 0);
Catalogo cat;
cat.aggiungiProdotto(*cocktail);
cat.aggiungiProdotto(*cocktail2);
cat.aggiungiProdotto(*cocktail3);
cat.aggiungiProdotto(*cocktail4);
cat.aggiungiProdotto(*ciao);
Model model(cat);
Controller controller(&model);
View* view = new View(&controller);
view->show();
return a.exec();
}