-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBook.h
More file actions
48 lines (25 loc) · 785 Bytes
/
Copy pathBook.h
File metadata and controls
48 lines (25 loc) · 785 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
#pragma once
#include <iostream>
#include <string>
class Book
{
private:
std::string title;
double cost;
static int count;
public:
Book();
Book(const std::string& title, double cost);
~Book();
void setTitle(const std::string& title);
void setCost(double cost);
std::string getTitle()const;
double getCost()const;
void printBook()const;
static int getCount();
bool operator >(const Book& book2)const;
bool operator >(double price)const;
double operator +(const Book& book2)const;
friend void comparePrices(const Book& book1, const Book& book2);
friend std::ostream& operator <<( std::ostream& stream, const Book& book); // book1.getPrice().... // cout << book1; cout << book1 << book2 << .....
};