-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPenguin.hpp
42 lines (29 loc) · 1018 Bytes
/
Penguin.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/*********************************************************************
** Author: Karen Berba
** Date: 1/27/19
** Description:
Header for Penguin class
Inherits from Animal class. Has a default constructor and a custom constructor that takes in an integer age.
NOTES:
- Penguin cost $1,000
- Penguins have 5 babies
- Penguins have a feeding cost that is the same as the base cost
- A penguin’s payoff per day is 10% of their cost per animal
*********************************************************************/
#ifndef PENGUIN_HPP
#define PENGUIN_HPP
#include "Animal.hpp"
/*
source(s):
https://www.learncpp.com/cpp-tutorial/114-constructors-and-initialization-of-derived-classes/
https://stackoverflow.com/questions/7405740/how-can-i-initialize-base-class-member-variables-in-derived-class-constructor
*/
// Penguin class declaration - child class of Animal
class Penguin : public Animal {
public:
// default constructor
Penguin();
// custom constructor
Penguin(int pAge);
};
#endif