- Create a base class called
Animal
with a protected attributetype
. - Implement a
Dog
class and aCat
class that inherit fromAnimal
. Set thetype
attribute based on the class name. - Each animal should have a
makeSound()
method that prints an appropriate sound.
- Implement the classes with specific constructors and destructors.
- Implement tests to demonstrate polymorphism.
- Create a
Brain
class with an array of 100std::string
calledideas
. Dog
andCat
should have a privateBrain*
attribute.- Upon construction,
Dog
andCat
should create theirBrain
usingnew Brain()
. - Upon destruction,
Dog
andCat
should delete theirBrain
. - Create an array of
Animal
objects (halfDog
, halfCat
) and delete them in the correct order. Check for memory leaks.
- Ensure deep copying of
Dog
andCat
. - Implement tests to check for memory leaks and deep copying.
- Make the
Animal
class non-instantiable to prevent instantiation. - Fix the
Animal
class so it's not possible to create instances of it.
- Update the
Animal
class to be non-instantiable.
- Implement an abstract class
AMateria
with necessary member functions. - Implement concrete classes
Ice
andCure
that inherit fromAMateria
. - Create a
Character
class with an inventory ofAMateria
objects. - Implement an interface
ICharacter
for theCharacter
class. - Implement a
MateriaSource
class that can learn and createAMateria
objects.
- Implement the classes with specific constructors, destructors, and member functions.
- Ensure deep copying for the
Character
class. - Implement tests to demonstrate the functionality of the classes.