| marp | true |
|---|---|
| title | Programming 2 - Homework 1 |
| author | Benjamin Wilking |
| theme | uncover |
| style | section { font-size: 30px } |
| class | invert |
| paginate | false |
Requirements: TDD, Inheritance
Create a small C++ project using CMake and with our typical folder structure. This project should implement:
- A base class called Animal
- the only member of Animal is a variable for the number of feet
- the only method of Animal returns the number of feet (a so called getter-method)
- A child class called Spider (a spider has always 8 feet)
- A child class called Mammal (a mammal can have a different amount of feet)
- A short main to instantiate a tarantula and a groundhog.
- print out the amount of feet for the tarantula and the groundhog.
- Write two tests using gtest to verify that the number of feet is correctly initialized for spiders and mammals.