PPL Assignment
IRM2015006
Main Page
Classes
Files
File List
File Members
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
{
8
essential
,
9
luxury
,
10
utility
11
};
12
14
class
Gift
15
{
16
public
:
17
std::string
name
;
18
GiftType
type
;
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::Gift
Gift()
Definition:
gift.cpp:19
Gift::name
std::string name
Definition:
gift.h:17
Gift::price
int price
Definition:
gift.h:19
Gift::gifted
bool gifted
Definition:
gift.h:21
Gift::type
GiftType type
Definition:
gift.h:18
Gift::value
int value
Definition:
gift.h:20
compareOnValue
bool compareOnValue(Gift g1, Gift g2)
Definition:
gift.cpp:3
GiftType
GiftType
Definition:
gift.h:7
compareOnPriceAsc
bool compareOnPriceAsc(Gift g1, Gift g2)
Definition:
gift.cpp:8
luxury
Definition:
gift.h:9
essential
Definition:
gift.h:8
Gift
Definition:
gift.h:14
compareOnPriceDesc
bool compareOnPriceDesc(Gift g1, Gift g2)
Definition:
gift.cpp:13
utility
Definition:
gift.h:10
gifts
gift.h
Generated by
1.8.11