-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAppointment.h
More file actions
35 lines (33 loc) · 918 Bytes
/
Appointment.h
File metadata and controls
35 lines (33 loc) · 918 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
#pragma once
#include "Time.h"
class Appointment
{
private:
Time start;
Time end;
int interval;
public:
//Default constructor
Appointment();
//A constructor that takes both times
Appointment(Time s,Time e);
//Copy constructor
Appointment(const Appointment & t);
//A function to calculate interval
double calinterval();
// **Getters**
Time getstart()const;
Time getend()const;
// **overloaded iostream and oustream operators**
friend ostream& operator<< (ostream& out, Appointment appointment);
friend istream& operator>> (istream& in, Appointment &appointment);
/********** Required overloaded operators ************/
bool operator==(Appointment app);
bool operator!=(Appointment app);
bool operator<(Appointment app);
bool operator>(Appointment app);
bool operator>=(Appointment app);
bool operator<=(Appointment app);
//Destructor
~Appointment();
};