-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathComedy.cpp
More file actions
51 lines (44 loc) · 908 Bytes
/
Comedy.cpp
File metadata and controls
51 lines (44 loc) · 908 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
47
48
49
50
51
#include "Comedy.h"
#include <iostream>
#include <sstream>
Comedy::Comedy(string input)
{
stringstream info(input);
info >> stock;
remaining = stock; //none borrowed
info.ignore(); //ignore whitespace
info.ignore();
getline(info, director, ',');//set director
info.ignore();
getline(info, title, ','); //set title
info >> year; //set year
indexer = COMEDY; //map reference
indexer.append(title).append("" + year);
}
bool Comedy::operator<(Comedy)
{
return false;
}
bool Comedy::operator>(Comedy)
{
return false;
}
bool Comedy::operator==(Comedy)
{
return false;
}
void Comedy::display()
{
cout << "F, " << stock << ", " << director
<< ", " << title << ", " << year << endl;
}
string Comedy::transDisplay()
{
string tran = "F, " + director + ", " + title
+ ", " + to_string(year);
return tran;
}
//destructor
Comedy::~Comedy()
{
}