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