-
Notifications
You must be signed in to change notification settings - Fork 0
/
Package.h
63 lines (43 loc) · 1.68 KB
/
Package.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
#pragma once
#include <string>
#include <iostream>
class Package
{
public:
Package
(const std::string&, const std::string&, const std::string&, const std::string&, const std::string&, // sender
const std::string&, const std::string&, const std::string&, const std::string&, const std::string&, // recipient
double, double); // weight and cost
// sender setter and getter prototypes
void setSenderName(const std::string&);
std::string getSenderName() const;
void setSenderAddress(const std::string&);
std::string getSenderAddress() const;
void setSenderCity(const std::string&);
std::string getSenderCity() const;
void setSenderProvince(const std::string&);
std::string getSenderProvince() const;
void setSenderPostalCode(const std::string&);
std::string getSenderPostalCode() const;
// recipient setter and getter prototypes
void setRecipientName(const std::string&);
std::string getRecipientName() const;
void setRecipientAddress(const std::string&);
std::string getRecipientAddress() const;
void setRecipientCity(const std::string&);
std::string getRecipientCity() const;
void setRecipientProvince(const std::string&);
std::string getRecipientProvince() const;
void setRecipientPostalCode(const std::string&);
std::string getRecipientPostalCode() const;
// member function prototypes
void setWeight(double);
double getWeight() const;
void setCostPerKilo(double);
double getCostPerKilo() const;
virtual double calculateCost() const;
private:
std::string sName, sAddress, sCity, sProvince, sPostalCode;
std::string rName, rAddress, rCity, rProvince, rPostalCode;
double weight, costPerKilo;
};