-
Notifications
You must be signed in to change notification settings - Fork 0
/
book.h
61 lines (52 loc) · 1.51 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
61
#pragma once
//#ifndef __BOOK_H__
//#define __BOOK_H__
#include <string>
#include <iostream>
class book
{
protected:
std::string ISBN;
std::string title;
std::string author;
std::string publisher;
std::string dateAdded;
int qtyonHand;
double wholesaleCost;
double retailPrice;
book *next;
public:
book(std::string isbn = "", std::string tt = "", std::string aut = "",
std::string pub = "", std::string date = "", int qty = 0, double cost = 0, double price = 0);
void setISBN(std::string);
void settitle(std::string);
void setauthor(std::string);
void setpublisher(std::string);
void setdateAdded(std::string);
void setqtyonHand(int);
void setwholesaleCost(double);
void setretailPrice(double);
void setnextptr(book*);
void setBook(std::string, std::string, std::string, std::string, std::string, int, double, double, book*);
std::string getISBN();
std::string gettitle();
std::string getauthor();
std::string getpublisher();
std::string getdateAdded();
int getqtyonHand();
double getwholesaleCost();
double getretailPrice();
book* getnextptr();
bool operator==(const book&);
bool operator!=(const book&);
book operator=(const book&);
void swapData(book&);
int compareByQty(const book&);
double compareByCost(const book&);
int compareByAge(const book&);
friend std::ostream& operator<<(std::ostream&, const book&);
friend void displayBook(const book&);
friend class Inventory;
friend class Report;
~book();
};