1. The assumption of this practice is you already have supermarket_practice.py and supermarket_item.py. If you have not, do this one first: https://indo.ayclogic.com/python-oop-supermarket-practice/
  2. In the supermarket_practice.py file add a new method list_all_frozen_items(self). Inside this method loop through every element inside the dictionary and print Frozen item. Frozen item is when supermarket_item.frozen == True. Call this method, so it will print all Frozen item.
  3. Create a new file game.py. Inside this game.py, create a Game class with the following attribute: name, price, single_player, console.
  4. Inside this Game class, add a new method get_info() that will return information about this game. Look at Student class in the SchoolApplication on how to do get_info() method.
  5. Inside this Game class, add a new method multi_player(self). This method will return either True or False boolean. If single_player attribute is True, then this method will return False. If single_player attribute is False, then this method will return True.
  6. Inside supermarket_system.py, Inside the SupermarketSystem.__init__ method add a new attribute game_dictionary. set this attribute as an empty dictionary.
  7. Inside supermarket_system.py, Inside the SupermarketSystem class, add a new method initialize_games(self). 
  8. Inside this new initialize_games(self) method, add several games into game_dictionary attribute. The key would be name of the game, the value would be the Game class. Don’t forget to import the Game class on the top of the file:
    1. Mario, $50, single_player is True, console is “Switch”
    2. Zelda, $60, single_player is True, console is “Switch”
    3. Street Fighter, $50, single_player is False, console is “X- Box”
    4. Mario Party, $40, single_player is False, console is “Switch”
  9. Inside SupermarketSystem.__init__(self) call this initialize_games() method.
  10. Change the menu inside SupermarketSystem from
    1. What do you want to purchase:
      1. Milk - $5
      2. Ice Cream - $4
      3. Bread - $6
      4. I am done, checkout please
      Enter your selection:
    2. into
    3. What do you want to purchase:
      1. Milk - $5
      2. Ice Cream - $4
      3. Bread - $6
      4. Buy Video Game
      5. I am done, checkout please
      Enter your selection:
  11. Inside run() method change the code so when user select 5, it will checkout.
  12. Inside run() method change the code so when user select 4, it will display the following sub menu
    1. Which game consoles you want to see
      1. Switch
      2. X-Box
      3. Play Station
      Enter your selection:
  13. When user select 1, loop through all Games inside game_dictionary and display all games whose console is “Switch”.
  14. When user select 2, loop through all Games inside game_dictionary and display all games whose console is “X-Box”
  15. When user select 3, loop through all Games inside game_dictionary and display all games whose console is “Play Station”. If there is no game whose console is “Play Station” then print “No Play Station games available.”