-
Notifications
You must be signed in to change notification settings - Fork 0
/
class.h
106 lines (78 loc) · 1.68 KB
/
class.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
//Arafat Iqbal
//FIle for BST
//CS202
//Program 3
//File for the classes that are used in this program
#ifndef H_bst
#define H_bst
#include <iostream>
#include <fstream>
#include <stdlib.h>
#include <string.h>
#include <cctype>
#include <cstring>
const int MAX = 100;
using namespace std;
class info
{
public:
info();
info(char * category,int number);
info(const info & to_copy);
virtual ~info();
void display();
void insert();
char * get_category();
int get_number();
//Operator Overloading Functions
//Compare to see where to insert
bool operator <(const info & p) const;
friend ostream& operator <<(ostream & out,info & p);
friend istream& operator >>(istream & go, info & p);
protected:
//Virtual display and insert
virtual void display(ostream & out) = 0;
virtual void insert(istream & go) = 0;
//Data Members of Class Info
char * category;
int number;
};
class zoom:public info
{
public:
zoom();
zoom(char * category,int number, char * date,char * url);
zoom(const zoom & to_copy);
~zoom();
protected:
char * date;
char * url;
void insert(istream & go);
void display(ostream & out);
};
class project:public info
{
public:
project();
project(char * category,int number,char * assignment);
project(const project & to_copy);
~project();
protected:
char * assignment;
void insert(istream & go);
void display(ostream & out);
};
class lecture:public info
{
public:
lecture();
lecture(char * category,int number,char * topic,int length);
lecture(const lecture & to_copy);
~lecture();
protected:
char * topic;
int length;
void insert(istream & go);
void display(ostream & out);
};
#endif