Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Consider the scenario of the game we have been seeing so far: The Revengers. Create a common interface via which the superheroes and the villains
Consider the scenario of the game we have been seeing so far: The Revengers. Create a common interface via which the superheroes and the villains can be called easily. Use the concepts of the Facade design pattern.
You can refer the following steps to implement the solution:
Create an abstract interface called Gamecharacter which the superheroes and the villians can implement
Create classes: Superhero and Villian, which defines the the getCharacter function
Create a class called TheUltimateGame which returns The Revengers and The Villians according to the input
Write the client code which calls TheUltimateGame class
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