-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAgent.h
More file actions
42 lines (38 loc) · 1.13 KB
/
Agent.h
File metadata and controls
42 lines (38 loc) · 1.13 KB
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
#ifndef AGENT_H
#define AGENT_H
#include "Seller.h"
#include "Buyer.h"
#include <string>
#include <list>
using namespace std;
// listing of property struct
struct listingDetails{
Property* ownedProperty;
double sellingPrice;
string date;
bool soldStatus;
double mostRecentOffer;
};
class Buyer;
// mostly just changed declarations here
class Agent{
private:
Seller* contactedSellers[100];
Buyer* contactedBuyers[100];
listingDetails listOfProperties;
string name;
listingDetails listedProperties[100];
int count = 0;
public:
//assigning buyers and sellers to a singular agent
Agent(string name, Seller* contactedSellers[], Buyer* contactedBuyers[]);
//records the details of the list of properties
void recordOffer(listingDetails listOfProperties);
// contacts seller for when buyer makes an offer
void contactSeller(int listingNum, double price);
// agent can modify a property listing
void modifyListing(Property* p1, int sPrice, string date, bool status);
//prints list
void printList();
};
#endif