-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMarket.h
63 lines (50 loc) · 968 Bytes
/
Market.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
//
// Created by Sean Hakmon on 05/01/2022.
//
#ifndef HW4_MARKET_H
#define HW4_MARKET_H
#include <exception>
#include <vector>
#include "Farm.h"
#include <iostream>
#include <string>
using namespace std;
class Market
{
int year;
vector<Farm*> Farms;
public:
Market();
void CreateNewFarms();
void TradingDay();
void nextYear();
void fastForwardYears();
void printMarketFarms();
int getYear() const;
virtual ~Market();
};
class CowExp : public exception
{
public:
const char* what() const throw() override
{
return "Insert valid number of cow farms";
}
};
class ChickExp : public exception
{
public:
const char* what() const throw() override
{
return "Insert valid number of chicken farms";
}
};
class SheepExp : public exception
{
public:
const char* what() const throw() override
{
return "Insert valid number of sheep farms";
}
};
#endif //HW4_MARKET_H