-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdecibel.h
More file actions
46 lines (37 loc) · 966 Bytes
/
decibel.h
File metadata and controls
46 lines (37 loc) · 966 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
35
36
37
38
39
40
41
42
43
44
45
46
#ifndef _DECIBEL_
#define _DECIBEL_
#include<iostream>
#include<cmath>
#include<string>
#include"numberbase.h"
//Ian Cleary
//CSC 220 Summer 2015
//Project 2: Decibel Class
using namespace std;
class Decibel : public NumberBase {
private:
double num;
float dB;
public:
Decibel();
Decibel(double x);
Decibel(float y);
Decibel(const Decibel& original);
~Decibel();
//std::string myGradeRequest;
// Accessor/Mutator methods (getters & setters)
double getNum() const;
void setNum(double x);
float getdB() const;
void setdB(float y);
//Operator overload
Decibel operator=(const Decibel &that);
Decibel operator+(const Decibel &that);
Decibel operator-(const Decibel &that);
Decibel operator*(const Decibel &that);
friend ostream& operator<<(ostream &strm, const Decibel &that);
//pure virtual functions from numberbase.h
void print(void);
void demo(void);
};
#endif