-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcurrency.h
More file actions
34 lines (30 loc) · 772 Bytes
/
currency.h
File metadata and controls
34 lines (30 loc) · 772 Bytes
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
#ifndef _CURRENCY_
#define _CURRENCY_
#include<iostream>
#include"numberbase.h"
class Currency : public NumberBase
{
private:
int _dollar;
int _cents;
public:
Currency();
Currency(int dollar, int cents);
Currency(const Currency &original);
~Currency();
//getters and setters
int getDollar() const;
void setDollar(int dollar);
int getCents() const;
void setCents(int cents);
//operator overload
Currency operator+(const Currency &that);
Currency operator*(const Currency &that);
friend ostream& operator<<(ostream &strm, const Currency &that);
Currency operator=(const Currency &that);
//inheritance
virtual void print();
virtual void demo(void);
virtual void grademe(void);
};
#endif