Domanda di colloquio di Genetec

Using Abstraction and Polymorphism, how would you design classes for various elements in a video game? (In reference to past platformer video game project)

Risposta di colloquio

Anonimo

3 giu 2021

Use abstract classes called Monster and Health that would be inherited by different Monster classes (Goblin, Imp...) and Health pack classes (Heal10, Heal20, ...). These objects would all act differently using overriding for variety in the game.