-
Notifications
You must be signed in to change notification settings - Fork 3
/
book.h
60 lines (56 loc) · 1.12 KB
/
book.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
#ifndef BOOK_H_INCLUDED
#define BOOK_H_INCLUDED
#include <iostream>
#include <string>
#include <iomanip>
using namespace std;
class Book {
private:
protected:
string title;
string isbn;
string author;
string publisher;
string dateAdded;
double retail;
double wholesale;
int quantity;
public:
Book() {
title = "MISSING";
isbn = "MISSING";
author = "MISSING";
publisher = "MISSING";
dateAdded = "MISSING";
retail = -1.0;
wholesale = -1.0;
quantity = -1;
}
Book(string, // title
string, // isbn
string, // author
string, // publisher
string, // dateAdded
double, // retail
double, // wholesale
int); // quantity
void setTitle(string);
void setISBN(string);
void setAuthor(string);
void setPublisher(string);
void setDateAdded(string);
void setRetail(double);
void setWholeSale(double);
void setQuantity(int);
string getTitle();
string getISBN();
string getAuthor();
string getPublisher();
string getDateAdded();
double getRetail();
double getWholeSale();
int getQuantity();
friend bool isOlder(const Book&, const Book&);
friend ostream& operator<<(ostream&, const Book&);
};
#endif