Answered step by step
Verified Expert Solution
Question
1 Approved Answer
C + + program example to show how dynamic binding works when implemented in a program to choose a game to play. This program isn
C program example to show how dynamic binding works when implemented in a program to choose a game to play. This program isnt about playing the games but rather helping users find the best game that is right for them given the skill level if age appropriate genre, type computer board, card, etc. and other
criteria. Create a base class Game as an abstract base class and three derived classes only implement twoone depending on whats necessary to show how theyd be the samedifferent Three classes are BoardGame, YardGame, and VideoGame. There is also a Node class with a base pointer that will be used to implement a data structure later. Things all three derived classes have in common should be base class members. Other than
constructors, destructors, setters, display, etc., there should be functions that
are the same from the user perspective for each derived game class.
Remember this program isnt about playing the games but rather helping users
decide what games would be the best fit. It will be important to pick three
functions and implement them in the derived classes the idea is that they have
exactly the same return type, same name, and same arguments but the
implementation in the function body is different. In addition, incorporate RTTI to show how to work with the different derived characteristics ie functionality is not self similar In only ONE derived class, include one method that is different, which is not virtual in the base class, and how it is called with the dynamiccast operation demonstrating downcasting. Use strings no char exception handling for handling erroneous situations, and smart pointers limit your raw pointers Also use the STL vector list array whenever a collection of data is required besides data structure that will be implemented later
Data members to include:
Name eg Minecraft
Genre eg Sandbox, sub genres are Survival and Adventure
Skill Level eg appropriate age range
Number of Players how many needed to play, whats the max, is it good for groups?
At least two unique characteristics about a game that is not common such
as if there are cards, a board, dice, avatars, game level, etc.
Pick one other that would be helpful for determining if game is a good match for what theyre looking to play.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started