#include "Monster.h" Monster myMonster; myMonster.setName("Goblin"); myMonster.setSize(2); myMonster.setStrength(5);
#include "Monster.h" MonsterGenerator generator; Monster myMonster = generator.generateMonster();
#include "Monster.h" Monster myMonster1, myMonster2; // set characteristics for myMonster1 and myMonster2 Monster myNewMonster = combineMonsters(myMonster1, myMonster2);This code uses the combineMonsters function to create a new Monster that is a unique combination of the characteristics of myMonster1 and myMonster2. Package/Library: Monster library.