-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathPlant.h
41 lines (33 loc) · 851 Bytes
/
Plant.h
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
/*
Authors: Andrew Yoder, Thomas Stryjski, Zachary O'Brien
Date: 12/8/18
Class: EEEE-346-01
Assignment: Project 3
Purpose: derived class for macroorganisms; herbivore?
*/
#include "MacroOrganism.h"
#include <cmath>
#pragma once
class Plant : public MacroOrganism {
protected:
double sunlight;
double co2;
double o2;
double fertility;
public:
//constructors
Plant(double x, double y);
//getters
double get_o2();
double get_fertility();
//setters
void set_co2(double x);
void set_o2(double x);
void set_sunlight(double x);
void set_fertility(); //determines reproduction values as a function of temperature and sunlight
//other
//void reproduce(Organism *O);
void reproduce(Plant *P, double x_max, double y_max);
void aged();
};