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
|
int main() {
vector<Category*> categories;
categories.push_back(new Category("AA-34", "Pasta", "Italian"));
categories.push_back(new Category("BB-65", "Wine", "French"));
categories.push_back(new Category("CC-120", "Pizza", "Italian"));
vector<Item*> items;
Product p1("DD-54", "Spaghetti", "Bolognese", 7.50, 3, amount, 1, *categories[0]);
Product p2("EE-25", "Cabernet", "Sauvignon", 8.20, 5.0, percentage, 2, *categories[1]);
Product p3("FF-99", "Capricciosa", "Ricetta", 5.50, 2, amount, 1, *categories[2]);
Service s1(1.50, 30.50, 1.50, amount);
Service s2(2.0, 15.0, 1.0, percentage);
Service s3(2.20, 10.50, 1.0, amount);
//adding the elements to the items vector
items.push_back(&p1);
items.push_back(&p2);
items.push_back(&p3);
items.push_back(&s1);
items.push_back(&s2);
items.push_back(&s3);
}
|