Garmin Interview Question

/* Your previous Plain Text content is preserved below: Pokémon Trade Application Write a program that fulfills all the following requirements. Program Flow: 1. Trainer A has a Pikachu and Trainer B has a Squirtle 2. The two trainers will swap Pokémon. Pokémon Features: 1. Create the Pokémon classes; Pikachu and Squirtle 2. It should be easy to extend to support other Pokémon types. 3. Pokémon attributes and behavior a. Life Points - A “life” value that will be initialized to a random value between 50 and 100 at time of creation. b. Attack - When it attacks, the attack value is randomized between 25 and 40 c. Defend - When attacked, the defending Pokémon will have a 33% chance to avoid (zero) damage. If not avoided the attack damage is taken from the pokémon’s life points 4. Pikachu attributes and behavior a. It has a 25% chance of increasing attack damage by 50% 5. Squirtle attributes and behavior a. Avoid chance of 50% b. Life value range of 70 – 100 Pokémon Trainer Features: 1. Create a trainer class with a name and pokémon partner Note: • C++ language preferred • Syntax errors are not critical. • The code is not required to compile or run. */

Interview Answer

Anonymous

Jul 7, 2020

Only formalities. Interviewer not intrested in asking any questions. Not sure what he was looking for.