Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "Game.h";
- #include "GamePlatform.h";
- int main() {
- GamePlatform platform;
- platform.addGame(Game("Game 1", 19.99, true));
- platform.addGame(Game("Game 2", 0, true));
- platform.addGame(Game("Game 3", 29.99, false));
- std::cout << "All games in the platform:" << std::endl;
- platform.printAllGames();
- std::cout << "\nCheapest and most expensive games:" << std::endl;
- platform.printCheapestGame();
- platform.printMostExpensiveGame();
- std::cout << "\nFree games:" << std::endl;
- platform.printAllFreeGames();
- if (platform.removeGame(1)) {
- std::cout << "\nAfter removing a game:" << std::endl;
- platform.printAllGames();
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement