-
Notifications
You must be signed in to change notification settings - Fork 0
/
monkey.cpp
62 lines (46 loc) · 1.02 KB
/
monkey.cpp
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/*****************************************
* Program: Monkey.cpp
* Author: Sam Young
* Date: 2/20/2017
* Description: Accesses and mutates variables in the monkey class
* Input: None
* Output: Age cost revenue
* *****************************************/
#include"monkey.hpp"
/***********************
** Function: Monkey::Monkey()
** Description: Constructor for monkey class
** Parameters: None
** Pre: None
** Post: None
******************************************/
Monkey::Monkey(){
age = 3;
cost= 50;
revenue = 1500;
dayage = 0;
}
Monkey::Monkey(int age){
this ->age = age;
cost = 50;
revenue = 1500;
}
/**************************************
** Function: Monkey::get_cost()
** Description: Accesor for the cost of monkey
** Parameters: None
** Pre: None
** Post: None
*******************************************/
float Monkey::get_cost(){
return cost;
}
float Monkey::get_revenue(){
return revenue;
}
/*int Monkey::get_dayage(){
return dayage;
}
void Monkey::increase_dayage(){
dayage++;
}*/