PPL Assignment
IRM2015006
gift.h
Go to the documentation of this file.
1 #ifndef GIFT_H
2 #define GIFT_H
3 
4 #include <iostream>
5 
7 enum GiftType {
11 };
12 
14 class Gift
15 {
16 public:
17  std::string name;
19  int price;
20  int value;
21  bool gifted;
25  Gift();
28  Gift(std::string name, GiftType type, int price, int value);
29 };
30 
31 
35 bool compareOnValue (Gift g1, Gift g2);
36 
40 bool compareOnPriceAsc (Gift g1, Gift g2);
41 
45 bool compareOnPriceDesc (Gift g1, Gift g2);
46 
47 #endif
Gift()
Definition: gift.cpp:19
std::string name
Definition: gift.h:17
int price
Definition: gift.h:19
bool gifted
Definition: gift.h:21
GiftType type
Definition: gift.h:18
int value
Definition: gift.h:20
bool compareOnValue(Gift g1, Gift g2)
Definition: gift.cpp:3
GiftType
Definition: gift.h:7
bool compareOnPriceAsc(Gift g1, Gift g2)
Definition: gift.cpp:8
Definition: gift.h:9
Definition: gift.h:8
Definition: gift.h:14
bool compareOnPriceDesc(Gift g1, Gift g2)
Definition: gift.cpp:13
Definition: gift.h:10