-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathHome.h
44 lines (29 loc) · 895 Bytes
/
Home.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
/* Home class header file */
#ifndef _Home_h_
#define _Home _h_
#include "InsurancePolicy.h"
class Home : public InsurancePolicy
{
protected:
int sqft;
float dwellingCoverage, contentsCoverage, liability;
public:
// constructor
Home(string n="", int s=0, float d=0, float c=0, float l=0);
// deconstructor
~Home() {}
// calculate commission
void calcCommission();
// access methods
void setSqft(int s) { sqft = s; }
void setDwelling(float d) { dwellingCoverage = d; }
void setContents(float c) { contentsCoverage = c; }
void setLiability(float l) { liability = l; }
int getSqft() { return sqft; }
float getDwelling() { return dwellingCoverage; }
float getContents() { return contentsCoverage; }
float getLiability() { return liability; }
// print method -- used in overloaded stream << operator
void print(ostream &strm) const;
};
#endif